@module-federation/sdk 0.14.3 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,6 @@ var polyfills = require('./polyfills.cjs.cjs');
5
5
  const FederationModuleManifest = 'federation-manifest.json';
6
6
  const MANIFEST_EXT = '.json';
7
7
  const BROWSER_LOG_KEY = 'FEDERATION_DEBUG';
8
- const BROWSER_LOG_VALUE = '1';
9
8
  const NameTransformSymbol = {
10
9
  AT: '@',
11
10
  HYPHEN: '-',
@@ -65,7 +64,7 @@ function isReactNativeEnv() {
65
64
  function isBrowserDebug() {
66
65
  try {
67
66
  if (isBrowserEnv() && window.localStorage) {
68
- return localStorage.getItem(BROWSER_LOG_KEY) === BROWSER_LOG_VALUE;
67
+ return Boolean(localStorage.getItem(BROWSER_LOG_KEY));
69
68
  }
70
69
  } catch (error) {
71
70
  return false;
@@ -767,8 +766,11 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
767
766
  };
768
767
  }
769
768
 
769
+ const createModuleFederationConfig = (options)=>{
770
+ return options;
771
+ };
772
+
770
773
  exports.BROWSER_LOG_KEY = BROWSER_LOG_KEY;
771
- exports.BROWSER_LOG_VALUE = BROWSER_LOG_VALUE;
772
774
  exports.ENCODE_NAME_PREFIX = ENCODE_NAME_PREFIX;
773
775
  exports.EncodedNameTransformMap = EncodedNameTransformMap;
774
776
  exports.FederationModuleManifest = FederationModuleManifest;
@@ -788,6 +790,7 @@ exports.containerPlugin = ContainerPlugin;
788
790
  exports.containerReferencePlugin = ContainerReferencePlugin;
789
791
  exports.createLink = createLink;
790
792
  exports.createLogger = createLogger;
793
+ exports.createModuleFederationConfig = createModuleFederationConfig;
791
794
  exports.createScript = createScript;
792
795
  exports.createScriptNode = createScriptNode;
793
796
  exports.decodeName = decodeName;
package/dist/index.esm.js CHANGED
@@ -3,7 +3,6 @@ import { _ as _extends } from './polyfills.esm.js';
3
3
  const FederationModuleManifest = 'federation-manifest.json';
4
4
  const MANIFEST_EXT = '.json';
5
5
  const BROWSER_LOG_KEY = 'FEDERATION_DEBUG';
6
- const BROWSER_LOG_VALUE = '1';
7
6
  const NameTransformSymbol = {
8
7
  AT: '@',
9
8
  HYPHEN: '-',
@@ -63,7 +62,7 @@ function isReactNativeEnv() {
63
62
  function isBrowserDebug() {
64
63
  try {
65
64
  if (isBrowserEnv() && window.localStorage) {
66
- return localStorage.getItem(BROWSER_LOG_KEY) === BROWSER_LOG_VALUE;
65
+ return Boolean(localStorage.getItem(BROWSER_LOG_KEY));
67
66
  }
68
67
  } catch (error) {
69
68
  return false;
@@ -765,4 +764,8 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
765
764
  };
766
765
  }
767
766
 
768
- export { BROWSER_LOG_KEY, BROWSER_LOG_VALUE, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, MANIFEST_EXT, MFModuleType, MFPrefetchCommon, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createLogger, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isReactNativeEnv, isRequiredVersion, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeToString, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
767
+ const createModuleFederationConfig = (options)=>{
768
+ return options;
769
+ };
770
+
771
+ export { BROWSER_LOG_KEY, ENCODE_NAME_PREFIX, EncodedNameTransformMap, FederationModuleManifest, MANIFEST_EXT, MFModuleType, MFPrefetchCommon, MODULE_DEVTOOL_IDENTIFIER, ManifestFileName, NameTransformMap, NameTransformSymbol, SEPARATOR, StatsFileName, TEMP_DIR, assert, composeKeyWithSeparator, ContainerPlugin as containerPlugin, ContainerReferencePlugin as containerReferencePlugin, createLink, createLogger, createModuleFederationConfig, createScript, createScriptNode, decodeName, encodeName, error, generateExposeFilename, generateShareFilename, generateSnapshotFromManifest, getProcessEnv, getResourceUrl, inferAutoPublicPath, isBrowserEnv, isDebugMode, isManifestProvider, isReactNativeEnv, isRequiredVersion, isStaticResourcesEqual, loadScript, loadScriptNode, logger, ModuleFederationPlugin as moduleFederationPlugin, normalizeOptions, parseEntry, safeToString, safeWrapper, SharePlugin as sharePlugin, simpleJoinRemoteEntry, warn };
@@ -1,7 +1,6 @@
1
1
  export declare const FederationModuleManifest = "federation-manifest.json";
2
2
  export declare const MANIFEST_EXT = ".json";
3
3
  export declare const BROWSER_LOG_KEY = "FEDERATION_DEBUG";
4
- export declare const BROWSER_LOG_VALUE = "1";
5
4
  export declare const NameTransformSymbol: {
6
5
  AT: string;
7
6
  HYPHEN: string;
@@ -0,0 +1,2 @@
1
+ import type { moduleFederationPlugin } from './types/plugins';
2
+ export declare const createModuleFederationConfig: (options: moduleFederationPlugin.ModuleFederationPluginOptions) => moduleFederationPlugin.ModuleFederationPluginOptions;
@@ -7,3 +7,4 @@ export * from './env';
7
7
  export * from './dom';
8
8
  export * from './node';
9
9
  export * from './normalizeOptions';
10
+ export { createModuleFederationConfig } from './createModuleFederationConfig';
@@ -106,6 +106,7 @@ export interface DtsHostOptions {
106
106
  runtimePkgs?: string[];
107
107
  remoteTypeUrls?: (() => Promise<RemoteTypeUrls>) | RemoteTypeUrls;
108
108
  timeout?: number;
109
+ typesOnBuild?: boolean;
109
110
  }
110
111
  export interface DtsRemoteOptions {
111
112
  tsConfigPath?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.14.3",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "A sdk for support module federation",