@module-federation/managers 0.24.1 → 2.0.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/BasicPluginOptionsManager.js +70 -0
- package/dist/BasicPluginOptionsManager.mjs +24 -0
- package/dist/ContainerManager.js +228 -0
- package/dist/ContainerManager.mjs +168 -0
- package/dist/PKGJsonManager.js +113 -0
- package/dist/PKGJsonManager.mjs +51 -0
- package/dist/RemoteManager.js +160 -0
- package/dist/RemoteManager.mjs +112 -0
- package/dist/SharedManager.js +196 -0
- package/dist/SharedManager.mjs +136 -0
- package/dist/constant.js +54 -0
- package/dist/constant.mjs +6 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +93 -0
- package/dist/index.mjs +36 -0
- package/dist/types.js +31 -0
- package/dist/types.mjs +4 -0
- package/dist/utils.js +119 -0
- package/dist/utils.mjs +66 -0
- package/package.json +13 -8
- package/dist/index.cjs.js +0 -499
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -490
- package/dist/index.esm.js.map +0 -1
- package/dist/src/index.d.ts +0 -8
- /package/dist/{src/BasicPluginOptionsManager.d.ts → BasicPluginOptionsManager.d.ts} +0 -0
- /package/dist/{src/ContainerManager.d.ts → ContainerManager.d.ts} +0 -0
- /package/dist/{src/PKGJsonManager.d.ts → PKGJsonManager.d.ts} +0 -0
- /package/dist/{src/RemoteManager.d.ts → RemoteManager.d.ts} +0 -0
- /package/dist/{src/SharedManager.d.ts → SharedManager.d.ts} +0 -0
- /package/dist/{src/constant.d.ts → constant.d.ts} +0 -0
- /package/dist/{src/types.d.ts → types.d.ts} +0 -0
- /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
package/dist/index.cjs.js
DELETED
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var path = require('path');
|
|
4
|
-
var sdk = require('@module-federation/sdk');
|
|
5
|
-
var finder = require('find-pkg');
|
|
6
|
-
var fs = require('fs');
|
|
7
|
-
var fs$1 = require('fs-extra');
|
|
8
|
-
|
|
9
|
-
class BasicPluginOptionsManager {
|
|
10
|
-
constructor(root = process.cwd()) {
|
|
11
|
-
this._root = root;
|
|
12
|
-
}
|
|
13
|
-
get enable() {
|
|
14
|
-
return Boolean(this._options);
|
|
15
|
-
}
|
|
16
|
-
get options() {
|
|
17
|
-
return this._options;
|
|
18
|
-
}
|
|
19
|
-
get root() {
|
|
20
|
-
return this._root;
|
|
21
|
-
}
|
|
22
|
-
init(options, extraArgs) {
|
|
23
|
-
this._options = options;
|
|
24
|
-
}
|
|
25
|
-
setOptions(options) {
|
|
26
|
-
this._options = options;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
class PKGJsonManager {
|
|
31
|
-
setPKGJson(pkg) {
|
|
32
|
-
this._pkg = pkg;
|
|
33
|
-
}
|
|
34
|
-
readPKGJson(root = process.cwd()) {
|
|
35
|
-
if (this._pkg) {
|
|
36
|
-
return this._pkg;
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
// eslint-disable-next-line no-restricted-globals
|
|
40
|
-
const pkg = JSON.parse(fs.readFileSync(path.resolve(root, 'package.json'), 'utf8'));
|
|
41
|
-
this._pkg = pkg;
|
|
42
|
-
return pkg;
|
|
43
|
-
}
|
|
44
|
-
catch (_err) {
|
|
45
|
-
try {
|
|
46
|
-
const pkg = finder.sync(root);
|
|
47
|
-
this._pkg = pkg;
|
|
48
|
-
return pkg;
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
sdk.logger.error(err);
|
|
52
|
-
return {};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
getExposeGarfishModuleType(root = process.cwd()) {
|
|
57
|
-
const pkg = this.readPKGJson(root);
|
|
58
|
-
return pkg?.['mf']?.type === sdk.MFModuleType.NPM
|
|
59
|
-
? sdk.MFModuleType.NPM
|
|
60
|
-
: sdk.MFModuleType.APP;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const LOCAL_BUILD_VERSION = 'local';
|
|
65
|
-
const UNKNOWN_MODULE_NAME = 'UNKNOWN';
|
|
66
|
-
|
|
67
|
-
function processFn(options, normalizeSimple, normalizeOptions, fn) {
|
|
68
|
-
const object = (obj) => {
|
|
69
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
70
|
-
if (typeof value === 'string') {
|
|
71
|
-
fn(key, normalizeSimple(value, key));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
fn(key, normalizeOptions(value, key));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const array = (items) => {
|
|
79
|
-
for (const item of items) {
|
|
80
|
-
if (typeof item === 'string') {
|
|
81
|
-
fn(item, normalizeSimple(item, item));
|
|
82
|
-
}
|
|
83
|
-
else if (item && typeof item === 'object') {
|
|
84
|
-
object(item);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error('Unexpected options format');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
if (!options) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
else if (Array.isArray(options)) {
|
|
95
|
-
array(options);
|
|
96
|
-
}
|
|
97
|
-
else if (typeof options === 'object') {
|
|
98
|
-
object(options);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
throw new Error('Unexpected options format');
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
function parseOptions(options, normalizeSimple, normalizeOptions) {
|
|
105
|
-
const items = [];
|
|
106
|
-
processFn(options, normalizeSimple, normalizeOptions, (key, value) => {
|
|
107
|
-
items.push([key, value]);
|
|
108
|
-
});
|
|
109
|
-
return items;
|
|
110
|
-
}
|
|
111
|
-
function getBuildVersion(root) {
|
|
112
|
-
if (process.env['MF_BUILD_VERSION']) {
|
|
113
|
-
return process.env['MF_BUILD_VERSION'];
|
|
114
|
-
}
|
|
115
|
-
const pkg = new PKGJsonManager().readPKGJson(root);
|
|
116
|
-
if (pkg?.['version'] && typeof pkg['version'] === 'string') {
|
|
117
|
-
return pkg['version'];
|
|
118
|
-
}
|
|
119
|
-
return LOCAL_BUILD_VERSION;
|
|
120
|
-
}
|
|
121
|
-
function getBuildName() {
|
|
122
|
-
return process.env['MF_BUILD_NAME'];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
var utils = /*#__PURE__*/Object.freeze({
|
|
126
|
-
__proto__: null,
|
|
127
|
-
getBuildName: getBuildName,
|
|
128
|
-
getBuildVersion: getBuildVersion,
|
|
129
|
-
parseOptions: parseOptions
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
function normalizeExposeModuleName(exposeKey) {
|
|
133
|
-
const relativePath = path.relative('.', exposeKey);
|
|
134
|
-
if (!relativePath) {
|
|
135
|
-
return 'ExposeEntry';
|
|
136
|
-
}
|
|
137
|
-
return relativePath;
|
|
138
|
-
}
|
|
139
|
-
class ContainerManager extends BasicPluginOptionsManager {
|
|
140
|
-
get enable() {
|
|
141
|
-
return Boolean(this.options.name &&
|
|
142
|
-
this.options.exposes &&
|
|
143
|
-
(Array.isArray(this.options.exposes)
|
|
144
|
-
? this.options.exposes.length > 0
|
|
145
|
-
: Object.keys(this.options.exposes).length > 0));
|
|
146
|
-
}
|
|
147
|
-
get globalEntryName() {
|
|
148
|
-
const { name, library } = this.options;
|
|
149
|
-
if (library) {
|
|
150
|
-
if (typeof library.name === 'string') {
|
|
151
|
-
return library.name;
|
|
152
|
-
}
|
|
153
|
-
return name;
|
|
154
|
-
}
|
|
155
|
-
return name;
|
|
156
|
-
}
|
|
157
|
-
get containerPluginExposesOptions() {
|
|
158
|
-
const { exposes } = this.options;
|
|
159
|
-
const parsedOptions = parseOptions(exposes, (item, key) => ({
|
|
160
|
-
import: Array.isArray(item) ? item : [item],
|
|
161
|
-
name: sdk.generateExposeFilename(key, false),
|
|
162
|
-
}), (item, key) => ({
|
|
163
|
-
import: Array.isArray(item.import) ? item.import : [item.import],
|
|
164
|
-
name: item.name || sdk.generateExposeFilename(key, false),
|
|
165
|
-
}));
|
|
166
|
-
return parsedOptions.reduce((sum, item) => {
|
|
167
|
-
const [exposeKey, exposeObj] = item;
|
|
168
|
-
sum[exposeKey] = exposeObj;
|
|
169
|
-
return sum;
|
|
170
|
-
}, {});
|
|
171
|
-
}
|
|
172
|
-
// { '.' : './src/Button.jsx', './backup': './src/Button.jsx' } => { './src/Button' : ['.','./backup'] }
|
|
173
|
-
get fileExposeKeyMap() {
|
|
174
|
-
const parsedOptions = this._parseOptions();
|
|
175
|
-
return parsedOptions.reduce((sum, item) => {
|
|
176
|
-
const [exposeKey, exposeObject] = item;
|
|
177
|
-
exposeObject.import.forEach((exposeFile) => {
|
|
178
|
-
const exposeFileWithoutExt = exposeFile.replace(path.extname(exposeFile), '');
|
|
179
|
-
sum[exposeFileWithoutExt] ||= new Set();
|
|
180
|
-
sum[exposeFileWithoutExt].add(exposeKey);
|
|
181
|
-
});
|
|
182
|
-
return sum;
|
|
183
|
-
}, {});
|
|
184
|
-
}
|
|
185
|
-
// { '.' : './src/Button.jsx' } => { '__federation_expose_Component' : ['src/Buttton'] }
|
|
186
|
-
get exposeFileNameImportMap() {
|
|
187
|
-
const { exposes } = this.options;
|
|
188
|
-
const parsedOptions = parseOptions(exposes, (item, key) => ({
|
|
189
|
-
import: Array.isArray(item) ? item : [item],
|
|
190
|
-
name: sdk.generateExposeFilename(key, false),
|
|
191
|
-
}), (item, key) => ({
|
|
192
|
-
import: Array.isArray(item.import) ? item.import : [item.import],
|
|
193
|
-
name: item.name || sdk.generateExposeFilename(key, false),
|
|
194
|
-
}));
|
|
195
|
-
return parsedOptions.reduce((sum, item) => {
|
|
196
|
-
const [_exposeKey, exposeObj] = item;
|
|
197
|
-
const { name, import: importPath } = exposeObj;
|
|
198
|
-
sum[name] = importPath;
|
|
199
|
-
return sum;
|
|
200
|
-
}, {});
|
|
201
|
-
}
|
|
202
|
-
// { '.' : './src/Button.jsx' } => { '.' : ['src/Button'] }
|
|
203
|
-
get exposeObject() {
|
|
204
|
-
const parsedOptions = this._parseOptions();
|
|
205
|
-
return parsedOptions.reduce((sum, item) => {
|
|
206
|
-
const [exposeKey, exposeObject] = item;
|
|
207
|
-
sum[exposeKey] = [];
|
|
208
|
-
exposeObject.import.forEach((item) => {
|
|
209
|
-
const relativePath = path.relative('.', item.replace(path.extname(item), ''));
|
|
210
|
-
sum[exposeKey].push(relativePath);
|
|
211
|
-
});
|
|
212
|
-
return sum;
|
|
213
|
-
}, {});
|
|
214
|
-
}
|
|
215
|
-
// { '.' : './src/Button.jsx' } => ['./src/Button.jsx']
|
|
216
|
-
get exposeFiles() {
|
|
217
|
-
const parsedOptions = this._parseOptions();
|
|
218
|
-
return parsedOptions.reduce((sum, item) => {
|
|
219
|
-
const [_exposeKey, exposeObject] = item;
|
|
220
|
-
sum.push(...exposeObject.import);
|
|
221
|
-
return sum;
|
|
222
|
-
}, []);
|
|
223
|
-
}
|
|
224
|
-
get manifestModuleInfos() {
|
|
225
|
-
if (this._manifestModuleInfos) {
|
|
226
|
-
return this._manifestModuleInfos;
|
|
227
|
-
}
|
|
228
|
-
// { '.' : './src/Button.jsx' } => { '.' : { name: 'ExposeEntry', file: './src/Button.jsx', requires: {} } }
|
|
229
|
-
const parsedOptions = this._parseOptions();
|
|
230
|
-
this._manifestModuleInfos = parsedOptions.reduce((sum, item) => {
|
|
231
|
-
const [exposeKey, exposeObject] = item;
|
|
232
|
-
sum[exposeKey] = {
|
|
233
|
-
name: exposeObject.name || normalizeExposeModuleName(exposeKey),
|
|
234
|
-
file: exposeObject.import,
|
|
235
|
-
};
|
|
236
|
-
return sum;
|
|
237
|
-
}, {});
|
|
238
|
-
return this._manifestModuleInfos;
|
|
239
|
-
}
|
|
240
|
-
// { '.' : './src/Button.jsx' } => { index: ['./src/Button.jsx'] }
|
|
241
|
-
get webpackEntry() {
|
|
242
|
-
return Object.values(this.manifestModuleInfos).reduce((sum, cur) => {
|
|
243
|
-
const entry = cur.name === 'ExposeEntry'
|
|
244
|
-
? 'index'
|
|
245
|
-
: cur.name.slice(0, 1).toLowerCase() + cur.name.slice(1);
|
|
246
|
-
sum[entry] = cur.file;
|
|
247
|
-
return sum;
|
|
248
|
-
}, {});
|
|
249
|
-
}
|
|
250
|
-
_parseOptions() {
|
|
251
|
-
if (this._parsedOptions) {
|
|
252
|
-
return this._parsedOptions;
|
|
253
|
-
}
|
|
254
|
-
this._parsedOptions = parseOptions(this.options.exposes, (item) => ({
|
|
255
|
-
import: Array.isArray(item) ? item : [item],
|
|
256
|
-
name: undefined,
|
|
257
|
-
}), (item) => ({
|
|
258
|
-
import: Array.isArray(item.import) ? item.import : [item.import],
|
|
259
|
-
name: undefined,
|
|
260
|
-
}));
|
|
261
|
-
return this._parsedOptions;
|
|
262
|
-
}
|
|
263
|
-
init(options) {
|
|
264
|
-
this.setOptions(options);
|
|
265
|
-
this.validate(options.name);
|
|
266
|
-
}
|
|
267
|
-
validate(name) {
|
|
268
|
-
if (!name) {
|
|
269
|
-
throw new Error(`container name can not be empty!`);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function getEntry(remoteObj) {
|
|
275
|
-
if (typeof remoteObj === 'string') {
|
|
276
|
-
return remoteObj;
|
|
277
|
-
}
|
|
278
|
-
if (typeof remoteObj.external === 'string') {
|
|
279
|
-
return remoteObj.external;
|
|
280
|
-
}
|
|
281
|
-
throw new Error('Not support "array" remote value yet!');
|
|
282
|
-
}
|
|
283
|
-
class RemoteManager extends BasicPluginOptionsManager {
|
|
284
|
-
constructor() {
|
|
285
|
-
super(...arguments);
|
|
286
|
-
this.normalizedOptions = {};
|
|
287
|
-
}
|
|
288
|
-
get enable() {
|
|
289
|
-
return Boolean(this.remotes &&
|
|
290
|
-
(Array.isArray(this.remotes)
|
|
291
|
-
? this.remotes.length > 0
|
|
292
|
-
: Object.keys(this.remotes).length > 0));
|
|
293
|
-
}
|
|
294
|
-
get statsRemoteWithEmptyUsedIn() {
|
|
295
|
-
const { name } = this.options;
|
|
296
|
-
return Object.keys(this.normalizedOptions).reduce((sum, cur) => {
|
|
297
|
-
const normalizedOption = this.normalizedOptions[cur];
|
|
298
|
-
let curObj;
|
|
299
|
-
if ('entry' in normalizedOption) {
|
|
300
|
-
curObj = {
|
|
301
|
-
entry: normalizedOption.entry,
|
|
302
|
-
alias: normalizedOption.alias,
|
|
303
|
-
moduleName: UNKNOWN_MODULE_NAME,
|
|
304
|
-
federationContainerName: normalizedOption.name,
|
|
305
|
-
consumingFederationContainerName: name,
|
|
306
|
-
usedIn: [UNKNOWN_MODULE_NAME],
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
curObj = {
|
|
311
|
-
alias: normalizedOption.alias,
|
|
312
|
-
moduleName: UNKNOWN_MODULE_NAME,
|
|
313
|
-
version: normalizedOption.version,
|
|
314
|
-
federationContainerName: normalizedOption.name,
|
|
315
|
-
consumingFederationContainerName: name,
|
|
316
|
-
usedIn: [UNKNOWN_MODULE_NAME],
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
sum.push(curObj);
|
|
320
|
-
return sum;
|
|
321
|
-
}, []);
|
|
322
|
-
}
|
|
323
|
-
// 'micro-app-sub3': 'app:@garfish/micro-app-sub3:0.0.4',
|
|
324
|
-
// ↓↓↓
|
|
325
|
-
// {
|
|
326
|
-
// 'micro-app-sub3': @garfish/micro-app-sub3:0.0.4
|
|
327
|
-
// }
|
|
328
|
-
get dtsRemotes() {
|
|
329
|
-
return Object.keys(this.normalizedOptions).reduce((sum, remoteAlias) => {
|
|
330
|
-
const remoteInfo = this.normalizedOptions[remoteAlias];
|
|
331
|
-
sum[remoteAlias] = sdk.composeKeyWithSeparator(remoteInfo.name, 'entry' in remoteInfo ? remoteInfo.entry : remoteInfo.version);
|
|
332
|
-
return sum;
|
|
333
|
-
}, {});
|
|
334
|
-
}
|
|
335
|
-
get remotes() {
|
|
336
|
-
return this.options.remotes;
|
|
337
|
-
}
|
|
338
|
-
// INFO: only support remoteType: script now
|
|
339
|
-
normalizeOptions(options = {}) {
|
|
340
|
-
this.normalizedOptions = Object.keys(options).reduce((sum, remoteAlias) => {
|
|
341
|
-
if (Array.isArray(options)) {
|
|
342
|
-
return sum;
|
|
343
|
-
}
|
|
344
|
-
const remoteInfo = options[remoteAlias];
|
|
345
|
-
if (Array.isArray(remoteInfo)) {
|
|
346
|
-
return sum;
|
|
347
|
-
}
|
|
348
|
-
let parsedOptions;
|
|
349
|
-
try {
|
|
350
|
-
parsedOptions = sdk.parseEntry(typeof remoteInfo === 'string' ? remoteInfo : getEntry(remoteInfo), '', '@');
|
|
351
|
-
}
|
|
352
|
-
catch (e) {
|
|
353
|
-
// noop
|
|
354
|
-
}
|
|
355
|
-
if (!parsedOptions) {
|
|
356
|
-
return sum;
|
|
357
|
-
}
|
|
358
|
-
sum[remoteAlias] = {
|
|
359
|
-
...parsedOptions,
|
|
360
|
-
alias: remoteAlias,
|
|
361
|
-
shareScope: typeof remoteInfo === 'object'
|
|
362
|
-
? remoteInfo.shareScope || 'default'
|
|
363
|
-
: 'default',
|
|
364
|
-
};
|
|
365
|
-
return sum;
|
|
366
|
-
}, {});
|
|
367
|
-
}
|
|
368
|
-
init(options) {
|
|
369
|
-
this.setOptions(options);
|
|
370
|
-
this.normalizeOptions(options.remotes);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// @ts-ignore this pkg miss types
|
|
375
|
-
class SharedManager extends BasicPluginOptionsManager {
|
|
376
|
-
constructor() {
|
|
377
|
-
super(...arguments);
|
|
378
|
-
this.normalizedOptions = {};
|
|
379
|
-
}
|
|
380
|
-
get enable() {
|
|
381
|
-
return Boolean(Object.keys(this.sharedPluginOptions.shared).length);
|
|
382
|
-
}
|
|
383
|
-
get sharedPluginOptions() {
|
|
384
|
-
const normalizedShared = this.normalizedOptions;
|
|
385
|
-
const shared = Object.keys(normalizedShared).reduce((sum, cur) => {
|
|
386
|
-
const { singleton, requiredVersion, version, eager, shareScope, import: sharedImport, treeShaking, } = normalizedShared[cur];
|
|
387
|
-
sum[cur] = {
|
|
388
|
-
singleton,
|
|
389
|
-
requiredVersion,
|
|
390
|
-
version,
|
|
391
|
-
eager,
|
|
392
|
-
shareScope,
|
|
393
|
-
import: sharedImport,
|
|
394
|
-
treeShaking,
|
|
395
|
-
};
|
|
396
|
-
return sum;
|
|
397
|
-
}, {});
|
|
398
|
-
return {
|
|
399
|
-
shared,
|
|
400
|
-
shareScope: this.options.shareScope || 'default',
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
findPkg(name, shareConfig) {
|
|
404
|
-
try {
|
|
405
|
-
let pkgPath = '';
|
|
406
|
-
let depName = name;
|
|
407
|
-
if (shareConfig.import) {
|
|
408
|
-
if (path.isAbsolute(shareConfig.import)) {
|
|
409
|
-
pkgPath = shareConfig.import;
|
|
410
|
-
}
|
|
411
|
-
else if (shareConfig.import.startsWith('.')) {
|
|
412
|
-
pkgPath = path.resolve(this.root, shareConfig.import);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
if (shareConfig.packageName) {
|
|
417
|
-
depName = shareConfig.packageName;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
pkgPath = pkgPath || require.resolve(depName, { paths: [this.root] });
|
|
421
|
-
const pkgJsonPath = finder.sync(pkgPath);
|
|
422
|
-
return {
|
|
423
|
-
pkg: JSON.parse(fs$1.readFileSync(pkgJsonPath, 'utf-8')),
|
|
424
|
-
path: '',
|
|
425
|
-
pkgPath: '',
|
|
426
|
-
};
|
|
427
|
-
}
|
|
428
|
-
catch (err) {
|
|
429
|
-
return {
|
|
430
|
-
pkg: {},
|
|
431
|
-
path: '',
|
|
432
|
-
pkgPath: '',
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
get enableTreeShaking() {
|
|
437
|
-
return Object.values(this.normalizedOptions).some((item) => item.treeShaking);
|
|
438
|
-
}
|
|
439
|
-
transformSharedConfig(sharedConfig) {
|
|
440
|
-
const defaultSharedConfig = {
|
|
441
|
-
singleton: true,
|
|
442
|
-
requiredVersion: undefined,
|
|
443
|
-
shareScope: 'default',
|
|
444
|
-
};
|
|
445
|
-
return {
|
|
446
|
-
...defaultSharedConfig,
|
|
447
|
-
...sharedConfig,
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
normalizeOptions(options) {
|
|
451
|
-
const normalizedShared = {};
|
|
452
|
-
const sharedOptions = parseOptions(options, (item, key) => {
|
|
453
|
-
if (typeof item !== 'string')
|
|
454
|
-
throw new Error('Unexpected array in shared');
|
|
455
|
-
const config = item === key || !sdk.isRequiredVersion(item)
|
|
456
|
-
? {
|
|
457
|
-
import: item,
|
|
458
|
-
}
|
|
459
|
-
: {
|
|
460
|
-
import: key,
|
|
461
|
-
requiredVersion: item,
|
|
462
|
-
};
|
|
463
|
-
return config;
|
|
464
|
-
}, (item) => item);
|
|
465
|
-
sharedOptions.forEach((item) => {
|
|
466
|
-
const [sharedName, sharedOptions] = item;
|
|
467
|
-
const pkgInfo = this.findPkg(sharedName, sharedOptions);
|
|
468
|
-
const sharedConfig = this.transformSharedConfig(sharedOptions);
|
|
469
|
-
normalizedShared[sharedName] = {
|
|
470
|
-
...sharedConfig,
|
|
471
|
-
requiredVersion: typeof sharedConfig.requiredVersion !== 'undefined'
|
|
472
|
-
? sharedConfig.requiredVersion
|
|
473
|
-
: `^${pkgInfo.pkg['version']}`,
|
|
474
|
-
name: sharedName,
|
|
475
|
-
version: pkgInfo.pkg['version'],
|
|
476
|
-
eager: Boolean(sharedConfig.eager),
|
|
477
|
-
};
|
|
478
|
-
});
|
|
479
|
-
this.normalizedOptions = normalizedShared;
|
|
480
|
-
}
|
|
481
|
-
init(options) {
|
|
482
|
-
this.setOptions(options);
|
|
483
|
-
this.normalizeOptions(options.shared);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
var types = /*#__PURE__*/Object.freeze({
|
|
488
|
-
__proto__: null
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
exports.BasicPluginOptionsManager = BasicPluginOptionsManager;
|
|
492
|
-
exports.ContainerManager = ContainerManager;
|
|
493
|
-
exports.PKGJsonManager = PKGJsonManager;
|
|
494
|
-
exports.RemoteManager = RemoteManager;
|
|
495
|
-
exports.SharedManager = SharedManager;
|
|
496
|
-
exports.UNKNOWN_MODULE_NAME = UNKNOWN_MODULE_NAME;
|
|
497
|
-
exports.types = types;
|
|
498
|
-
exports.utils = utils;
|
|
499
|
-
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../src/BasicPluginOptionsManager.ts","../../src/PKGJsonManager.ts","../../src/constant.ts","../../src/utils.ts","../../src/ContainerManager.ts","../../src/RemoteManager.ts","../../src/SharedManager.ts"],"sourcesContent":[null,null,null,null,null,null,null],"names":["logger","MFModuleType","generateExposeFilename","composeKeyWithSeparator","parseEntry","findPkg","fs","isRequiredVersion"],"mappings":";;;;;;;;MAAa,yBAAyB,CAAA;AAIpC,IAAA,WAAA,CAAY,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAA;AAC9B,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI;IACnB;AAEA,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC/B;AAEA,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAwB;IACtC;AAEA,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;IAEA,IAAI,CAAC,OAAU,EAAE,SAA+B,EAAA;AAC9C,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO;IACzB;AAEA,IAAA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