@umijs/mfsu 4.0.0-beta.8 → 4.0.0-canary.20220317.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.
Files changed (56) hide show
  1. package/dist/babelPlugins/autoExport.js +5 -1
  2. package/dist/babelPlugins/awaitImport/awaitImport.js +5 -1
  3. package/dist/babelPlugins/awaitImport/checkMatch.d.ts +2 -1
  4. package/dist/babelPlugins/awaitImport/checkMatch.js +10 -4
  5. package/dist/babelPlugins/awaitImport/getAliasedPath.js +5 -10
  6. package/dist/babelPlugins/awaitImport/parseSpecifiers.js +5 -1
  7. package/dist/dep/dep.d.ts +4 -1
  8. package/dist/dep/dep.js +18 -2
  9. package/dist/dep/getExposeFromContent.d.ts +0 -1
  10. package/dist/depBuilder/depBuilder.d.ts +0 -1
  11. package/dist/depBuilder/depBuilder.js +4 -6
  12. package/dist/depBuilder/getESBuildEntry.d.ts +0 -1
  13. package/dist/depBuilder/getESBuildEntry.js +18 -5
  14. package/dist/depInfo.d.ts +0 -1
  15. package/dist/depInfo.js +2 -0
  16. package/dist/esbuildHandlers/autoCssModules.d.ts +2 -0
  17. package/dist/esbuildHandlers/autoCssModules.js +24 -0
  18. package/dist/esbuildHandlers/autoExport.d.ts +6 -0
  19. package/dist/esbuildHandlers/autoExport.js +9 -0
  20. package/dist/esbuildHandlers/awaitImport/index.d.ts +12 -0
  21. package/dist/esbuildHandlers/awaitImport/index.js +44 -0
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +10 -1
  24. package/dist/loader/esbuild.d.ts +5 -0
  25. package/dist/loader/esbuild.js +54 -0
  26. package/dist/mfsu.d.ts +9 -5
  27. package/dist/mfsu.js +181 -79
  28. package/dist/moduleGraph.d.ts +2 -1
  29. package/dist/moduleGraph.js +10 -2
  30. package/dist/types.d.ts +12 -0
  31. package/package.json +21 -21
  32. package/dist/babelPlugins/autoExport.d.ts.map +0 -1
  33. package/dist/babelPlugins/awaitImport/awaitImport.d.ts.map +0 -1
  34. package/dist/babelPlugins/awaitImport/checkMatch.d.ts.map +0 -1
  35. package/dist/babelPlugins/awaitImport/getAliasedPath.d.ts.map +0 -1
  36. package/dist/babelPlugins/awaitImport/getRealPath.d.ts.map +0 -1
  37. package/dist/babelPlugins/awaitImport/isExternals.d.ts.map +0 -1
  38. package/dist/babelPlugins/awaitImport/parseSpecifiers.d.ts.map +0 -1
  39. package/dist/constants.d.ts.map +0 -1
  40. package/dist/dep/dep.d.ts.map +0 -1
  41. package/dist/dep/getCJSExports.d.ts.map +0 -1
  42. package/dist/dep/getExposeFromContent.d.ts.map +0 -1
  43. package/dist/dep/getModuleExports.d.ts.map +0 -1
  44. package/dist/depBuilder/depBuilder.d.ts.map +0 -1
  45. package/dist/depBuilder/getESBuildEntry.d.ts.map +0 -1
  46. package/dist/depInfo.d.ts.map +0 -1
  47. package/dist/index.d.ts.map +0 -1
  48. package/dist/mfsu.d.ts.map +0 -1
  49. package/dist/moduleGraph.d.ts.map +0 -1
  50. package/dist/types.d.ts.map +0 -1
  51. package/dist/utils/makeArray.d.ts.map +0 -1
  52. package/dist/utils/trimFileContent.d.ts.map +0 -1
  53. package/dist/webpackPlugins/buildDepPlugin.d.ts.map +0 -1
  54. package/dist/webpackPlugins/depChunkIdPrefixPlugin.d.ts.map +0 -1
  55. package/dist/webpackPlugins/stripSourceMapUrlPlugin.d.ts.map +0 -1
  56. package/dist/webpackPlugins/writeCachePlugin.d.ts.map +0 -1
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,12 +1,13 @@
1
1
  import * as Babel from '@umijs/bundler-utils/compiled/babel/core';
2
2
  import type { IOpts } from './awaitImport';
