@module-federation/sdk
Advanced tools
Comparing version 0.0.0-next-20240310052320 to 0.0.0-next-20240311023539
@@ -32,3 +32,25 @@ 'use strict'; | ||
var SEPARATOR = ":"; | ||
var ManifestFileName = "mf-manifest.json"; | ||
var StatsFileName = "mf-stats.json"; | ||
var MFModuleType = { | ||
NPM: "npm", | ||
APP: "app" | ||
}; | ||
var ContainerPlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var ContainerReferencePlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var ModuleFederationPlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var SharePlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
function isBrowserEnv() { | ||
@@ -227,3 +249,4 @@ return typeof window !== "undefined"; | ||
var parseEntry = function(str, devVerOrUrl) { | ||
var strSplit = str.split(SEPARATOR); | ||
var separator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : SEPARATOR; | ||
var strSplit = str.split(separator); | ||
var devVersionOrUrl = getProcessEnv()["NODE_ENV"] === "development" && devVerOrUrl; | ||
@@ -237,3 +260,3 @@ var defaultVersion = "*"; | ||
var _strSplit = _to_array(strSplit), name = _strSplit[0], versionOrEntryArr = _strSplit.slice(1); | ||
var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(SEPARATOR); | ||
var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(separator); | ||
if (isEntry(versionOrEntry)) { | ||
@@ -1158,7 +1181,12 @@ return { | ||
exports.MANIFEST_EXT = MANIFEST_EXT; | ||
exports.MFModuleType = MFModuleType; | ||
exports.ManifestFileName = ManifestFileName; | ||
exports.NameTransformMap = NameTransformMap; | ||
exports.NameTransformSymbol = NameTransformSymbol; | ||
exports.SEPARATOR = SEPARATOR; | ||
exports.StatsFileName = StatsFileName; | ||
exports.assert = assert; | ||
exports.composeKeyWithSeparator = composeKeyWithSeparator; | ||
exports.containerPlugin = ContainerPlugin; | ||
exports.containerReferencePlugin = ContainerReferencePlugin; | ||
exports.createLink = createLink; | ||
@@ -1182,5 +1210,7 @@ exports.createScript = createScript; | ||
exports.logger = logger; | ||
exports.moduleFederationPlugin = ModuleFederationPlugin; | ||
exports.parseEntry = parseEntry; | ||
exports.safeWrapper = safeWrapper; | ||
exports.sharePlugin = SharePlugin; | ||
exports.simpleJoinRemoteEntry = simpleJoinRemoteEntry; | ||
exports.warn = warn; |
@@ -28,3 +28,25 @@ function _define_property$2(obj, key, value) { | ||
var SEPARATOR = ":"; | ||
var ManifestFileName = "mf-manifest.json"; | ||
var StatsFileName = "mf-stats.json"; | ||
var MFModuleType = { | ||
NPM: "npm", | ||
APP: "app" | ||
}; | ||
var ContainerPlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var ContainerReferencePlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var ModuleFederationPlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
var SharePlugin = /*#__PURE__*/Object.freeze({ | ||
__proto__: null | ||
}); | ||
function isBrowserEnv() { | ||
@@ -223,3 +245,4 @@ return typeof window !== "undefined"; | ||
var parseEntry = function(str, devVerOrUrl) { | ||
var strSplit = str.split(SEPARATOR); | ||
var separator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : SEPARATOR; | ||
var strSplit = str.split(separator); | ||
var devVersionOrUrl = getProcessEnv()["NODE_ENV"] === "development" && devVerOrUrl; | ||
@@ -233,3 +256,3 @@ var defaultVersion = "*"; | ||
var _strSplit = _to_array(strSplit), name = _strSplit[0], versionOrEntryArr = _strSplit.slice(1); | ||
var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(SEPARATOR); | ||
var versionOrEntry = devVersionOrUrl || versionOrEntryArr.join(separator); | ||
if (isEntry(versionOrEntry)) { | ||
@@ -1148,2 +1171,2 @@ return { | ||
export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, NameTransformMap, NameTransformSymbol, SEPARATOR, assert, composeKeyWithSeparator, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, parseEntry, safeWrapper, simpleJoinRemoteEntry, warn }; | ||
export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, EncodedNameTransformMap, FederationModuleManifest, Logger, MANIFEST_EXT, MFModuleType, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, isBrowserEnv, isDebugMode, isManifestProvider, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, parseEntry, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn }; |
{ | ||
"name": "@module-federation/sdk", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A sdk for support module federation", |
@@ -17,1 +17,7 @@ export declare const FederationModuleManifest = "federation-manifest.json"; | ||
export declare const SEPARATOR = ":"; | ||
export declare const ManifestFileName = "mf-manifest.json"; | ||
export declare const StatsFileName = "mf-stats.json"; | ||
export declare const MFModuleType: { | ||
NPM: string; | ||
APP: string; | ||
}; |
@@ -5,1 +5,2 @@ export * from './common'; | ||
export * from './snapshot'; | ||
export * from './plugins'; |
@@ -17,4 +17,6 @@ import type { RemoteWithEntry, RemoteWithVersion } from './common'; | ||
remoteEntry: ResourceInfo; | ||
prefetchEntry: ResourceInfo; | ||
prefetchEntry?: ResourceInfo; | ||
types: Omit<ResourceInfo, 'type'>; | ||
type: string; | ||
pluginVersion: string; | ||
} | ||
@@ -59,3 +61,3 @@ type StatsMetaDataWithGetPublicPath<T = BasicStatsMetaData> = T & { | ||
name: string; | ||
file: string; | ||
file: string[]; | ||
} | ||
@@ -62,0 +64,0 @@ export interface ManifestModuleInfos { |
import { RemoteEntryInfo, ModuleInfo } from './types'; | ||
import { Logger } from './logger'; | ||
declare const parseEntry: (str: string, devVerOrUrl?: string) => RemoteEntryInfo; | ||
declare const parseEntry: (str: string, devVerOrUrl?: string, separator?: string) => RemoteEntryInfo; | ||
declare global { | ||
@@ -5,0 +5,0 @@ var FEDERATION_DEBUG: string | undefined; |
{ | ||
"name": "@module-federation/sdk", | ||
"version": "0.0.0-next-20240310052320", | ||
"version": "0.0.0-next-20240311023539", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A sdk for support module federation", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130828
30
3313