@module-federation/managers 0.16.0 → 0.17.1

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
@@ -102,11 +102,11 @@ function parseOptions(options, normalizeSimple, normalizeOptions) {
102
102
  });
103
103
  return items;
104
104
  }
105
- function getBuildVersion() {
105
+ function getBuildVersion(root) {
106
106
  if (process.env['MF_BUILD_VERSION']) {
107
107
  return process.env['MF_BUILD_VERSION'];
108
108
  }
109
- const pkg = new PKGJsonManager().readPKGJson();
109
+ const pkg = new PKGJsonManager().readPKGJson(root);
110
110
  if ((pkg == null ? void 0 : pkg['version']) && typeof pkg['version'] === 'string') {
111
111
  return pkg['version'];
112
112
  }
@@ -117,10 +117,10 @@ function getBuildName() {
117
117
  }
118
118
 
119
119
  var utils = /*#__PURE__*/Object.freeze({
120
- __proto__: null,
121
- getBuildName: getBuildName,
122
- getBuildVersion: getBuildVersion,
123
- parseOptions: parseOptions
120
+ __proto__: null,
121
+ getBuildName: getBuildName,
122
+ getBuildVersion: getBuildVersion,
123
+ parseOptions: parseOptions
124
124
  });
125
125
 
126
126
  function normalizeExposeModuleName(exposeKey) {
@@ -369,8 +369,9 @@ let RemoteManager = class RemoteManager extends BasicPluginOptionsManager {
369
369
  this.setOptions(options);
370
370
  this.normalizeOptions(options.remotes);
371
371
  }
372
- constructor(...args){
373
- super(...args), this.normalizedOptions = {};
372
+ constructor(){
373
+ super(...arguments);
374
+ this.normalizedOptions = {};
374
375
  }
375
376
  };
376
377
 
@@ -469,13 +470,14 @@ let SharedManager = class SharedManager extends BasicPluginOptionsManager {
469
470
  this.setOptions(options);
470
471
  this.normalizeOptions(options.shared);
471
472
  }
472
- constructor(...args){
473
- super(...args), this.normalizedOptions = {};
473
+ constructor(){
474
+ super(...arguments);
475
+ this.normalizedOptions = {};
474
476
  }
475
477
  };
476
478
 
477
479
  var types = /*#__PURE__*/Object.freeze({
478
- __proto__: null
480
+ __proto__: null
479
481
  });
480
482
 
481
483
  exports.BasicPluginOptionsManager = BasicPluginOptionsManager;
package/dist/index.esm.js CHANGED
@@ -100,11 +100,11 @@ function parseOptions(options, normalizeSimple, normalizeOptions) {
100
100
  });
101
101
  return items;
102
102
  }
103
- function getBuildVersion() {
103
+ function getBuildVersion(root) {
104
104
  if (process.env['MF_BUILD_VERSION']) {
105
105
  return process.env['MF_BUILD_VERSION'];
106
106
  }
107
- const pkg = new PKGJsonManager().readPKGJson();
107
+ const pkg = new PKGJsonManager().readPKGJson(root);
108
108
  if ((pkg == null ? void 0 : pkg['version']) && typeof pkg['version'] === 'string') {
109
109
  return pkg['version'];
110
110
  }
@@ -115,10 +115,10 @@ function getBuildName() {
115
115
  }
116
116
 
117
117
  var utils = /*#__PURE__*/Object.freeze({
118
- __proto__: null,
119
- getBuildName: getBuildName,
120
- getBuildVersion: getBuildVersion,
121
- parseOptions: parseOptions
118
+ __proto__: null,
119
+ getBuildName: getBuildName,
120
+ getBuildVersion: getBuildVersion,
121
+ parseOptions: parseOptions
122
122
  });
123
123
 
124
124
  function normalizeExposeModuleName(exposeKey) {
@@ -367,8 +367,9 @@ let RemoteManager = class RemoteManager extends BasicPluginOptionsManager {
367
367
  this.setOptions(options);
368
368
  this.normalizeOptions(options.remotes);
369
369
  }
370
- constructor(...args){
371
- super(...args), this.normalizedOptions = {};
370
+ constructor(){
371
+ super(...arguments);
372
+ this.normalizedOptions = {};
372
373
  }
373
374
  };
374
375
 
@@ -467,13 +468,14 @@ let SharedManager = class SharedManager extends BasicPluginOptionsManager {
467
468
  this.setOptions(options);
468
469
  this.normalizeOptions(options.shared);
469
470
  }
470
- constructor(...args){
471
- super(...args), this.normalizedOptions = {};
471
+ constructor(){
472
+ super(...arguments);
473
+ this.normalizedOptions = {};
472
474
  }
473
475
  };
474
476
 
475
477
  var types = /*#__PURE__*/Object.freeze({
476
- __proto__: null
478
+ __proto__: null
477
479
  });
478
480
 
479
481
  export { BasicPluginOptionsManager, ContainerManager, PKGJsonManager, RemoteManager, SharedManager, types, utils };
@@ -1,4 +1,4 @@
1
1
  import { ContainerOptionsFormat, NormalizeSimple, NormalizeOptions, ParsedContainerOptions } from './types';
2
2
  export declare function parseOptions<T, R>(options: ContainerOptionsFormat<T>, normalizeSimple: NormalizeSimple<R>, normalizeOptions: NormalizeOptions<T, R>): ParsedContainerOptions<R>;
3
- export declare function getBuildVersion(): string;
3
+ export declare function getBuildVersion(root?: string): string;
4
4
  export declare function getBuildName(): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/managers",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "license": "MIT",
5
5
  "description": "Provide managers for helping handle mf data .",
6
6
  "keywords": [
@@ -22,18 +22,18 @@
22
22
  "sideEffects": false,
23
23
  "main": "./dist/index.cjs.js",
24
24
  "module": "./dist/index.esm.js",
25
- "types": "./dist/index.cjs.d.ts",
25
+ "types": "./dist/index.d.ts",
26
26
  "dependencies": {
27
27
  "find-pkg": "2.0.0",
28
28
  "fs-extra": "9.1.0",
29
- "@module-federation/sdk": "0.16.0"
29
+ "@module-federation/sdk": "0.17.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "webpack": "5.94.0"
33
33
  },
34
34
  "exports": {
35
35
  ".": {
36
- "types": "./dist/index.cjs.d.ts",
36
+ "types": "./dist/index.d.ts",
37
37
  "import": "./dist/index.esm.js",
38
38
  "require": "./dist/index.cjs.js"
39
39
  }
@@ -41,7 +41,7 @@
41
41
  "typesVersions": {
42
42
  "*": {
43
43
  ".": [
44
- "./dist/index.cjs.d.ts"
44
+ "./dist/index.d.ts"
45
45
  ]
46
46
  }
47
47
  }
@@ -1 +0,0 @@
1
- export * from "./src/index";
File without changes