@module-federation/cli 2.1.0 → 2.2.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.
package/dist/cli.js CHANGED
@@ -98,10 +98,10 @@ function cli(cliOptions) {
98
98
  function runCli(options) {
99
99
  const normalizedOptions = {
100
100
  loggerPrefix: logger_js_namespaceObject.PREFIX,
101
- welcomeMsg: `${`Module Federation v${"2.1.0"}`}\n`,
101
+ welcomeMsg: `${`Module Federation v${"2.2.0"}`}\n`,
102
102
  name: 'mf',
103
103
  readConfig: readConfig_js_namespaceObject.readConfig,
104
- version: "2.1.0",
104
+ version: "2.2.0",
105
105
  applyCommands: ()=>{},
106
106
  ...options
107
107
  };
@@ -6,36 +6,8 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
6
6
  new URL('main.js', document.baseURI).href;
7
7
  })();
8
8
  ;
9
- var __webpack_modules__ = ({
10
- "jiti": (function (module) {
11
- module.exports = require("jiti");
12
-
13
- }),
14
-
15
- });
16
- /************************************************************************/
17
- // The module cache
18
- var __webpack_module_cache__ = {};
19
-
20
- // The require function
21
- function __webpack_require__(moduleId) {
22
-
23
- // Check if module is in cache
24
- var cachedModule = __webpack_module_cache__[moduleId];
25
- if (cachedModule !== undefined) {
26
- return cachedModule.exports;
27
- }
28
- // Create a new module (and put it into the cache)
29
- var module = (__webpack_module_cache__[moduleId] = {
30
- exports: {}
31
- });
32
- // Execute the module function
33
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
34
-
35
- // Return the exports of the module
36
- return module.exports;
37
-
38
- }
9
+ // The require scope
10
+ var __webpack_require__ = {};
39
11
 
40
12
  /************************************************************************/
41
13
  // webpack/runtime/compat_get_default_export
@@ -76,8 +48,6 @@ __webpack_require__.r = (exports) => {
76
48
  })();
77
49
  /************************************************************************/
78
50
  var __webpack_exports__ = {};
79
- // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
80
- (() => {
81
51
  // ESM COMPAT FLAG
82
52
  __webpack_require__.r(__webpack_exports__);
83
53
 
@@ -90,9 +60,11 @@ __webpack_require__.d(__webpack_exports__, {
90
60
  ;// CONCATENATED MODULE: external "path"
91
61
  const external_path_namespaceObject = require("path");
92
62
  var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
63
+ ;// CONCATENATED MODULE: external "jiti"
64
+ const external_jiti_namespaceObject = require("jiti");
93
65
  ;// CONCATENATED MODULE: ./src/utils/readConfig.ts
94
66
 
95
- const { createJiti } = __webpack_require__("jiti");
67
+
96
68
  const DEFAULT_CONFIG_PATH = 'module-federation.config.ts';
97
69
  const getConfigPath = (userConfigPath)=>{
98
70
  const defaultPath = external_path_default().resolve(process.cwd(), DEFAULT_CONFIG_PATH);
@@ -101,17 +73,14 @@ const getConfigPath = (userConfigPath)=>{
101
73
  };
102
74
  async function readConfig(userConfigPath) {
103
75
  const configPath = getConfigPath(userConfigPath);
104
- const jit = createJiti(__filename, {
105
- interopDefault: true,
106
- esmResolve: true
76
+ const jit = (0,external_jiti_namespaceObject.createJiti)(__filename, {
77
+ interopDefault: true
107
78
  });
108
79
  const configModule = await jit(configPath);
109
80
  const resolvedConfig = configModule && typeof configModule === 'object' && 'default' in configModule ? configModule.default : configModule;
110
81
  return resolvedConfig;
111
82
  }
112
83
 
113
- })();
114
-
115
84
  exports.getConfigPath = __webpack_exports__.getConfigPath;
116
85
  exports.readConfig = __webpack_exports__.readConfig;
117
86
  for(var __webpack_i__ in __webpack_exports__) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/cli",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "commonjs",
5
5
  "description": "Module Federation CLI",
6
6
  "homepage": "https://module-federation.io",
@@ -26,8 +26,8 @@
26
26
  "commander": "11.1.0",
27
27
  "chalk": "3.0.0",
28
28
  "jiti": "2.4.2",
29
- "@module-federation/sdk": "2.1.0",
30
- "@module-federation/dts-plugin": "2.1.0"
29
+ "@module-federation/sdk": "2.2.0",
30
+ "@module-federation/dts-plugin": "2.2.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^20.19.5"
@@ -38,5 +38,11 @@
38
38
  "publishConfig": {
39
39
  "access": "public",
40
40
  "registry": "https://registry.npmjs.org/"
41
+ },
42
+ "scripts": {
43
+ "build": "rslib build",
44
+ "lint": "ESLINT_USE_FLAT_CONFIG=false pnpm exec eslint --ignore-pattern node_modules \"**/*.ts\" \"package.json\"",
45
+ "test": "rstest run -c rstest.config.ts",
46
+ "pre-release": "pnpm run test && pnpm run build"
41
47
  }
42
48
  }