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-20240902075042 to 0.0.0-next-20240903063427

31

dist/index.cjs.js

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

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

@@ -252,13 +254,2 @@ 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)=>{

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

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

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

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

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

@@ -471,3 +462,3 @@ });

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

@@ -489,4 +480,4 @@ var _info_cb;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const res = await prev(event); // 等待 prev 解析
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info); // 在 prev 解析后调用 cb
const res = prev(event);
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info);
return res;

@@ -576,3 +567,3 @@ }

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

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

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

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

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

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

@@ -247,13 +249,2 @@ 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)=>{

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

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

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

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

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

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

@@ -466,3 +457,3 @@ });

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

@@ -484,4 +475,4 @@ var _info_cb;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const res = await prev(event); // 等待 prev 解析
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info); // 在 prev 解析后调用 cb
const res = prev(event);
info == null ? void 0 : (_info_cb1 = info.cb) == null ? void 0 : _info_cb1.call(info);
return res;

@@ -571,3 +562,3 @@ }

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

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

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

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

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

virtualRuntimeEntry?: boolean;
embedRuntime?: boolean;
}

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

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