@module-federation/devtools 0.8.4 → 0.8.6

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/es/App.js CHANGED
@@ -14,7 +14,8 @@ const App = (props) => {
14
14
  setVersionList,
15
15
  getVersion,
16
16
  handleSnapshot,
17
- handleProxyAddress
17
+ handleProxyAddress,
18
+ customValueValidate
18
19
  } = props;
19
20
  const [module, setModule] = useState(((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo) || {});
20
21
  useEffect(() => {
@@ -28,7 +29,8 @@ const App = (props) => {
28
29
  setVersionList,
29
30
  getVersion,
30
31
  handleSnapshot,
31
- handleProxyAddress
32
+ handleProxyAddress,
33
+ customValueValidate
32
34
  }
33
35
  ) : /* @__PURE__ */ jsx(Empty, { description: "No ModuleInfo Detected" }) }) }) });
34
36
  };
@@ -59,7 +59,8 @@ const FormComponent = (props) => {
59
59
  onHMRChange,
60
60
  versionList,
61
61
  setVersionList,
62
- getVersion
62
+ getVersion,
63
+ customValueValidate
63
64
  } = props;
64
65
  const { moduleInfo } = window.__FEDERATION__;
65
66
  let { producer } = separateType(moduleInfo);
@@ -131,7 +132,7 @@ const FormComponent = (props) => {
131
132
  valueStatus: false
132
133
  };
133
134
  }
134
- if (validateCustom(value) || validateSemver(value) || validatePort(value)) {
135
+ if (validateCustom(value) || validateSemver(value) || validatePort(value) || (customValueValidate == null ? void 0 : customValueValidate(value))) {
135
136
  statusSet[index].valueStatus = true;
136
137
  flushSync(() => setFormStatus(statusSet));
137
138
  return callback();
@@ -57,7 +57,8 @@ const Layout = (props) => {
57
57
  versionList,
58
58
  setVersionList,
59
59
  getVersion,
60
- handleProxyAddress
60
+ handleProxyAddress,
61
+ customValueValidate
61
62
  } = props;
62
63
  const { producer } = separateType(moduleInfo);
63
64
  const [condition, setCondition] = useState(statusInfo.processing);
@@ -198,7 +199,8 @@ const Layout = (props) => {
198
199
  onHMRChange,
199
200
  versionList,
200
201
  setVersionList,
201
- getVersion
202
+ getVersion,
203
+ customValueValidate
202
204
  }
203
205
  )
204
206
  }
package/dist/lib/App.js CHANGED
@@ -47,7 +47,8 @@ const App = (props) => {
47
47
  setVersionList,
48
48
  getVersion,
49
49
  handleSnapshot,
50
- handleProxyAddress
50
+ handleProxyAddress,
51
+ customValueValidate
51
52
  } = props;
52
53
  const [module2, setModule] = (0, import_react.useState)(((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo) || {});
53
54
  (0, import_react.useEffect)(() => {
@@ -61,7 +62,8 @@ const App = (props) => {
61
62
  setVersionList,
62
63
  getVersion,
63
64
  handleSnapshot,
64
- handleProxyAddress
65
+ handleProxyAddress,
66
+ customValueValidate
65
67
  }
66
68
  ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Empty, { description: "No ModuleInfo Detected" }) }) }) });
67
69
  };
@@ -73,7 +73,8 @@ const FormComponent = (props) => {
73
73
  onHMRChange,
74
74
  versionList,
75
75
  setVersionList,
76
- getVersion
76
+ getVersion,
77
+ customValueValidate
77
78
  } = props;
78
79
  const { moduleInfo } = window.__FEDERATION__;
79
80
  let { producer } = (0, import_utils.separateType)(moduleInfo);
@@ -145,7 +146,7 @@ const FormComponent = (props) => {
145
146
  valueStatus: false
146
147
  };
147
148
  }
148
- if ((0, import_utils.validateCustom)(value) || (0, import_utils.validateSemver)(value) || (0, import_utils.validatePort)(value)) {
149
+ if ((0, import_utils.validateCustom)(value) || (0, import_utils.validateSemver)(value) || (0, import_utils.validatePort)(value) || (customValueValidate == null ? void 0 : customValueValidate(value))) {
149
150
  statusSet[index].valueStatus = true;
150
151
  (0, import_react_dom.flushSync)(() => setFormStatus(statusSet));
151
152
  return callback();
@@ -67,7 +67,8 @@ const Layout = (props) => {
67
67
  versionList,
68
68
  setVersionList,
69
69
  getVersion,
70
- handleProxyAddress
70
+ handleProxyAddress,
71
+ customValueValidate
71
72
  } = props;
72
73
  const { producer } = (0, import_utils.separateType)(moduleInfo);
73
74
  const [condition, setCondition] = (0, import_react.useState)(import_constant.statusInfo.processing);
@@ -208,7 +209,8 @@ const Layout = (props) => {
208
209
  onHMRChange,
209
210
  versionList,
210
211
  setVersionList,
211
- getVersion
212
+ getVersion,
213
+ customValueValidate
212
214
  }
213
215
  )
214
216
  }
@@ -12,5 +12,6 @@ export interface RootComponentProps {
12
12
  setVersionList?: React.Dispatch<React.SetStateAction<Array<Array<string>>>>;
13
13
  getVersion?: (moduleName: string) => Promise<Array<string>>;
14
14
  handleProxyAddress?: (address: string) => string;
15
+ customValueValidate?: (schema: string) => boolean;
15
16
  }
16
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/devtools",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,7 +44,7 @@
44
44
  "react": "~18.3.1",
45
45
  "react-dom": "~18.3.1",
46
46
  "reactflow": "11.11.4",
47
- "@module-federation/sdk": "0.8.4"
47
+ "@module-federation/sdk": "0.8.6"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@modern-js-app/eslint-config": "2.54.6",
@@ -67,7 +67,7 @@
67
67
  "rimraf": "~3.0.2",
68
68
  "typescript": "~5.0.4",
69
69
  "vitest": "1.2.2",
70
- "@module-federation/runtime": "0.8.4"
70
+ "@module-federation/runtime": "0.8.6"
71
71
  },
72
72
  "scripts": {
73
73
  "build:storybook": "storybook build",