@module-federation/devtools 0.0.0-next-20240425095630 → 0.0.0-next-20240429033452

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/README.md CHANGED
@@ -4,27 +4,4 @@
4
4
  * Proxy online Module Federation remote module to local
5
5
  * Let proxied remote module get hmr
6
6
 
7
- ## Setup
8
-
9
- ```bash
10
- pnpm install
11
- ```
12
-
13
- ## Run
14
-
15
- ```bash
16
- pnpm dev
17
- ```
18
-
19
- ## Build
20
-
21
- ```bash
22
- pnpm run build
23
- ```
24
-
25
- ## Test
26
-
27
- ```bash
28
- pnpm run test
29
- ```
30
-
7
+ https://module-federation.io/
@@ -58,7 +58,7 @@ const GraphItem = (props) => {
58
58
  return /* @__PURE__ */ jsx("span", { className: styles.item, children: shared }, index);
59
59
  }) })
60
60
  ] }) : null,
61
- /* @__PURE__ */ jsxs("div", { children: [
61
+ /* @__PURE__ */ jsxs("div", { className: styles.message, children: [
62
62
  /* @__PURE__ */ jsx("span", { className: styles.type, children: isEntryType ? "Entry" : "Version" }),
63
63
  /* @__PURE__ */ jsx("span", { className: styles.item, children: version })
64
64
  ] })
@@ -1,5 +1,5 @@
1
1
  import "./index_module.css";
2
- var index_module_default = { "Wrapper": "Wrapper_2fa4f", "container": "container_2fa4f", "group": "group_2fa4f", "name": "name_2fa4f", "info": "info_2fa4f", "expose-container": "expose-container_2fa4f", "type": "type_2fa4f", "item": "item_2fa4f" };
2
+ var index_module_default = { "Wrapper": "Wrapper_2fa4f", "container": "container_2fa4f", "group": "group_2fa4f", "name": "name_2fa4f", "info": "info_2fa4f", "expose-container": "expose-container_2fa4f", "type": "type_2fa4f", "item": "item_2fa4f", "message": "message_2fa4f" };
3
3
  export {
4
4
  index_module_default as default
5
5
  };
@@ -53,4 +53,7 @@
53
53
  margin-right: 5px;
54
54
  margin-bottom: 5px;
55
55
  font-weight: 300;
56
+ }
57
+ .Wrapper_2fa4f .container_2fa4f .message_2fa4f {
58
+ display: flex;
56
59
  }
@@ -35,7 +35,7 @@ const getModuleInfo = () => {
35
35
  loadRemoteSnapshot(_a2) {
36
36
  var _b = _a2, { options, moduleInfo, remoteSnapshot } = _b, res = __objRest(_b, ["options", "moduleInfo", "remoteSnapshot"]);
37
37
  const globalSnapshot = helpers.global.getGlobalSnapshot();
38
- if (options.inBrowser) {
38
+ if (!options || options.inBrowser) {
39
39
  window.postMessage(
40
40
  {
41
41
  moduleInfo: globalSnapshot,
@@ -7,7 +7,7 @@ const chromeDevtoolsPlugin = function() {
7
7
  name: "mf-chrome-devtools-inject-snapshot-plugin",
8
8
  beforeLoadRemoteSnapshot({ options }) {
9
9
  const { nativeGlobal } = runtimeHelpers.global;
10
- if (options.inBrowser) {
10
+ if (!options || options.inBrowser) {
11
11
  const realLocalStorage = nativeGlobal.localStorage || localStorage;
12
12
  const debugModuleInfoStr = realLocalStorage.getItem(
13
13
  MODULE_DEVTOOL_IDENTIFIER
@@ -91,7 +91,7 @@ const GraphItem = (props) => {
91
91
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.item, children: shared }, index);
92
92
  }) })
93
93
  ] }) : null,
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.message, children: [
95
95
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.type, children: isEntryType ? "Entry" : "Version" }),
96
96
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.item, children: version })
97
97
  ] })
@@ -22,4 +22,4 @@ __export(index_module_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(index_module_exports);
24
24
  var import_index_module = require("./index_module.css");
25
- var index_module_default = { "Wrapper": "Wrapper_2fa4f", "container": "container_2fa4f", "group": "group_2fa4f", "name": "name_2fa4f", "info": "info_2fa4f", "expose-container": "expose-container_2fa4f", "type": "type_2fa4f", "item": "item_2fa4f" };
25
+ var index_module_default = { "Wrapper": "Wrapper_2fa4f", "container": "container_2fa4f", "group": "group_2fa4f", "name": "name_2fa4f", "info": "info_2fa4f", "expose-container": "expose-container_2fa4f", "type": "type_2fa4f", "item": "item_2fa4f", "message": "message_2fa4f" };
@@ -53,4 +53,7 @@
53
53
  margin-right: 5px;
54
54
  margin-bottom: 5px;
55
55
  font-weight: 300;
56
+ }
57
+ .Wrapper_2fa4f .container_2fa4f .message_2fa4f {
58
+ display: flex;
56
59
  }
@@ -56,7 +56,7 @@ const getModuleInfo = () => {
56
56
  loadRemoteSnapshot(_a2) {
57
57
  var _b = _a2, { options, moduleInfo, remoteSnapshot } = _b, res = __objRest(_b, ["options", "moduleInfo", "remoteSnapshot"]);
58
58
  const globalSnapshot = import_helpers.default.global.getGlobalSnapshot();
59
- if (options.inBrowser) {
59
+ if (!options || options.inBrowser) {
60
60
  window.postMessage(
61
61
  {
62
62
  moduleInfo: globalSnapshot,
@@ -30,7 +30,7 @@ const chromeDevtoolsPlugin = function() {
30
30
  name: "mf-chrome-devtools-inject-snapshot-plugin",
31
31
  beforeLoadRemoteSnapshot({ options }) {
32
32
  const { nativeGlobal } = import_helpers.default.global;
33
- if (options.inBrowser) {
33
+ if (!options || options.inBrowser) {
34
34
  const realLocalStorage = nativeGlobal.localStorage || localStorage;
35
35
  const debugModuleInfoStr = realLocalStorage.getItem(
36
36
  import_sdk.MODULE_DEVTOOL_IDENTIFIER
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/devtools",
3
- "version": "0.0.0-next-20240425095630",
3
+ "version": "0.0.0-next-20240429033452",
4
4
  "files": [
5
5
  "dist/",
6
6
  "install-deps.bash",
@@ -38,7 +38,7 @@
38
38
  "react": "~18.2.0",
39
39
  "react-dom": "~18.2.0",
40
40
  "reactflow": "11.10.4",
41
- "@module-federation/sdk": "0.0.0-next-20240425095630"
41
+ "@module-federation/sdk": "0.0.0-next-20240429033452"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/dagre": "^0.7.52",
@@ -61,7 +61,7 @@
61
61
  "vitest": "1.2.2",
62
62
  "@modern-js/storybook": "2.46.1",
63
63
  "@storybook/addon-essentials": "^7",
64
- "@module-federation/runtime": "0.0.0-next-20240425095630"
64
+ "@module-federation/runtime": "0.0.0-next-20240429033452"
65
65
  },
66
66
  "scripts": {
67
67
  "build:storybook": "storybook build",