@module-federation/devtools 0.22.1 → 0.23.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/es/App.css +6 -5
- package/dist/es/App.js +191 -59
- package/dist/es/App.module.js +1 -1
- package/dist/es/App_module.css +38 -36
- package/dist/es/component/DependencyGraph/index.js +10 -11
- package/dist/es/component/DependencyGraph/index_module.css +20 -17
- package/dist/es/component/DependencyGraphItem/index.js +5 -3
- package/dist/es/component/DependencyGraphItem/index_module.css +7 -7
- package/dist/es/component/Form/index.js +24 -31
- package/dist/es/component/Form/index.module.js +1 -1
- package/dist/es/component/Form/index_module.css +22 -25
- package/dist/es/component/LanguageSwitch.js +50 -0
- package/dist/es/component/Layout/index.js +6 -10
- package/dist/es/component/Layout/index_module.css +7 -7
- package/dist/es/component/ModuleInfo/index.js +65 -41
- package/dist/es/component/ModuleInfo/index_module.css +12 -11
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
- package/dist/es/component/SharedDepsExplorer/index.js +64 -75
- package/dist/es/component/SharedDepsExplorer/index_module.css +12 -2
- package/dist/es/component/ThemeToggle.js +19 -0
- package/dist/es/component/ThemeToggle.module.js +5 -0
- package/dist/es/component/ThemeToggle_module.css +12 -0
- package/dist/es/hooks/useDevtoolsTheme.js +77 -0
- package/dist/es/i18n/index.js +506 -0
- package/dist/lib/App.css +6 -5
- package/dist/lib/App.js +189 -59
- package/dist/lib/App.module.js +1 -1
- package/dist/lib/App_module.css +38 -36
- package/dist/lib/component/DependencyGraph/index.js +10 -11
- package/dist/lib/component/DependencyGraph/index_module.css +20 -17
- package/dist/lib/component/DependencyGraphItem/index.js +5 -3
- package/dist/lib/component/DependencyGraphItem/index_module.css +7 -7
- package/dist/lib/component/Form/index.js +24 -31
- package/dist/lib/component/Form/index.module.js +1 -1
- package/dist/lib/component/Form/index_module.css +22 -25
- package/dist/lib/component/LanguageSwitch.js +80 -0
- package/dist/lib/component/Layout/index.js +6 -10
- package/dist/lib/component/Layout/index_module.css +7 -7
- package/dist/lib/component/ModuleInfo/index.js +65 -41
- package/dist/lib/component/ModuleInfo/index_module.css +12 -11
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
- package/dist/lib/component/SharedDepsExplorer/index.js +64 -75
- package/dist/lib/component/SharedDepsExplorer/index_module.css +12 -2
- package/dist/lib/component/ThemeToggle.js +49 -0
- package/dist/lib/component/ThemeToggle.module.js +25 -0
- package/dist/lib/component/ThemeToggle_module.css +12 -0
- package/dist/lib/hooks/useDevtoolsTheme.js +101 -0
- package/dist/lib/i18n/index.js +540 -0
- package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
- package/dist/types/src/component/ThemeToggle.d.ts +8 -0
- package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
- package/dist/types/src/i18n/index.d.ts +5 -0
- package/package.json +10 -8
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var i18n_exports = {};
|
|
30
|
+
__export(i18n_exports, {
|
|
31
|
+
LANGUAGE_STORAGE_KEY: () => LANGUAGE_STORAGE_KEY,
|
|
32
|
+
default: () => i18n_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(i18n_exports);
|
|
35
|
+
var import_i18next = __toESM(require("i18next"));
|
|
36
|
+
var import_react_i18next = require("react-i18next");
|
|
37
|
+
const LANGUAGE_STORAGE_KEY = "mf-devtools-language";
|
|
38
|
+
const supportedLanguages = ["zh-CN", "en"];
|
|
39
|
+
const resources = {
|
|
40
|
+
en: {
|
|
41
|
+
translation: {
|
|
42
|
+
app: {
|
|
43
|
+
nav: {
|
|
44
|
+
moduleInfo: "Module info",
|
|
45
|
+
proxy: "Proxy",
|
|
46
|
+
dependency: "Dependency graph",
|
|
47
|
+
share: "Shared",
|
|
48
|
+
performance: "Performance"
|
|
49
|
+
},
|
|
50
|
+
header: {
|
|
51
|
+
title: "Module Federation",
|
|
52
|
+
subtitle: "DevTools Companion",
|
|
53
|
+
refresh: {
|
|
54
|
+
label: "Refresh",
|
|
55
|
+
tooltip: "Resync Federation information for the current page."
|
|
56
|
+
},
|
|
57
|
+
scope: {
|
|
58
|
+
label: "Focus Tab",
|
|
59
|
+
waiting: "Waiting for target"
|
|
60
|
+
},
|
|
61
|
+
stats: {
|
|
62
|
+
modules: "Modules",
|
|
63
|
+
remotes: "Remotes",
|
|
64
|
+
consumers: "Consumers"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
performance: {
|
|
68
|
+
placeholder: "WIP..."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
common: {
|
|
72
|
+
empty: {
|
|
73
|
+
noModuleInfo: "No ModuleInfo Detected"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
layout: {
|
|
77
|
+
summary: {
|
|
78
|
+
title: "Remotes in scope",
|
|
79
|
+
hint: "Override manifests to verify integration without redeploying.",
|
|
80
|
+
placeholder: "Waiting for module map",
|
|
81
|
+
more: "+{{count}} more"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
form: {
|
|
85
|
+
title: "Proxy Overrides",
|
|
86
|
+
subtitle: "Point consumers to specific remote bundles or manifests for quicker validation.",
|
|
87
|
+
tooltip: {
|
|
88
|
+
proxyExample: 'Example: Customise the remote module address ending with ".json". For instance key: @module-federation/button, value: http://localhost:3000/mf-manifest.json'
|
|
89
|
+
},
|
|
90
|
+
clip: {
|
|
91
|
+
enable: "Enable Clip",
|
|
92
|
+
disable: "Disable Clip",
|
|
93
|
+
tooltip: "After enabling data clipping, snapshot modules and shared information will be removed, affecting preloading logic."
|
|
94
|
+
},
|
|
95
|
+
hmr: {
|
|
96
|
+
enable: "Enable HMR",
|
|
97
|
+
disable: "Disable HMR"
|
|
98
|
+
},
|
|
99
|
+
fields: {
|
|
100
|
+
moduleName: {
|
|
101
|
+
placeholder: "Module Name"
|
|
102
|
+
},
|
|
103
|
+
customManifest: {
|
|
104
|
+
placeholder: "Custom Manifest URL"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
empty: {
|
|
108
|
+
description: "Add your first override to begin redirecting remotes."
|
|
109
|
+
},
|
|
110
|
+
footer: {
|
|
111
|
+
hint: "Changes persist per domain and refresh the inspected tab when valid."
|
|
112
|
+
},
|
|
113
|
+
validation: {
|
|
114
|
+
moduleNameRequired: "Module name can not be empty",
|
|
115
|
+
moduleInfoInvalid: "The module information format is incorrect, check the format in the upper left corner"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
sharedDeps: {
|
|
119
|
+
status: {
|
|
120
|
+
loaded: "Loaded",
|
|
121
|
+
loading: "Loading",
|
|
122
|
+
notLoaded: "Not Loaded"
|
|
123
|
+
},
|
|
124
|
+
focusResult: {
|
|
125
|
+
providerLabel: "Provider: "
|
|
126
|
+
},
|
|
127
|
+
hero: {
|
|
128
|
+
subtitle: "Module Federation · Shared Dependencies",
|
|
129
|
+
title: "Overview of Shared Dependencies Usage"
|
|
130
|
+
},
|
|
131
|
+
stats: {
|
|
132
|
+
providers: {
|
|
133
|
+
title: "Number of Providers",
|
|
134
|
+
description: "Number of applications/build versions exposing shared dependencies."
|
|
135
|
+
},
|
|
136
|
+
scopes: {
|
|
137
|
+
title: "Share Scope / Package",
|
|
138
|
+
badge: "scope",
|
|
139
|
+
description: "Shared spaces under Scope dimension.",
|
|
140
|
+
packagesBadge: "{{count}} packages"
|
|
141
|
+
},
|
|
142
|
+
versions: {
|
|
143
|
+
title: "Version Loading & Reuse",
|
|
144
|
+
loadedLabel: "Loaded",
|
|
145
|
+
reusedLabel: "Reused"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
focusPanel: {
|
|
149
|
+
title: "Who provides the current shared: '{{package}}'?",
|
|
150
|
+
packageLabel: "Package Name",
|
|
151
|
+
packagePlaceholder: "Select Shared Dependency Package Name",
|
|
152
|
+
versionLabel: "Version (Optional, inferred if empty)",
|
|
153
|
+
versionPlaceholder: "All Versions",
|
|
154
|
+
versionAllOption: "All Versions"
|
|
155
|
+
},
|
|
156
|
+
filters: {
|
|
157
|
+
cardTitle: "Filter / Search",
|
|
158
|
+
providerLabel: "Provider",
|
|
159
|
+
providerPlaceholder: "All Providers",
|
|
160
|
+
packageLabel: "Package Name",
|
|
161
|
+
packagePlaceholder: "All Packages",
|
|
162
|
+
versionLabel: "Version",
|
|
163
|
+
versionPlaceholder: "All Versions",
|
|
164
|
+
keywordLabel: "Package Name Keyword (Fuzzy Match)",
|
|
165
|
+
keywordPlaceholder: "e.g., react / axios",
|
|
166
|
+
matchCountLabel: "Currently Matched Versions:",
|
|
167
|
+
scopeCount: "Scope Count: {{count}}",
|
|
168
|
+
scopePrefix: "Scope: {{name}}"
|
|
169
|
+
},
|
|
170
|
+
table: {
|
|
171
|
+
columns: {
|
|
172
|
+
packageVersion: "Package / Version",
|
|
173
|
+
providerScope: "Provider / Scope",
|
|
174
|
+
status: "Status",
|
|
175
|
+
consumers: "Consumers",
|
|
176
|
+
strategy: "Strategy"
|
|
177
|
+
},
|
|
178
|
+
providerPrefix: "Provider: {{name}}",
|
|
179
|
+
scopePrefix: "scope: {{scope}}",
|
|
180
|
+
strategyFallback: "-"
|
|
181
|
+
},
|
|
182
|
+
consumersPopover: {
|
|
183
|
+
title: "Consumer List",
|
|
184
|
+
empty: "No applications are consuming this shared dependency version.",
|
|
185
|
+
button: "{{count}} Apps"
|
|
186
|
+
},
|
|
187
|
+
messages: {
|
|
188
|
+
loading: "Parsing shared dependency data...",
|
|
189
|
+
error: "Failed to load shared dependency data: {{message}}",
|
|
190
|
+
errorUnknown: "Unknown Error",
|
|
191
|
+
noMatch: "No matching shared dependency versions under current filter conditions, try relaxing the filter conditions.",
|
|
192
|
+
noData: "No shared dependency data loaded yet.",
|
|
193
|
+
noFocusMatch: "No version matching the criteria was found in the current shared data. Please check if the package name / version is correct."
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
moduleInfo: {
|
|
197
|
+
empty: {
|
|
198
|
+
noModuleInfo: "No ModuleInfo Detected"
|
|
199
|
+
},
|
|
200
|
+
detail: {
|
|
201
|
+
remoteEntry: "Remote Entry",
|
|
202
|
+
version: "Version",
|
|
203
|
+
consumers: "Consumers",
|
|
204
|
+
exposes: "Exposes",
|
|
205
|
+
remotes: "Remotes",
|
|
206
|
+
shared: "Shared",
|
|
207
|
+
snapshot: "Snapshot"
|
|
208
|
+
},
|
|
209
|
+
selector: {
|
|
210
|
+
placeholder: "Select MF module",
|
|
211
|
+
consumerTag: "Consumer",
|
|
212
|
+
providerTag: "Provider"
|
|
213
|
+
},
|
|
214
|
+
tables: {
|
|
215
|
+
remotes: {
|
|
216
|
+
name: "Name",
|
|
217
|
+
type: "Type",
|
|
218
|
+
version: "Version",
|
|
219
|
+
scmVersion: "SCM Version"
|
|
220
|
+
},
|
|
221
|
+
exposes: {
|
|
222
|
+
moduleName: "Module Name",
|
|
223
|
+
filePath: "File Path",
|
|
224
|
+
sharedDependencies: "Shared Dependencies",
|
|
225
|
+
noShared: "None"
|
|
226
|
+
},
|
|
227
|
+
consumers: {
|
|
228
|
+
name: "Consumer Name",
|
|
229
|
+
type: "Consumer Type",
|
|
230
|
+
version: "Consumer Version",
|
|
231
|
+
moduleName: "Consumed Module Name",
|
|
232
|
+
usedIn: "Used In",
|
|
233
|
+
time: "Time"
|
|
234
|
+
},
|
|
235
|
+
shared: {
|
|
236
|
+
dependencyName: "Dependency Name",
|
|
237
|
+
version: "Version",
|
|
238
|
+
requiredVersion: "Required Version",
|
|
239
|
+
singleton: "Singleton",
|
|
240
|
+
eager: "Eager"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
dependencyGraph: {
|
|
245
|
+
title: "Dependency Graph",
|
|
246
|
+
subtitle: "Visualise how consumers resolve remotes with the current overrides.",
|
|
247
|
+
filters: {
|
|
248
|
+
consumerPlaceholder: "Select Consumer",
|
|
249
|
+
consumerAll: "All Consumers",
|
|
250
|
+
depthPlaceholder: "Select Depth",
|
|
251
|
+
depthAll: "All Depth",
|
|
252
|
+
depthOption: "Depth: {{depth}}"
|
|
253
|
+
},
|
|
254
|
+
meta: {
|
|
255
|
+
singleNode: "node rendered",
|
|
256
|
+
multiNodes: "nodes rendered"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
graphItem: {
|
|
260
|
+
expose: "Expose",
|
|
261
|
+
shared: "Shared",
|
|
262
|
+
entry: "Entry",
|
|
263
|
+
version: "Version"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"zh-CN": {
|
|
268
|
+
translation: {
|
|
269
|
+
app: {
|
|
270
|
+
nav: {
|
|
271
|
+
moduleInfo: "模块信息",
|
|
272
|
+
proxy: "代理配置",
|
|
273
|
+
dependency: "依赖关系图",
|
|
274
|
+
share: "共享依赖",
|
|
275
|
+
performance: "性能"
|
|
276
|
+
},
|
|
277
|
+
header: {
|
|
278
|
+
title: "Module Federation",
|
|
279
|
+
subtitle: "DevTools 调试助手",
|
|
280
|
+
refresh: {
|
|
281
|
+
label: "刷新",
|
|
282
|
+
tooltip: "重新同步当前页面的 Federation 信息。"
|
|
283
|
+
},
|
|
284
|
+
scope: {
|
|
285
|
+
label: "当前标签页",
|
|
286
|
+
waiting: "等待目标页面"
|
|
287
|
+
},
|
|
288
|
+
stats: {
|
|
289
|
+
modules: "模块数",
|
|
290
|
+
remotes: "远程应用数",
|
|
291
|
+
consumers: "消费方数"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
performance: {
|
|
295
|
+
placeholder: "开发中..."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
common: {
|
|
299
|
+
empty: {
|
|
300
|
+
noModuleInfo: "未检测到 ModuleInfo"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
layout: {
|
|
304
|
+
summary: {
|
|
305
|
+
title: "当前作用域中的 Remotes",
|
|
306
|
+
hint: "通过覆盖清单地址,无需重新发布即可验证集成效果。",
|
|
307
|
+
placeholder: "等待模块映射数据",
|
|
308
|
+
more: "+{{count}} 个更多"
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
form: {
|
|
312
|
+
title: "代理覆盖规则",
|
|
313
|
+
subtitle: "将消费方指向指定远程 bundle 或 manifest,便于快速验证。",
|
|
314
|
+
tooltip: {
|
|
315
|
+
proxyExample: '示例:自定义以 ".json" 结尾的远程模块地址。例如 key:@module-federation/button,value:http://localhost:3000/mf-manifest.json。'
|
|
316
|
+
},
|
|
317
|
+
clip: {
|
|
318
|
+
enable: "开启裁剪",
|
|
319
|
+
disable: "关闭裁剪",
|
|
320
|
+
tooltip: "开启数据裁剪后,会移除快照中的模块和共享信息,可能影响预加载逻辑。"
|
|
321
|
+
},
|
|
322
|
+
hmr: {
|
|
323
|
+
enable: "开启 HMR",
|
|
324
|
+
disable: "关闭 HMR"
|
|
325
|
+
},
|
|
326
|
+
fields: {
|
|
327
|
+
moduleName: {
|
|
328
|
+
placeholder: "模块名称"
|
|
329
|
+
},
|
|
330
|
+
customManifest: {
|
|
331
|
+
placeholder: "自定义 Manifest 地址"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
empty: {
|
|
335
|
+
description: "添加第一条覆盖规则以开始重定向远程模块。"
|
|
336
|
+
},
|
|
337
|
+
footer: {
|
|
338
|
+
hint: "变更按域名维度持久化,规则生效后会自动刷新被调试页面。"
|
|
339
|
+
},
|
|
340
|
+
validation: {
|
|
341
|
+
moduleNameRequired: "模块名称不能为空",
|
|
342
|
+
moduleInfoInvalid: "模块信息格式不正确,请检查左上角示例中的格式。"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
sharedDeps: {
|
|
346
|
+
status: {
|
|
347
|
+
loaded: "已加载",
|
|
348
|
+
loading: "加载中",
|
|
349
|
+
notLoaded: "未加载"
|
|
350
|
+
},
|
|
351
|
+
focusResult: {
|
|
352
|
+
providerLabel: "提供方:"
|
|
353
|
+
},
|
|
354
|
+
hero: {
|
|
355
|
+
subtitle: "Module Federation · 共享依赖",
|
|
356
|
+
title: "共享依赖使用概览"
|
|
357
|
+
},
|
|
358
|
+
stats: {
|
|
359
|
+
providers: {
|
|
360
|
+
title: "提供方数量",
|
|
361
|
+
description: "暴露共享依赖的应用 / 构建版本数量。"
|
|
362
|
+
},
|
|
363
|
+
scopes: {
|
|
364
|
+
title: "共享作用域 / 包",
|
|
365
|
+
badge: "scope",
|
|
366
|
+
description: "按 Scope 维度划分的共享空间。",
|
|
367
|
+
packagesBadge: "{{count}} 个包"
|
|
368
|
+
},
|
|
369
|
+
versions: {
|
|
370
|
+
title: "版本加载与复用情况",
|
|
371
|
+
loadedLabel: "已加载",
|
|
372
|
+
reusedLabel: "被复用"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
focusPanel: {
|
|
376
|
+
title: "当前共享包 '{{package}}' 的提供方?",
|
|
377
|
+
packageLabel: "包名",
|
|
378
|
+
packagePlaceholder: "选择共享依赖包名",
|
|
379
|
+
versionLabel: "版本(可选,不填则自动推断)",
|
|
380
|
+
versionPlaceholder: "全部版本",
|
|
381
|
+
versionAllOption: "全部版本"
|
|
382
|
+
},
|
|
383
|
+
filters: {
|
|
384
|
+
cardTitle: "筛选 / 搜索",
|
|
385
|
+
providerLabel: "提供方",
|
|
386
|
+
providerPlaceholder: "全部提供方",
|
|
387
|
+
packageLabel: "包名",
|
|
388
|
+
packagePlaceholder: "全部包名",
|
|
389
|
+
versionLabel: "版本",
|
|
390
|
+
versionPlaceholder: "全部版本",
|
|
391
|
+
keywordLabel: "包名关键字(模糊匹配)",
|
|
392
|
+
keywordPlaceholder: "例如:react / axios",
|
|
393
|
+
matchCountLabel: "当前命中版本数:",
|
|
394
|
+
scopeCount: "Scope 数量:{{count}}",
|
|
395
|
+
scopePrefix: "Scope:{{name}}"
|
|
396
|
+
},
|
|
397
|
+
table: {
|
|
398
|
+
columns: {
|
|
399
|
+
packageVersion: "包 / 版本",
|
|
400
|
+
providerScope: "提供方 / Scope",
|
|
401
|
+
status: "状态",
|
|
402
|
+
consumers: "消费方",
|
|
403
|
+
strategy: "策略"
|
|
404
|
+
},
|
|
405
|
+
providerPrefix: "Provider:{{name}}",
|
|
406
|
+
scopePrefix: "scope:{{scope}}",
|
|
407
|
+
strategyFallback: "-"
|
|
408
|
+
},
|
|
409
|
+
consumersPopover: {
|
|
410
|
+
title: "消费方列表",
|
|
411
|
+
empty: "当前没有应用消费该共享依赖版本。",
|
|
412
|
+
button: "{{count}} 个应用"
|
|
413
|
+
},
|
|
414
|
+
messages: {
|
|
415
|
+
loading: "正在解析共享依赖数据...",
|
|
416
|
+
error: "加载共享依赖数据失败:{{message}}",
|
|
417
|
+
errorUnknown: "未知错误",
|
|
418
|
+
noMatch: "当前筛选条件下没有匹配的共享依赖版本,可尝试放宽筛选条件。",
|
|
419
|
+
noData: "尚未加载任何共享依赖数据。",
|
|
420
|
+
noFocusMatch: "在当前共享数据中未找到符合条件的版本,请检查包名或版本是否正确。"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
moduleInfo: {
|
|
424
|
+
empty: {
|
|
425
|
+
noModuleInfo: "未检测到 ModuleInfo"
|
|
426
|
+
},
|
|
427
|
+
detail: {
|
|
428
|
+
remoteEntry: "远程入口",
|
|
429
|
+
version: "版本",
|
|
430
|
+
consumers: "消费方",
|
|
431
|
+
exposes: "暴露模块",
|
|
432
|
+
remotes: "Remotes",
|
|
433
|
+
shared: "共享依赖",
|
|
434
|
+
snapshot: "快照"
|
|
435
|
+
},
|
|
436
|
+
selector: {
|
|
437
|
+
placeholder: "选择 MF 模块",
|
|
438
|
+
consumerTag: "消费方",
|
|
439
|
+
providerTag: "提供方"
|
|
440
|
+
},
|
|
441
|
+
tables: {
|
|
442
|
+
remotes: {
|
|
443
|
+
name: "名称",
|
|
444
|
+
type: "类型",
|
|
445
|
+
version: "版本",
|
|
446
|
+
scmVersion: "SCM 版本"
|
|
447
|
+
},
|
|
448
|
+
exposes: {
|
|
449
|
+
moduleName: "模块名",
|
|
450
|
+
filePath: "文件路径",
|
|
451
|
+
sharedDependencies: "共享依赖",
|
|
452
|
+
noShared: "无共享依赖"
|
|
453
|
+
},
|
|
454
|
+
consumers: {
|
|
455
|
+
name: "消费方名称",
|
|
456
|
+
type: "消费方类型",
|
|
457
|
+
version: "消费方版本",
|
|
458
|
+
moduleName: "消费模块名",
|
|
459
|
+
usedIn: "使用位置",
|
|
460
|
+
time: "时间"
|
|
461
|
+
},
|
|
462
|
+
shared: {
|
|
463
|
+
dependencyName: "依赖名称",
|
|
464
|
+
version: "版本",
|
|
465
|
+
requiredVersion: "要求版本",
|
|
466
|
+
singleton: "单例",
|
|
467
|
+
eager: "提前加载"
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
dependencyGraph: {
|
|
472
|
+
title: "依赖关系图",
|
|
473
|
+
subtitle: "可视化当前覆盖规则下,消费方如何解析远程模块。",
|
|
474
|
+
filters: {
|
|
475
|
+
consumerPlaceholder: "选择消费方",
|
|
476
|
+
consumerAll: "全部消费方",
|
|
477
|
+
depthPlaceholder: "选择深度",
|
|
478
|
+
depthAll: "全部深度",
|
|
479
|
+
depthOption: "深度:{{depth}}"
|
|
480
|
+
},
|
|
481
|
+
meta: {
|
|
482
|
+
singleNode: "个节点",
|
|
483
|
+
multiNodes: "个节点"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
graphItem: {
|
|
487
|
+
expose: "暴露模块",
|
|
488
|
+
shared: "共享依赖",
|
|
489
|
+
entry: "入口",
|
|
490
|
+
version: "版本"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
function normaliseLanguage(input) {
|
|
496
|
+
if (!input) {
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
const lower = input.toLowerCase();
|
|
500
|
+
if (lower.startsWith("zh")) {
|
|
501
|
+
return "zh-CN";
|
|
502
|
+
}
|
|
503
|
+
if (lower.startsWith("en")) {
|
|
504
|
+
return "en";
|
|
505
|
+
}
|
|
506
|
+
return null;
|
|
507
|
+
}
|
|
508
|
+
function getInitialLanguage() {
|
|
509
|
+
if (typeof window !== "undefined") {
|
|
510
|
+
try {
|
|
511
|
+
const stored = window.localStorage.getItem(LANGUAGE_STORAGE_KEY);
|
|
512
|
+
const normalisedStored = normaliseLanguage(stored);
|
|
513
|
+
if (normalisedStored) {
|
|
514
|
+
return normalisedStored;
|
|
515
|
+
}
|
|
516
|
+
} catch (e) {
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (typeof navigator !== "undefined") {
|
|
520
|
+
const normalisedNavigator = normaliseLanguage(navigator.language);
|
|
521
|
+
if (normalisedNavigator) {
|
|
522
|
+
return normalisedNavigator;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
return "zh-CN";
|
|
526
|
+
}
|
|
527
|
+
const initialLanguage = getInitialLanguage();
|
|
528
|
+
import_i18next.default.use(import_react_i18next.initReactI18next).init({
|
|
529
|
+
resources,
|
|
530
|
+
lng: initialLanguage,
|
|
531
|
+
fallbackLng: "zh-CN",
|
|
532
|
+
interpolation: {
|
|
533
|
+
escapeValue: false
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
var i18n_default = import_i18next.default;
|
|
537
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
538
|
+
0 && (module.exports = {
|
|
539
|
+
LANGUAGE_STORAGE_KEY
|
|
540
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@modern-js/runtime": "2.
|
|
40
|
+
"@modern-js/runtime": "2.70.2",
|
|
41
41
|
"@arco-design/web-react": "2.66.7",
|
|
42
42
|
"ahooks": "^3.7.10",
|
|
43
43
|
"dagre": "^0.8.5",
|
|
@@ -47,15 +47,17 @@
|
|
|
47
47
|
"echarts": "^6.0.0",
|
|
48
48
|
"lucide-react": "^0.364.0",
|
|
49
49
|
"echarts-for-react": "^3.0.5",
|
|
50
|
-
"
|
|
50
|
+
"i18next": "^23.0.0",
|
|
51
|
+
"react-i18next": "^15.0.0",
|
|
52
|
+
"@module-federation/sdk": "0.23.0"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
55
|
"@modern-js-app/eslint-config": "2.59.0",
|
|
54
|
-
"@modern-js/app-tools": "2.
|
|
56
|
+
"@modern-js/app-tools": "2.70.2",
|
|
55
57
|
"@modern-js/eslint-config": "2.59.0",
|
|
56
|
-
"@modern-js/module-tools": "2.
|
|
57
|
-
"@modern-js/storybook": "2.
|
|
58
|
-
"@modern-js/tsconfig": "2.
|
|
58
|
+
"@modern-js/module-tools": "2.70.2",
|
|
59
|
+
"@modern-js/storybook": "2.70.2",
|
|
60
|
+
"@modern-js/tsconfig": "2.70.2",
|
|
59
61
|
"@playwright/test": "1.49.1",
|
|
60
62
|
"@types/chrome": "^0.0.272",
|
|
61
63
|
"@types/dagre": "^0.7.52",
|
|
@@ -67,7 +69,7 @@
|
|
|
67
69
|
"prettier": "~3.3.3",
|
|
68
70
|
"rimraf": "~6.0.1",
|
|
69
71
|
"vitest": "1.2.2",
|
|
70
|
-
"@module-federation/runtime": "0.
|
|
72
|
+
"@module-federation/runtime": "0.23.0"
|
|
71
73
|
},
|
|
72
74
|
"scripts": {
|
|
73
75
|
"build:storybook": "storybook build",
|