@module-federation/sdk 0.0.0-next-20240905215027 → 0.0.0-next-20240906012942

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.
package/dist/index.cjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _extends = require('@swc/helpers/_/_extends');
5
+ var polyfills = require('./polyfills.cjs.js');
6
6
 
7
7
  const FederationModuleManifest = 'federation-manifest.json';
8
8
  const MANIFEST_EXT = '.json';
@@ -353,23 +353,23 @@ function generateSnapshotFromManifest(manifest, options = {}) {
353
353
  };
354
354
  if ((_manifest_metaData = manifest.metaData) == null ? void 0 : _manifest_metaData.prefetchInterface) {
355
355
  const prefetchInterface = manifest.metaData.prefetchInterface;
356
- basicRemoteSnapshot = _extends._({}, basicRemoteSnapshot, {
356
+ basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
357
357
  prefetchInterface
358
358
  });
359
359
  }
360
360
  if ((_manifest_metaData1 = manifest.metaData) == null ? void 0 : _manifest_metaData1.prefetchEntry) {
361
361
  const { path, name, type } = manifest.metaData.prefetchEntry;
362
- basicRemoteSnapshot = _extends._({}, basicRemoteSnapshot, {
362
+ basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
363
363
  prefetchEntry: simpleJoinRemoteEntry(path, name),
364
364
  prefetchEntryType: type
365
365
  });
366
366
  }
367
367
  if ('publicPath' in manifest.metaData) {
368
- remoteSnapshot = _extends._({}, basicRemoteSnapshot, {
368
+ remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
369
369
  publicPath: getPublicPath()
370
370
  });
371
371
  } else {
372
- remoteSnapshot = _extends._({}, basicRemoteSnapshot, {
372
+ remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
373
373
  getPublicPath: getPublicPath()
374
374
  });
375
375
  }
@@ -562,7 +562,7 @@ function loadScript(url, info) {
562
562
  const { script, needAttach } = createScript({
563
563
  url,
564
564
  cb: resolve,
565
- attrs: _extends._({
565
+ attrs: polyfills._extends({
566
566
  fetchpriority: 'high'
567
567
  }, attrs),
568
568
  createScriptHook,
@@ -698,7 +698,7 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
698
698
  return defaultOptions;
699
699
  }
700
700
  if (options && typeof options === 'object') {
701
- return _extends._({}, defaultOptions, options);
701
+ return polyfills._extends({}, defaultOptions, options);
702
702
  }
703
703
  throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);
704
704
  };
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ } from '@swc/helpers/_/_extends';
1
+ import { _ as _extends } from './polyfills.esm.js';
2
2
 
3
3
  const FederationModuleManifest = 'federation-manifest.json';
4
4
  const MANIFEST_EXT = '.json';
@@ -349,23 +349,23 @@ function generateSnapshotFromManifest(manifest, options = {}) {
349
349
  };
350
350
  if ((_manifest_metaData = manifest.metaData) == null ? void 0 : _manifest_metaData.prefetchInterface) {
351
351
  const prefetchInterface = manifest.metaData.prefetchInterface;
352
- basicRemoteSnapshot = _({}, basicRemoteSnapshot, {
352
+ basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
353
353
  prefetchInterface
354
354
  });
355
355
  }
356
356
  if ((_manifest_metaData1 = manifest.metaData) == null ? void 0 : _manifest_metaData1.prefetchEntry) {
357
357
  const { path, name, type } = manifest.metaData.prefetchEntry;
358
- basicRemoteSnapshot = _({}, basicRemoteSnapshot, {
358
+ basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
359
359
  prefetchEntry: simpleJoinRemoteEntry(path, name),
360
360
  prefetchEntryType: type
361
361
  });
362
362
  }
363
363
  if ('publicPath' in manifest.metaData) {
364
- remoteSnapshot = _({}, basicRemoteSnapshot, {
364
+ remoteSnapshot = _extends({}, basicRemoteSnapshot, {
365
365
  publicPath: getPublicPath()
366
366
  });
367
367
  } else {
368
- remoteSnapshot = _({}, basicRemoteSnapshot, {
368
+ remoteSnapshot = _extends({}, basicRemoteSnapshot, {
369
369
  getPublicPath: getPublicPath()
370
370
  });
371
371
  }
@@ -558,7 +558,7 @@ function loadScript(url, info) {
558
558
  const { script, needAttach } = createScript({
559
559
  url,
560
560
  cb: resolve,
561
- attrs: _({
561
+ attrs: _extends({
562
562
  fetchpriority: 'high'
563
563
  }, attrs),
564
564
  createScriptHook,
@@ -694,7 +694,7 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
694
694
  return defaultOptions;
695
695
  }
696
696
  if (options && typeof options === 'object') {
697
- return _({}, defaultOptions, options);
697
+ return _extends({}, defaultOptions, options);
698
698
  }
699
699
  throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);
700
700
  };
package/dist/package.json CHANGED
@@ -40,8 +40,5 @@
40
40
  "./dist/normalize-webpack-path.cjs.d.ts"
41
41
  ]
42
42
  }
43
- },
44
- "dependencies": {
45
- "@swc/helpers": "^0.5.0"
46
43
  }
47
44
  }
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ function _extends() {
4
+ _extends = Object.assign || function assign(target) {
5
+ for(var i = 1; i < arguments.length; i++){
6
+ var source = arguments[i];
7
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
8
+ }
9
+ return target;
10
+ };
11
+ return _extends.apply(this, arguments);
12
+ }
13
+
14
+ exports._extends = _extends;
@@ -0,0 +1,12 @@
1
+ function _extends() {
2
+ _extends = Object.assign || function assign(target) {
3
+ for(var i = 1; i < arguments.length; i++){
4
+ var source = arguments[i];
5
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
6
+ }
7
+ return target;
8
+ };
9
+ return _extends.apply(this, arguments);
10
+ }
11
+
12
+ export { _extends as _ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.0.0-next-20240905215027",
3
+ "version": "0.0.0-next-20240906012942",
4
4
  "license": "MIT",
5
5
  "description": "A sdk for support module federation",
6
6
  "keywords": [
@@ -40,8 +40,5 @@
40
40
  "./dist/normalize-webpack-path.cjs.d.ts"
41
41
  ]
42
42
  }
43
- },
44
- "dependencies": {
45
- "@swc/helpers": "^0.5.0"
46
43
  }
47
44
  }