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.0.0-next-20240905014927 to 0.0.0-next-20240905092248

40

dist/index.cjs.js

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

var _extends = require('@swc/helpers/_/_extends');
const FederationModuleManifest = 'federation-manifest.json';

@@ -254,2 +252,13 @@ const MANIFEST_EXT = '.json';

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);
}
const simpleJoinRemoteEntry = (rPath, rName)=>{

@@ -358,3 +367,3 @@ if (!rPath) {

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

@@ -365,3 +374,3 @@ });

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

@@ -372,7 +381,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()

@@ -462,3 +471,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)=>{

@@ -477,8 +486,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;
}

@@ -567,3 +581,3 @@ }

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

@@ -704,3 +718,3 @@ }, attrs),

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

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

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

import { _ } from '@swc/helpers/_/_extends';
const FederationModuleManifest = 'federation-manifest.json';

@@ -249,2 +247,13 @@ const MANIFEST_EXT = '.json';

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);
}
const simpleJoinRemoteEntry = (rPath, rName)=>{

@@ -353,3 +362,3 @@ if (!rPath) {

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

@@ -360,3 +369,3 @@ });

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

@@ -367,7 +376,7 @@ prefetchEntryType: type

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

@@ -457,3 +466,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)=>{

@@ -472,8 +481,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;
}

@@ -562,3 +576,3 @@ }

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

@@ -699,3 +713,3 @@ }, attrs),

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

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

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

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

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

{
"name": "@module-federation/sdk",
"version": "0.0.0-next-20240905014927",
"version": "0.0.0-next-20240905092248",
"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