3
- export declare function checkMatch({ value, path, opts, isExportAll, depth, cache, }: {
3
+ export declare function checkMatch({ value, path, opts, isExportAll, depth, cache, filename, }: {
4
4
  value: string;
5
5
  path?: Babel.NodePath;
6
6
  opts?: IOpts;
7
7
  isExportAll?: boolean;
8
8
  depth?: number;
9
9
  cache?: Map<string, any>;
10
+ filename?: string;
10
11
  }): {
11
12
  isMatch: boolean;
12
13
  replaceValue: string;
@@ -12,7 +12,10 @@ const isExternals_1 = require("./isExternals");
12
12
  // const UNMATCH_LIBS = ['umi', 'dumi', '@alipay/bigfish'];
13
13
  const RE_NODE_MODULES = /node_modules/;
14
14
  const RE_UMI_LOCAL_DEV = /umi(-next)?\/packages\//;
15
- function checkMatch({ value, path, opts, isExportAll, depth, cache, }) {
15
+ function isUmiLocalDev(path) {
16
+ return RE_UMI_LOCAL_DEV.test((0, utils_1.winPath)(path));
17
+ }
18
+ function checkMatch({ value, path, opts, isExportAll, depth, cache, filename, }) {
16
19
  var _a, _b;
17
20
  let isMatch;
18
21
  let replaceValue = '';
@@ -20,6 +23,8 @@ function checkMatch({ value, path, opts, isExportAll, depth, cache, }) {
20
23
  (0, assert_1.default)(depth <= 10, `endless loop detected in checkMatch, please check your alias config.`);
21
24
  opts = opts || {};
22
25
  const remoteName = opts.remoteName || 'mf';
26
+ // FIXME: hard code for vite mode
27
+ value = value.replace(/^@fs\//, '/');
23
28
  if (
24
29
  // unMatch specified libs
25
30
  ((_a = opts.unMatchLibs) === null || _a === void 0 ? void 0 : _a.includes(value)) ||
@@ -38,7 +43,7 @@ function checkMatch({ value, path, opts, isExportAll, depth, cache, }) {
38
43
  isMatch = false;
39
44
  }
40
45
  else if ((0, path_1.isAbsolute)(value)) {
41
- isMatch = RE_NODE_MODULES.test(value) || RE_UMI_LOCAL_DEV.test(value);
46
+ isMatch = RE_NODE_MODULES.test(value) || isUmiLocalDev(value);
42
47
  }
43
48
  else {
44
49
  const aliasedPath = (0, getAliasedPath_1.getAliasedPath)({
@@ -53,6 +58,7 @@ function checkMatch({ value, path, opts, isExportAll, depth, cache, }) {
53
58
  isExportAll,
54
59
  depth: depth + 1,
55
60
  cache,
61
+ filename,
56
62
  });
57
63
  }
58
64
  else {
@@ -63,10 +69,10 @@ function checkMatch({ value, path, opts, isExportAll, depth, cache, }) {
63
69
  isMatch = !!(opts.exportAllMembers && value in opts.exportAllMembers);
64
70
  }
65
71
  if (isMatch) {
66
- replaceValue = `${remoteName}/${value}`;
72
+ replaceValue = `${remoteName}/${(0, utils_1.winPath)(value)}`;
67
73
  }
68
74
  // @ts-ignore
69
- const file = path === null || path === void 0 ? void 0 : path.hub.file.opts.filename;
75
+ const file = (path === null || path === void 0 ? void 0 : path.hub.file.opts.filename) || filename;
70
76
  (_b = opts.onTransformDeps) === null || _b === void 0 ? void 0 : _b.call(opts, {
71
77
  sourceValue: value,
72
78
  replaceValue,
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAliasedPath = void 0;
4
- const path_1 = require("path");
5
4
  function getAliasedPath({ value, alias, }) {
6
5
  const importValue = value;
6
+ // equal alias
7
+ if (alias[value]) {
8
+ return alias[value];
9
+ }
7
10
  for (const key of Object.keys(alias)) {
8
11
  const aliasValue = alias[key];
9
12
  // exact alias
@@ -15,21 +18,13 @@ function getAliasedPath({ value, alias, }) {
15
18
  else
16
19
  continue;
17
20
  }
18
- // e.g. foo: path/to/foo
19
- if (importValue === key) {
20
- return aliasValue;
21
- }
22
21
  // e.g. foo: path/to/foo.js
23
- const slashedKey = isJSFile(aliasValue) ? key : addLastSlash(key);
24
- if (importValue.startsWith(slashedKey)) {
22
+ if (importValue.startsWith(addLastSlash(key))) {
25
23
  return importValue.replace(key, aliasValue);
26
24
  }
27
25
  }
28
26
  }
29
27
  exports.getAliasedPath = getAliasedPath;
30
- function isJSFile(path) {
31
- return ['.js', '.jsx', '.ts', '.tsx'].includes((0, path_1.extname)(path));
32
- }
33
28
  function addLastSlash(path) {
34
29
  return path.endsWith('/') ? path : `${path}/`;
35
30
  }
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/dep/dep.d.ts CHANGED
@@ -23,5 +23,8 @@ export declare class Dep {
23
23
  cwd: string;
24
24
  mfsu: MFSU;
25
25
  }): Dep[];
26
+ static getDepVersion(opts: {
27
+ dep: string;
28
+ cwd: string;
29
+ }): string;
26
30
  }
27
- //# sourceMappingURL=dep.d.ts.map
package/dist/dep/dep.js CHANGED
@@ -13,9 +13,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Dep = void 0;
16
+ const utils_1 = require("@umijs/utils");
16
17
  const assert_1 = __importDefault(require("assert"));
17
18
  const enhanced_resolve_1 = __importDefault(require("enhanced-resolve"));
18
19
  const fs_1 = require("fs");
20
+ const path_1 = require("path");
19
21
  const constants_1 = require("../constants");
20
22
  const trimFileContent_1 = require("../utils/trimFileContent");
21
23
  const getExposeFromContent_1 = require("./getExposeFromContent");
@@ -35,10 +37,10 @@ function resolve(context, path) {
35
37
  }
36
38
  class Dep {
37
39
  constructor(opts) {
38
- this.file = opts.file;
40
+ this.file = (0, utils_1.winPath)(opts.file);
39
41
  this.version = opts.version;
40
42
  this.cwd = opts.cwd;
41
- this.shortFile = this.file.replace(this.cwd, '$CWD$');
43
+ this.shortFile = this.file;
42
44
  this.normalizedFile = this.shortFile.replace(/\//g, '_').replace(/:/g, '_');
43
45
  this.filePath = `${constants_1.MF_VA_PREFIX}${this.normalizedFile}.js`;
44
46
  this.mfsu = opts.mfsu;
@@ -88,5 +90,19 @@ export * from '${this.file}';
88
90
  return new Dep(Object.assign(Object.assign({}, opts.deps[file]), { cwd: opts.cwd, mfsu: opts.mfsu }));
89
91
  });
90
92
  }
93
+ static getDepVersion(opts) {
94
+ // @ts-ignore
95
+ if (!!process.binding('natives')[opts.dep]) {
96
+ return '*';
97
+ }
98
+ const dep = (0, path_1.isAbsolute)(opts.dep)
99
+ ? opts.dep
100
+ : (0, path_1.join)(opts.cwd, 'node_modules', opts.dep);
101
+ const pkg = utils_1.pkgUp.pkgUpSync({
102
+ cwd: dep,
103
+ });
104
+ (0, assert_1.default)(pkg, `package.json not found for ${opts.dep}`);
105
+ return require(pkg).version;
106
+ }
91
107
  }
92
108
  exports.Dep = Dep;
@@ -4,4 +4,3 @@ export declare function getExposeFromContent(opts: {
4
4
  filePath: string;
5
5
  content: string;
6
6
  }): Promise<string>;
7
- //# sourceMappingURL=getExposeFromContent.d.ts.map
@@ -28,4 +28,3 @@ export declare class DepBuilder {
28
28
  }): import("webpack").Configuration;
29
29
  }
30
30
  export {};
31
- //# sourceMappingURL=depBuilder.d.ts.map
@@ -63,11 +63,8 @@ class DepBuilder {
63
63
  entry: {
64
64
  [`${constants_1.MF_VA_PREFIX}remoteEntry`]: entryPath,
65
65
  },
66
- config: {
67
- outputPath: tmpDir,
68
- alias: this.opts.mfsu.alias,
69
- externals: this.opts.mfsu.externals,
70
- },
66
+ config: Object.assign(Object.assign({}, this.opts.mfsu.opts.depBuildConfig), { outputPath: tmpDir, alias: this.opts.mfsu.alias, externals: this.opts.mfsu.externals }),
67
+ inlineStyle: true,
71
68
  });
72
69
  utils_1.logger.event(`[mfsu] compiled with esbuild successfully in ${+new Date() - date} ms`);
73
70
  opts.onBuildComplete();
@@ -101,6 +98,7 @@ class DepBuilder {
101
98
  writeMFFiles(opts) {
102
99
  return __awaiter(this, void 0, void 0, function* () {
103
100
  const tmpBase = this.opts.mfsu.opts.tmpBase;
101
+ utils_1.fsExtra.mkdirpSync(tmpBase);
104
102
  // expose files
105
103
  for (const dep of opts.deps) {
106
104
  const content = yield dep.buildExposeContent();
@@ -147,7 +145,7 @@ class DepBuilder {
147
145
  webpack: this.opts.mfsu.opts.implementor,
148
146
  }));
149
147
  const exposes = opts.deps.reduce((memo, dep) => {
150
- memo[`./${dep.shortFile}`] = (0, path_1.join)(this.opts.mfsu.opts.tmpBase, dep.filePath);
148
+ memo[`./${dep.file}`] = (0, path_1.join)(this.opts.mfsu.opts.tmpBase, dep.filePath);
151
149
  return memo;
152
150
  }, {});
153
151
  depConfig.plugins.push(new this.opts.mfsu.opts.implementor.container.ModuleFederationPlugin({
@@ -2,4 +2,3 @@ import { Dep } from '../dep/dep';
2
2
  export declare function getESBuildEntry(opts: {
3
3
  deps: Dep[];
4
4
  }): string;
5
- //# sourceMappingURL=getESBuildEntry.d.ts.map
@@ -2,6 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getESBuildEntry = void 0;
4
4
  const constants_1 = require("../constants");
5
+ // from typescript `esModuleInterop`
6
+ const ES_INTEROP_FUNC = `__exportStar`;
7
+ const ES_INTEROP_HELPER = `
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var ${ES_INTEROP_FUNC} = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ `;
5
19
  function getESBuildEntry(opts) {
6
20
  return `
7
21
  (function() {
@@ -266,6 +280,7 @@ function getESBuildEntry(opts) {
266
280
  var __webpack_exports__ = {};
267
281
  (function() {
268
282
  var exports = __webpack_exports__;
283
+ ${ES_INTEROP_HELPER}
269
284
  var moduleMap = {
270
285
  ${opts.deps.map(getDepModuleStr).join(',\n')}
271
286
  };
@@ -299,15 +314,13 @@ ${opts.deps.map(getDepModuleStr).join(',\n')}
299
314
  `;
300
315
  }
301
316
  exports.getESBuildEntry = getESBuildEntry;
302
- function normalizeFile(file) {
303
- return file.replace(/\//g, '_');
304
- }
305
317
  function getDepModuleStr(dep) {
306
318
  return `
307
319
  "./${dep.file}": function() {
308
320
  return new Promise(resolve => {
309
- import('./${constants_1.MF_VA_PREFIX}${normalizeFile(dep.file)}.js').then(module => {
310
- resolve(() => module);
321
+ import('./${constants_1.MF_VA_PREFIX}${dep.normalizedFile}.js').then(module => {
322
+ module.default && ${ES_INTEROP_FUNC}(module, module.default);
323
+ resolve(() => module.default || module);
311
324
  });
312
325
  })
313
326
  }
package/dist/depInfo.d.ts CHANGED
@@ -15,4 +15,3 @@ export declare class DepInfo {
15
15
  writeCache(): void;
16
16
  }
17
17
  export {};
18
- //# sourceMappingURL=depInfo.d.ts.map
package/dist/depInfo.js CHANGED
@@ -27,6 +27,7 @@ class DepInfo {
27
27
  }
28
28
  loadCache() {
29
29
  if ((0, fs_1.existsSync)(this.cacheFilePath)) {
30
+ utils_1.logger.info('MFSU restore cache');
30
31
  const { cacheDependency, moduleGraph } = JSON.parse((0, fs_1.readFileSync)(this.cacheFilePath, 'utf-8'));
31
32
  this.cacheDependency = cacheDependency;
32
33
  this.moduleGraph.restore(moduleGraph);
@@ -34,6 +35,7 @@ class DepInfo {
34
35
  }
35
36
  writeCache() {
36
37
  utils_1.fsExtra.mkdirpSync((0, path_1.dirname)(this.cacheFilePath));
38
+ utils_1.logger.info('MFSU write cache');
37
39
  (0, fs_1.writeFileSync)(this.cacheFilePath, JSON.stringify({
38
40
  cacheDependency: this.cacheDependency,
39
41
  moduleGraph: this.moduleGraph.toJSON(),
@@ -0,0 +1,2 @@
1
+ import { IEsbuildLoaderHandlerParams } from '../types';
2
+ export declare function autoCssModulesHandler(opts: IEsbuildLoaderHandlerParams): string;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.autoCssModulesHandler = void 0;
4
+ const utils_1 = require("@umijs/utils");
5
+ const CSS_MODULES_QUERY = '?modules';
6
+ const QUERY_LENGTH = CSS_MODULES_QUERY.length;
7
+ function autoCssModulesHandler(opts) {
8
+ let { code } = opts;
9
+ let offset = 0;
10
+ opts.imports.forEach((i) => {
11
+ if (i.d < 0 && (0, utils_1.isStyleFile)({ filename: i.n })) {
12
+ // import x from './index.less'
13
+ // => import x from '
14
+ const importSegment = code.substring(i.ss + offset, i.s + offset);
15
+ // is css module
16
+ if (~importSegment.indexOf(' from')) {
17
+ code = `${code.substring(0, i.e + offset)}${CSS_MODULES_QUERY}${code.substring(i.e + offset)}`;
18
+ offset += QUERY_LENGTH;
19
+ }
20
+ }
21
+ });
22
+ return code;
23
+ }
24
+ exports.autoCssModulesHandler = autoCssModulesHandler;
@@ -0,0 +1,6 @@
1
+ interface IOpts {
2
+ exports: string[];
3
+ code: string;
4
+ }
5
+ export default function autoExportHandler(opts: IOpts): string;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function autoExportHandler(opts) {
4
+ if (!opts.exports.length) {
5
+ return `${opts.code}\nexport const __mfsu = 1;`;
6
+ }
7
+ return opts.code;
8
+ }
9
+ exports.default = autoExportHandler;
@@ -0,0 +1,12 @@
1
+ import type { ImportSpecifier } from '@umijs/bundler-utils/compiled/es-module-lexer';
2
+ interface IParams {
3
+ cache: Map<string, any>;
4
+ opts: any;
5
+ }
6
+ interface IOpts {
7
+ code: string;
8
+ imports: ImportSpecifier[];
9
+ filePath: string;
10
+ }
11
+ export default function getAwaitImportHandler(params: IParams): (opts: IOpts) => string;
12
+ export {};
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const checkMatch_1 = require("../../babelPlugins/awaitImport/checkMatch");
4
+ function getAwaitImportHandler(params) {
5
+ return function awaitImportHandler(opts) {
6
+ var _a, _b;
7
+ let offset = 0;
8
+ let { code } = opts;
9
+ const { filePath, imports } = opts;
10
+ imports.forEach((i) => {
11
+ if (!i.n)
12
+ return;
13
+ const isLazyImport = i.d > 0;
14
+ const from = i.n;
15
+ const { isMatch, replaceValue } = (0, checkMatch_1.checkMatch)({
16
+ cache: params.cache,
17
+ value: from,
18
+ opts: params.opts,
19
+ filename: filePath,
20
+ });
21
+ if (isMatch) {
22
+ // case: import x from './index.ts';
23
+ // import('./index.ts');
24
+ // import x from '
25
+ // import(
26
+ const preSeg = code.substring(0, i.s + offset);
27
+ // ';
28
+ // );
29
+ const tailSeg = code.substring(i.e + offset);
30
+ const quote = isLazyImport ? '"' : '';
31
+ code = `${preSeg}${quote}${replaceValue}${quote}${tailSeg}`;
32
+ offset += replaceValue.length - from.length;
33
+ }
34
+ });
35
+ if (params.cache.has(filePath)) {
36
+ (_b = (_a = params.opts).onCollect) === null || _b === void 0 ? void 0 : _b.call(_a, {
37
+ file: filePath,
38
+ data: params.cache.get(filePath),
39
+ });
40
+ }
41
+ return code;
42
+ };
43
+ }
44
+ exports.default = getAwaitImportHandler;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './constants';
2
+ export * from './esbuildHandlers/autoCssModules';
3
+ export { esbuildLoader } from './loader/esbuild';
2
4
  export * from './mfsu';
3
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -10,5 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.esbuildLoader = void 0;
13
18
  __exportStar(require("./constants"), exports);
19
+ __exportStar(require("./esbuildHandlers/autoCssModules"), exports);
20
+ // for independent use `esbuild-loader`
21
+ var esbuild_1 = require("./loader/esbuild");
22
+ Object.defineProperty(exports, "esbuildLoader", { enumerable: true, get: function () { return esbuild_1.esbuildLoader; } });
14
23
  __exportStar(require("./mfsu"), exports);
@@ -0,0 +1,5 @@
1
+ import type { LoaderContext } from 'webpack';
2
+ import type { IEsbuildLoaderOpts } from '../types';
3
+ declare function esbuildTranspiler(this: LoaderContext<IEsbuildLoaderOpts>, source: string): Promise<void>;
4
+ export default esbuildTranspiler;
5
+ export declare const esbuildLoader: string;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.esbuildLoader = void 0;
24
+ const es_module_lexer_1 = require("@umijs/bundler-utils/compiled/es-module-lexer");
25
+ const esbuild_1 = require("@umijs/bundler-utils/compiled/esbuild");
26
+ const path_1 = require("path");
27
+ function esbuildTranspiler(source) {
28
+ var _a;
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ const done = this.async();
31
+ const options = this.getOptions();
32
+ const { handler = [], implementation } = options, otherOptions = __rest(options, ["handler", "implementation"]);
33
+ const transform = (implementation === null || implementation === void 0 ? void 0 : implementation.transform) || esbuild_1.transform;
34
+ const filePath = this.resourcePath;
35
+ const ext = (0, path_1.extname)(filePath).slice(1);
36
+ const transformOptions = Object.assign(Object.assign({}, otherOptions), { target: (_a = options.target) !== null && _a !== void 0 ? _a : 'es2015', loader: ext !== null && ext !== void 0 ? ext : 'js', sourcemap: this.sourceMap, sourcefile: filePath });
37
+ try {
38
+ let { code, map } = yield transform(source, transformOptions);
39
+ if (handler.length) {
40
+ yield es_module_lexer_1.init;
41
+ handler.forEach((handle) => {
42
+ const [imports, exports] = (0, es_module_lexer_1.parse)(code);
43
+ code = handle({ code, imports, exports, filePath });
44
+ });
45
+ }
46
+ done(null, code, map && JSON.parse(map));
47
+ }
48
+ catch (error) {
49
+ done(error);
50
+ }
51
+ });
52
+ }
53
+ exports.default = esbuildTranspiler;
54
+ exports.esbuildLoader = __filename;
package/dist/mfsu.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { NextFunction, Request, Response } from 'express';
1
+ import type { NextFunction, Request, Response } from '@umijs/bundler-utils/compiled/express';
2
2
  import webpack, { Configuration } from 'webpack';
3
3
  import autoExport from './babelPlugins/autoExport';
4
4
  import awaitImport from './babelPlugins/awaitImport/awaitImport';
@@ -14,8 +14,10 @@ interface IOpts {
14
14
  mode?: Mode;
15
15
  tmpBase?: string;
16
16
  unMatchLibs?: string[];
17
+ runtimePublicPath?: boolean | string;
17
18
  implementor: typeof webpack;
18
19
  buildDepWithESBuild?: boolean;
20
+ depBuildConfig: any;
19
21
  }
20
22
  export declare class MFSU {
21
23
  opts: IOpts;
@@ -25,13 +27,15 @@ export declare class MFSU {
25
27
  depBuilder: DepBuilder;
26
28
  depConfig: Configuration | null;
27
29
  constructor(opts: IOpts);
30
+ asyncImport(content: string): string;
28
31
  setWebpackConfig(opts: {
29
32
  config: Configuration;
30
33
  depConfig: Configuration;
31
- }): void;
34
+ }): Promise<void>;
32
35
  buildDeps(): Promise<void>;
33
36
  getMiddlewares(): ((req: Request, res: Response, next: NextFunction) => void)[];
34
- getBabelPlugins(): (typeof autoExport | (typeof awaitImport | {
37
+ private getAwaitImportCollectOpts;
38
+ getBabelPlugins(): (typeof autoExport | ({
35
39
  onTransformDeps: () => void;
36
40
  onCollect: ({ file, data, }: {
37
41
  file: string;
@@ -49,7 +53,7 @@ export declare class MFSU {
49
53
  remoteName: string | undefined;
50
54
  alias: Record<string, string>;
51
55
  externals: (Function | Record<string, string>)[];
52
- })[])[];
56
+ } | typeof awaitImport)[])[];
57
+ getEsbuildLoaderHandler(): any[];
53
58
  }
54
59
  export {};
55
- //# sourceMappingURL=mfsu.d.ts.map
package/dist/mfsu.js CHANGED
@@ -13,7 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.MFSU = void 0;
16
+ const bundler_utils_1 = require("@umijs/bundler-utils");
16
17
  const utils_1 = require("@umijs/utils");
18
+ const assert_1 = __importDefault(require("assert"));
17
19
  const fs_1 = require("fs");
18
20
  const path_1 = require("path");
19
21
  const mrmime_1 = require("../compiled/mrmime");
@@ -26,6 +28,8 @@ const constants_1 = require("./constants");
26
28
  const dep_1 = require("./dep/dep");
27
29
  const depBuilder_1 = require("./depBuilder/depBuilder");
28
30
  const depInfo_1 = require("./depInfo");
31
+ const autoExport_2 = __importDefault(require("./esbuildHandlers/autoExport"));
32
+ const awaitImport_2 = __importDefault(require("./esbuildHandlers/awaitImport"));
29
33
  const types_1 = require("./types");
30
34
  const makeArray_1 = require("./utils/makeArray");
31
35
  const buildDepPlugin_1 = require("./webpackPlugins/buildDepPlugin");
@@ -44,68 +48,153 @@ class MFSU {
44
48
  this.opts.cwd = this.opts.cwd || process.cwd();
45
49
  this.depInfo = new depInfo_1.DepInfo({ mfsu: this });
46
50
  this.depBuilder = new depBuilder_1.DepBuilder({ mfsu: this });
51
+ this.depInfo.loadCache();
52
+ }
53
+ // swc don't support top-level await
54
+ // ref: https://github.com/vercel/next.js/issues/31054
55
+ asyncImport(content) {
56
+ return `await import('${(0, utils_1.winPath)(content)}');`;
57
+ // return `(async () => await import('${content}'))();`;
47
58
  }
48
59
  setWebpackConfig(opts) {
49
60
  var _a;
50
- const { mfName } = this.opts;
51
- /**
52
- * config
53
- */
54
- // set alias and externals with reference for babel plugin
55
- Object.assign(this.alias, ((_a = opts.config.resolve) === null || _a === void 0 ? void 0 : _a.alias) || {});
56
- this.externals.push(...(0, makeArray_1.makeArray)(opts.config.externals || []));
57
- // entry
58
- const entry = {};
59
- const virtualModules = {};
60
- Object.keys(opts.config.entry).forEach((key) => {
61
- const virtualPath = `./mfsu-virtual-entry/${key}.js`;
62
- virtualModules[virtualPath] =
63
- // @ts-ignore
64
- opts.config
65
- .entry[key].map((entry) => `await import('${entry}')`)
66
- .join('\n') + `\nexport default 1;`;
67
- entry[key] = virtualPath;
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const { mfName } = this.opts;
63
+ /**
64
+ * config
65
+ */
66
+ // set alias and externals with reference for babel plugin
67
+ Object.assign(this.alias, ((_a = opts.config.resolve) === null || _a === void 0 ? void 0 : _a.alias) || {});
68
+ this.externals.push(...(0, makeArray_1.makeArray)(opts.config.externals || []));
69
+ // entry
70
+ const entry = {};
71
+ const virtualModules = {};
72
+ // ensure entry object type
73
+ const entryObject = utils_1.lodash.isString(opts.config.entry)
74
+ ? { default: [opts.config.entry] }
75
+ : opts.config.entry;
76
+ (0, assert_1.default)(utils_1.lodash.isPlainObject(entryObject), `webpack config 'entry' value must be a string or an object.`);
77
+ for (const key of Object.keys(entryObject)) {
78
+ const virtualPath = `./mfsu-virtual-entry/${key}.js`;
79
+ const virtualContent = [];
80
+ let index = 1;
81
+ let hasDefaultExport = false;
82
+ const entryFiles = utils_1.lodash.isArray(entryObject[key])
83
+ ? entryObject[key]
84
+ : [entryObject[key]];
85
+ for (let entry of entryFiles) {
86
+ // ensure entry is a file
87
+ if ((0, fs_1.statSync)(entry).isDirectory()) {
88
+ const realEntry = (0, utils_1.tryPaths)([
89
+ (0, path_1.join)(entry, 'index.tsx'),
90
+ (0, path_1.join)(entry, 'index.ts'),
91
+ ]);
92
+ (0, assert_1.default)(realEntry, `entry file not found, please configure the specific entry path. (e.g. 'src/index.tsx')`);
93
+ entry = realEntry;
94
+ }
95
+ const content = (0, fs_1.readFileSync)(entry, 'utf-8');
96
+ const [_imports, exports] = yield (0, bundler_utils_1.parseModule)({ content, path: entry });
97
+ if (exports.length) {
98
+ virtualContent.push(`const k${index} = ${this.asyncImport(entry)}`);
99
+ for (const exportName of exports) {
100
+ if (exportName === 'default') {
101
+ hasDefaultExport = true;
102
+ virtualContent.push(`export default k${index}.${exportName}`);
103
+ }
104
+ else {
105
+ virtualContent.push(`export const ${exportName} = k${index}.${exportName}`);
106
+ }
107
+ }
108
+ }
109
+ else {
110
+ virtualContent.push(this.asyncImport(entry));
111
+ }
112
+ index += 1;
113
+ }
114
+ if (!hasDefaultExport) {
115
+ virtualContent.push(`export default 1;`);
116
+ }
117
+ virtualModules[virtualPath] = virtualContent.join('\n');
118
+ entry[key] = virtualPath;
119
+ }
120
+ opts.config.entry = entry;
121
+ // plugins
122
+ opts.config.plugins = opts.config.plugins || [];
123
+ // support publicPath auto
124
+ let publicPath = opts.config.output.publicPath;
125
+ if (publicPath === 'auto') {
126
+ publicPath = '/';
127
+ }
128
+ opts.config.plugins.push(...[
129
+ new webpack_virtual_modules_1.default(virtualModules),
130
+ new this.opts.implementor.container.ModuleFederationPlugin({
131
+ name: '__',
132
+ remotes: {
133
+ [mfName]: this.opts.runtimePublicPath
134
+ ? // ref:
135
+ // https://webpack.js.org/concepts/module-federation/#promise-based-dynamic-remotes
136
+ `
137
+ promise new Promise(resolve => {
138
+ const remoteUrlWithVersion = window.publicPath + '${constants_1.REMOTE_FILE_FULL}';
139
+ const script = document.createElement('script');
140
+ script.src = remoteUrlWithVersion;
141
+ script.onload = () => {
142
+ // the injected script has loaded and is available on window
143
+ // we can now resolve this Promise
144
+ const proxy = {
145
+ get: (request) => window['${mfName}'].get(request),
146
+ init: (arg) => {
147
+ try {
148
+ return window['${mfName}'].init(arg);
149
+ } catch(e) {
150
+ console.log('remote container already initialized');
151
+ }
152
+ }
153
+ }
154
+ resolve(proxy);
155
+ }
156
+ // inject this script with the src set to the versioned remoteEntry.js
157
+ document.head.appendChild(script);
158
+ })
159
+ `.trimLeft()
160
+ : `${mfName}@${publicPath}${constants_1.REMOTE_FILE_FULL}`,
161
+ },
162
+ }),
163
+ new buildDepPlugin_1.BuildDepPlugin({
164
+ onCompileDone: () => {
165
+ this.buildDeps().catch((e) => {
166
+ utils_1.logger.error(e);
167
+ });
168
+ },
169
+ }),
170
+ new writeCachePlugin_1.WriteCachePlugin({
171
+ onWriteCache: utils_1.lodash.debounce(() => {
172
+ this.depInfo.writeCache();
173
+ }, 300),
174
+ }),
175
+ ]);
176
+ // ensure topLevelAwait enabled
177
+ utils_1.lodash.set(opts.config, 'experiments.topLevelAwait', true);
178
+ /**
179
+ * depConfig
180
+ */
181
+ this.depConfig = opts.depConfig;
68
182
  });
69
- opts.config.entry = entry;
70
- // plugins
71
- opts.config.plugins = opts.config.plugins || [];
72
- opts.config.plugins.push(...[
73
- new webpack_virtual_modules_1.default(virtualModules),
74
- new this.opts.implementor.container.ModuleFederationPlugin({
75
- name: '__',
76
- remotes: {
77
- // TODO: support runtime public path
78
- [mfName]: `${mfName}@${opts.config.output.publicPath}${constants_1.REMOTE_FILE_FULL}`,
79
- },
80
- }),
81
- new buildDepPlugin_1.BuildDepPlugin({
82
- onCompileDone: () => {
83
- this.buildDeps().catch((e) => {
84
- utils_1.logger.error(e);
85
- });
86
- },
87
- }),
88
- new writeCachePlugin_1.WriteCachePlugin({
89
- onWriteCache: () => {
90
- this.depInfo.writeCache();
91
- },
92
- }),
93
- ]);
94
- /**
95
- * depConfig
96
- */
97
- this.depConfig = opts.depConfig;
98
183
  }
99
184
  buildDeps() {
100
185
  return __awaiter(this, void 0, void 0, function* () {
101
- if (!this.depInfo.shouldBuild())
186
+ if (!this.depInfo.shouldBuild()) {
187
+ utils_1.logger.info('MFSU skip buildDeps');
102
188
  return;
189
+ }
103
190
  this.depInfo.snapshot();
104
191
  const deps = dep_1.Dep.buildDeps({
105
192
  deps: this.depInfo.moduleGraph.depSnapshotModules,
106
193
  cwd: this.opts.cwd,
107
194
  mfsu: this,
108
195
  });
196
+ utils_1.logger.info('MFSU buildDeps');
197
+ utils_1.logger.debug(deps.map((dep) => dep.file).join(', '));
109
198
  yield this.depBuilder.build({
110
199
  deps,
111
200
  });
@@ -125,7 +214,7 @@ class MFSU {
125
214
  }
126
215
  res.setHeader('content-type', (0, mrmime_1.lookup)((0, path_1.extname)(req.path)) || 'text/plain');
127
216
  const relativePath = req.path.replace(new RegExp(`^${publicPath}`), '/');
128
- const content = (0, fs_1.readFileSync)((0, path_1.join)(this.opts.tmpBase, relativePath), 'utf-8');
217
+ const content = (0, fs_1.readFileSync)((0, path_1.join)(this.opts.tmpBase, relativePath));
129
218
  res.send(content);
130
219
  });
131
220
  }
@@ -135,38 +224,51 @@ class MFSU {
135
224
  },
136
225
  ];
137
226
  }
227
+ getAwaitImportCollectOpts() {
228
+ return {
229
+ onTransformDeps: () => { },
230
+ onCollect: ({ file, data, }) => {
231
+ this.depInfo.moduleGraph.onFileChange({
232
+ file,
233
+ // @ts-ignore
234
+ deps: [
235
+ ...Array.from(data.matched).map((item) => ({
236
+ file: item.sourceValue,
237
+ isDependency: true,
238
+ version: dep_1.Dep.getDepVersion({
239
+ dep: item.sourceValue,
240
+ cwd: this.opts.cwd,
241
+ }),
242
+ })),
243
+ ...Array.from(data.unMatched).map((item) => ({
244
+ file: (0, getRealPath_1.getRealPath)({
245
+ file,
246
+ dep: item.sourceValue,
247
+ }),
248
+ isDependency: false,
249
+ })),
250
+ ],
251
+ });
252
+ },
253
+ exportAllMembers: this.opts.exportAllMembers,
254
+ unMatchLibs: this.opts.unMatchLibs,
255
+ remoteName: this.opts.mfName,
256
+ alias: this.alias,
257
+ externals: this.externals,
258
+ };
259
+ }
138
260
  getBabelPlugins() {
261
+ return [autoExport_1.default, [awaitImport_1.default, this.getAwaitImportCollectOpts()]];
262
+ }
263
+ getEsbuildLoaderHandler() {
264
+ const cache = new Map();
265
+ const checkOpts = this.getAwaitImportCollectOpts();
139
266
  return [
140
- autoExport_1.default,
141
- [
142
- awaitImport_1.default,
143
- {
144
- onTransformDeps: () => { },
145
- onCollect: ({ file, data, }) => {
146
- this.depInfo.moduleGraph.onFileChange({
147
- file,
148
- deps: [
149
- ...Array.from(data.matched).map((item) => ({
150
- file: item.sourceValue,
151
- isDependency: true,
152
- })),
153
- ...Array.from(data.unMatched).map((item) => ({
154
- file: (0, getRealPath_1.getRealPath)({
155
- file,
156
- dep: item.sourceValue,
157
- }),
158
- isDependency: false,
159
- })),
160
- ],
161
- });
162
- },
163
- exportAllMembers: this.opts.exportAllMembers,
164
- unMatchLibs: this.opts.unMatchLibs,
165
- remoteName: this.opts.mfName,
166
- alias: this.alias,
167
- externals: this.externals,
168
- },
169
- ],
267
+ autoExport_2.default,
268
+ (0, awaitImport_2.default)({
269
+ cache,
270
+ opts: checkOpts,
271
+ }),
170
272
  ];
171
273
  }
172
274
  }
@@ -30,7 +30,8 @@ export declare class ModuleGraph {
30
30
  toJSON(): {
31
31
  roots: string[];
32
32
  fileModules: Record<string, {
33
- importModules: string[];
33
+ importedModules: string[];
34
+ isRoot?: boolean | undefined;
34
35
  }>;
35
36
  depModules: Record<string, {
36
37
  version: string | null;
@@ -20,7 +20,12 @@ class ModuleGraph {
20
20
  this.rootModules = new Set();
21
21
  }
22
22
  restore(data) {
23
+ let fileMap = new Map();
23
24
  const addNode = ({ file, importer }) => {
25
+ // fix circular dependency
26
+ if (fileMap.has(file))
27
+ return;
28
+ fileMap.set(file, true);
24
29
  const mod = new ModuleNode(file);
25
30
  let isDependency = false;
26
31
  let info;
@@ -33,8 +38,10 @@ class ModuleGraph {
33
38
  }
34
39
  if (info.isRoot)
35
40
  mod.isRoot = true;
36
- if (importer)
41
+ if (importer) {
37
42
  mod.importers.add(importer);
43
+ importer.importedModules.add(mod);
44
+ }
38
45
  mod.isDependency = isDependency;
39
46
  if (info.version !== undefined) {
40
47
  mod.version = info.version;
@@ -65,9 +72,10 @@ class ModuleGraph {
65
72
  });
66
73
  this.fileToModules.forEach((value, key) => {
67
74
  fileModules[key] = {
68
- importModules: Array.from(value.importedModules).map((item) => item.file),
75
+ importedModules: Array.from(value.importedModules).map((item) => item.file),
69
76
  };
70
77
  if (value.isRoot) {
78
+ fileModules[key].isRoot = true;
71
79
  roots.push(key);
72
80
  }
73
81
  });
package/dist/types.d.ts CHANGED
@@ -1,4 +1,16 @@
1
+ import type { ImportSpecifier } from '@umijs/bundler-utils/compiled/es-module-lexer';
2
+ import type { TransformOptions } from '@umijs/bundler-utils/compiled/esbuild';
1
3
  export declare enum Mode {
2
4
  development = "development",
3
5
  production = "production"
4
6
  }
7
+ export interface IEsbuildLoaderHandlerParams {
8
+ code: string;
9
+ filePath: string;
10
+ imports: readonly ImportSpecifier[];
11
+ exports: readonly string[];
12
+ }
13
+ export interface IEsbuildLoaderOpts extends Partial<TransformOptions> {
14
+ handler?: Array<(opts: IEsbuildLoaderHandlerParams) => string>;
15
+ implementation?: typeof import('@umijs/bundler-utils/compiled/esbuild');
16
+ }
package/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "@umijs/mfsu",
3
- "version": "4.0.0-beta.8",
3
+ "version": "4.0.0-canary.20220317.1",
4
4
  "description": "@umijs/mfsu",
5
+ "homepage": "https://github.com/umijs/umi-next/tree/master/packages/mfsu#readme",
6
+ "bugs": "https://github.com/umijs/umi-next/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/umijs/umi-next"
10
+ },
11
+ "license": "MIT",
5
12
  "main": "dist/index.js",
6
13
  "types": "dist/index.d.ts",
7
14
  "files": [
@@ -11,33 +18,26 @@
11
18
  "scripts": {
12
19
  "build": "pnpm tsc",
13
20
  "build:deps": "pnpm esno ../../scripts/bundleDeps.ts",
14
- "dev": "pnpm build -- --watch"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/umijs/umi-next"
19
- },
20
- "authors": [
21
- "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
22
- ],
23
- "license": "MIT",
24
- "bugs": "https://github.com/umijs/umi-next/issues",
25
- "homepage": "https://github.com/umijs/umi-next/tree/master/packages/mfsu#readme",
26
- "publishConfig": {
27
- "access": "public"
21
+ "dev": "pnpm build -- --watch",
22
+ "test": "jest -c ../../jest.turbo.config.ts"
28
23
  },
29
24
  "dependencies": {
30
- "@umijs/bundler-esbuild": "4.0.0-beta.8",
31
- "@umijs/bundler-utils": "4.0.0-beta.8",
32
- "@umijs/utils": "4.0.0-beta.8"
25
+ "@umijs/bundler-esbuild": "4.0.0-canary.20220317.1",
26
+ "@umijs/bundler-utils": "4.0.0-canary.20220317.1",
27
+ "@umijs/utils": "4.0.0-canary.20220317.1",
28
+ "enhanced-resolve": "5.9.2"
33
29
  },
34
30
  "devDependencies": {
35
- "@types/express": "4.17.13",
36
- "enhanced-resolve": "5.8.3",
37
31
  "mrmime": "1.0.0",
38
- "webpack": "5.61.0",
32
+ "webpack": "5.70.0",
39
33
  "webpack-virtual-modules": "0.4.3"
40
34
  },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "authors": [
39
+ "chencheng <sorrycc@gmail.com> (https://github.com/sorrycc)"
40
+ ],
41
41
  "compiledConfig": {
42
42
  "deps": [
43
43
  "mrmime",
@@ -1 +0,0 @@
1
- {"version":3,"file":"autoExport.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/autoExport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,0CAA0C,CAAC;AAClE,OAAO,KAAK,CAAC,MAAM,2CAA2C,CAAC;AAE/D,MAAM,CAAC,OAAO;;sBAGM,MAAM,QAAQ,CAAC,EAAE,OAAO,CAAC;;EA2C5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"awaitImport.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/awaitImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,0CAA0C,CAAC;AAClE,OAAO,KAAK,CAAC,MAAM,2CAA2C,CAAC;AAG/D,MAAM,WAAW,KAAK;IACpB,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,CAAC,OAAO;;gBAME,GAAG;;;uBAaA,MAAM,QAAQ,CAAC,EAAE,OAAO,CAAC;sBAAoB,KAAK;;;;uBAwDrD,MAAM,QAAQ,CAAC,EAAE,cAAc,CAAC;sBACpB,KAAK;;;;EAuBhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkMatch.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/checkMatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,0CAA0C,CAAC;AAIlE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQ3C,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1B,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAoG7C;AAGD,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,UAQtE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAliasedPath.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/getAliasedPath.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,sBAwBA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRealPath.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/getRealPath.ts"],"names":[],"mappings":"AAKA,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,iBAe9D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isExternals.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/isExternals.ts"],"names":[],"mappings":"AAAA,aAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC;AACnD,aAAK,UAAU,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;AAE1C,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,UAAU,CAAC;CACvB,WAQA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB,WAYA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseSpecifiers.d.ts","sourceRoot":"","sources":["../../../src/babelPlugins/awaitImport/parseSpecifiers.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,UAAU,EAAE,GAAG,EAAE,OAyBhD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,eAAe,OAAO,CAAC;AACpC,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAC5C,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAC5C,eAAO,MAAM,gBAAgB,QAAkC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dep.d.ts","sourceRoot":"","sources":["../../src/dep/dep.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAoB/B,qBAAa,GAAG;IACP,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;gBACN,IAAI,EAAE;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC;KACZ;IAUK,kBAAkB;IA8BlB,WAAW;IAUjB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;QACrB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACxD,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC;KACZ;CASF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCJSExports.d.ts","sourceRoot":"","sources":["../../src/dep/getCJSExports.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,YAoE7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getExposeFromContent.d.ts","sourceRoot":"","sources":["../../src/dep/getExposeFromContent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,mBAoEA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getModuleExports.d.ts","sourceRoot":"","sources":["../../src/dep/getModuleExports.ts"],"names":[],"mappings":"AAKA,wBAAsB,gBAAgB,CAAC,EACrC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;;;GA4BA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"depBuilder.d.ts","sourceRoot":"","sources":["../../src/depBuilder/depBuilder.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,UAAU;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,WAAW,EAAE,QAAQ,EAAE,CAAM;IAC7B,UAAU,UAAS;gBACd,IAAI,EAAE,KAAK;IAIjB,gBAAgB,CAAC,IAAI,EAAE;QAAE,eAAe,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,GAAG,EAAE,CAAA;KAAE;IAwBjE,gBAAgB,CAAC,IAAI,EAAE;QAAE,eAAe,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,GAAG,EAAE,CAAA;KAAE;IAwBjE,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAA;KAAE;IAkBjC,eAAe,CAAC,EAAE,EAAE,QAAQ;IAQtB,YAAY,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAA;KAAE;IAaxC,gBAAgB,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,GAAG,EAAE,CAAA;KAAE;CA0DvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getESBuildEntry.d.ts","sourceRoot":"","sources":["../../src/depBuilder/getESBuildEntry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,UAuSpD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"depInfo.d.ts","sourceRoot":"","sources":["../src/depInfo.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,qBAAa,OAAO;IAClB,OAAO,CAAC,IAAI,CAAQ;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAqB;IAC7C,eAAe,EAAE,MAAM,CAAM;gBACxB,IAAI,EAAE,KAAK;IAKvB,WAAW;IAiBX,QAAQ;IAKR,SAAS;IAUT,UAAU;CAeX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mfsu.d.ts","sourceRoot":"","sources":["../src/mfsu.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG/D,OAAO,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAYjE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAK/B,UAAU,KAAK;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,IAAI;IACR,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IACnC,SAAS,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAM;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,aAAa,GAAG,IAAI,CAAQ;gBAClC,IAAI,EAAE,KAAK;IAYvB,gBAAgB,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAyDpE,SAAS;IAaf,cAAc,WAEJ,OAAO,OAAO,QAAQ,QAAQ,YAAY;IAgCpD,eAAe;;;kBAWC,MAAM;kBACN;gBACJ,SAAS,EAAE,IAAI;oBAAE,WAAW,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAC;gBACxC,OAAO,EAAE,IAAI;oBAAE,WAAW,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAC;aACvC;;;;;;;;CA4BZ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"moduleGraph.d.ts","sourceRoot":"","sources":["../src/moduleGraph.ts"],"names":[],"mappings":"AAEA,cAAM,UAAU;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,kBAAyB;IAClC,eAAe,kBAAyB;IACxC,YAAY,EAAE,OAAO,CAAS;IAC9B,MAAM,EAAE,OAAO,CAAS;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAClB,IAAI,EAAE,MAAM;CAGzB;AAED,UAAU,IAAI;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,WAAW;IACtB,aAAa,0BAAiC;IAC9C,YAAY,0BAAiC;IAC7C,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;IAC3E,WAAW,kBAAyB;;IAGpC,OAAO,CAAC,IAAI,EAAE;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,WAAW,EAAE,GAAG,CAAC;QACjB,UAAU,EAAE,GAAG,CAAC;QAChB,kBAAkB,EAAE,GAAG,CAAC;KACzB;IAiCD,MAAM;;;2BAE+C,MAAM,EAAE;;;qBACf,MAAM,GAAG,IAAI;;;;;;;IAwB3D,YAAY;IAIZ,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC;cAEd,MAAM;iBAAW,MAAM;;IAOlD,UAAU,CAAC,GAAG,EAAE,UAAU;;;;IAO1B,aAAa;IAKb,YAAY,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,IAAI,EAAE,CAAA;KAAE;IAuBjD,YAAY,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,UAAU,CAAC;QAAC,IAAI,EAAE,IAAI,EAAE,CAAA;KAAE;IA8BpD,OAAO,CAAC,IAAI,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,OAAO,CAAC;QACtB,QAAQ,EAAE,UAAU,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB;IAoBD,UAAU,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,UAAU,CAAA;KAAE;CAiB3D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI;IACd,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"makeArray.d.ts","sourceRoot":"","sources":["../../src/utils/makeArray.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,SAElC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"trimFileContent.d.ts","sourceRoot":"","sources":["../../src/utils/trimFileContent.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,UAE9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildDepPlugin.d.ts","sourceRoot":"","sources":["../../src/webpackPlugins/buildDepPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAS,MAAM,SAAS,CAAC;AAE/C,UAAU,KAAK;IACb,aAAa,EAAE,QAAQ,CAAC;CACzB;AAID,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAQ;gBACR,IAAI,EAAE,KAAK;IAGvB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAOhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"depChunkIdPrefixPlugin.d.ts","sourceRoot":"","sources":["../../src/webpackPlugins/depChunkIdPrefixPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,qBAAa,sBAAsB;;IAEjC,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAUzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"stripSourceMapUrlPlugin.d.ts","sourceRoot":"","sources":["../../src/webpackPlugins/stripSourceMapUrlPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,KAAK;IACb,OAAO,EAAE,GAAG,CAAC;CACd;AAED,qBAAa,uBAAuB;IAClC,IAAI,EAAE,KAAK,CAAC;gBACA,IAAI,EAAE,KAAK;IAIvB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAyBhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"writeCachePlugin.d.ts","sourceRoot":"","sources":["../../src/webpackPlugins/writeCachePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,KAAK;IACb,YAAY,EAAE,QAAQ,CAAC;CACxB;AAID,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAQ;gBACR,IAAI,EAAE,KAAK;IAGvB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAQhC"}