@module-federation/devtools 0.0.0-chore-bump-node-22-20260710161714
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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/es/App.css +13 -0
- package/dist/es/App.js +498 -0
- package/dist/es/App.module.js +5 -0
- package/dist/es/App_module.css +307 -0
- package/dist/es/component/DependencyGraph/index.js +204 -0
- package/dist/es/component/DependencyGraph/index.module.js +5 -0
- package/dist/es/component/DependencyGraph/index_module.css +100 -0
- package/dist/es/component/DependencyGraphItem/index.js +95 -0
- package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
- package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/es/component/Form/index.js +363 -0
- package/dist/es/component/Form/index.module.js +5 -0
- package/dist/es/component/Form/index_module.css +198 -0
- package/dist/es/component/LanguageSwitch.js +50 -0
- package/dist/es/component/Layout/index.js +470 -0
- package/dist/es/component/Layout/index.module.js +5 -0
- package/dist/es/component/Layout/index_module.css +68 -0
- package/dist/es/component/LoadingTrace/index.js +944 -0
- package/dist/es/component/LoadingTrace/index.module.js +5 -0
- package/dist/es/component/LoadingTrace/index_module.css +876 -0
- package/dist/es/component/ModuleInfo/index.js +313 -0
- package/dist/es/component/ModuleInfo/index.module.js +5 -0
- package/dist/es/component/ModuleInfo/index_module.css +184 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/es/component/SharedDepsExplorer/index.js +636 -0
- package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/es/component/SharedDepsExplorer/share-utils.js +222 -0
- 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 +688 -0
- package/dist/es/init.js +8 -0
- package/dist/es/template/constant.js +51 -0
- package/dist/es/template/index.js +1 -0
- package/dist/es/utils/chrome/fast-refresh.js +342 -0
- package/dist/es/utils/chrome/index.js +284 -0
- package/dist/es/utils/chrome/messages.js +12 -0
- package/dist/es/utils/chrome/observability-plugin.js +93 -0
- package/dist/es/utils/chrome/observability-shared.js +99 -0
- package/dist/es/utils/chrome/observability.js +208 -0
- package/dist/es/utils/chrome/override-remote.js +2 -0
- package/dist/es/utils/chrome/post-message-init.js +5 -0
- package/dist/es/utils/chrome/post-message-listener.js +39 -0
- package/dist/es/utils/chrome/post-message-start.js +10 -0
- package/dist/es/utils/chrome/post-message.js +71 -0
- package/dist/es/utils/chrome/safe-post-message.js +124 -0
- package/dist/es/utils/chrome/snapshot-plugin.js +2 -0
- package/dist/es/utils/chrome/storage.js +50 -0
- package/dist/es/utils/data/index.js +59 -0
- package/dist/es/utils/index.js +4 -0
- package/dist/es/utils/sdk/graph.js +190 -0
- package/dist/es/utils/sdk/index.js +70 -0
- package/dist/es/utils/types/common.js +0 -0
- package/dist/es/utils/types/index.js +1 -0
- package/dist/es/vendor/basic-proxy-core.js +155 -0
- package/dist/es/worker/index.js +187 -0
- package/dist/lib/App.css +13 -0
- package/dist/lib/App.js +519 -0
- package/dist/lib/App.module.js +24 -0
- package/dist/lib/App_module.css +307 -0
- package/dist/lib/component/DependencyGraph/index.js +225 -0
- package/dist/lib/component/DependencyGraph/index.module.js +24 -0
- package/dist/lib/component/DependencyGraph/index_module.css +100 -0
- package/dist/lib/component/DependencyGraphItem/index.js +124 -0
- package/dist/lib/component/DependencyGraphItem/index.module.js +24 -0
- package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/lib/component/Form/index.js +372 -0
- package/dist/lib/component/Form/index.module.js +24 -0
- package/dist/lib/component/Form/index_module.css +198 -0
- package/dist/lib/component/LanguageSwitch.js +79 -0
- package/dist/lib/component/Layout/index.js +471 -0
- package/dist/lib/component/Layout/index.module.js +24 -0
- package/dist/lib/component/Layout/index_module.css +68 -0
- package/dist/lib/component/LoadingTrace/index.js +953 -0
- package/dist/lib/component/LoadingTrace/index.module.js +24 -0
- package/dist/lib/component/LoadingTrace/index_module.css +876 -0
- package/dist/lib/component/ModuleInfo/index.js +342 -0
- package/dist/lib/component/ModuleInfo/index.module.js +24 -0
- package/dist/lib/component/ModuleInfo/index_module.css +184 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/lib/component/SharedDepsExplorer/index.js +638 -0
- package/dist/lib/component/SharedDepsExplorer/index.module.js +24 -0
- package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/lib/component/SharedDepsExplorer/share-utils.js +252 -0
- package/dist/lib/component/ThemeToggle.js +48 -0
- package/dist/lib/component/ThemeToggle.module.js +24 -0
- package/dist/lib/component/ThemeToggle_module.css +12 -0
- package/dist/lib/hooks/useDevtoolsTheme.js +100 -0
- package/dist/lib/i18n/index.js +721 -0
- package/dist/lib/init.js +8 -0
- package/dist/lib/template/constant.js +84 -0
- package/dist/lib/template/index.js +21 -0
- package/dist/lib/utils/chrome/fast-refresh.js +329 -0
- package/dist/lib/utils/chrome/index.js +321 -0
- package/dist/lib/utils/chrome/messages.js +39 -0
- package/dist/lib/utils/chrome/observability-plugin.js +85 -0
- package/dist/lib/utils/chrome/observability-shared.js +125 -0
- package/dist/lib/utils/chrome/observability.js +233 -0
- package/dist/lib/utils/chrome/override-remote.js +17 -0
- package/dist/lib/utils/chrome/post-message-init.js +5 -0
- package/dist/lib/utils/chrome/post-message-listener.js +36 -0
- package/dist/lib/utils/chrome/post-message-start.js +10 -0
- package/dist/lib/utils/chrome/post-message.js +91 -0
- package/dist/lib/utils/chrome/safe-post-message.js +147 -0
- package/dist/lib/utils/chrome/snapshot-plugin.js +17 -0
- package/dist/lib/utils/chrome/storage.js +71 -0
- package/dist/lib/utils/data/index.js +83 -0
- package/dist/lib/utils/index.js +27 -0
- package/dist/lib/utils/sdk/graph.js +213 -0
- package/dist/lib/utils/sdk/index.js +104 -0
- package/dist/lib/utils/types/common.js +15 -0
- package/dist/lib/utils/types/index.js +21 -0
- package/dist/lib/vendor/basic-proxy-core.js +147 -0
- package/dist/lib/worker/index.js +175 -0
- package/dist/types/src/App.d.ts +7 -0
- package/dist/types/src/component/DependencyGraph/index.d.ts +6 -0
- package/dist/types/src/component/DependencyGraphItem/index.d.ts +9 -0
- package/dist/types/src/component/Form/index.d.ts +21 -0
- package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
- package/dist/types/src/component/Layout/index.d.ts +15 -0
- package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
- package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
- package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
- package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
- package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +45 -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/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/init.d.ts +12 -0
- package/dist/types/src/template/constant.d.ts +21 -0
- package/dist/types/src/template/index.d.ts +1 -0
- package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
- package/dist/types/src/utils/chrome/index.d.ts +19 -0
- package/dist/types/src/utils/chrome/messages.d.ts +5 -0
- package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
- package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
- package/dist/types/src/utils/chrome/observability.d.ts +110 -0
- package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
- package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
- package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
- package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +1 -0
- package/dist/types/src/utils/chrome/storage.d.ts +5 -0
- package/dist/types/src/utils/data/index.d.ts +10 -0
- package/dist/types/src/utils/index.d.ts +4 -0
- package/dist/types/src/utils/sdk/graph.d.ts +46 -0
- package/dist/types/src/utils/sdk/index.d.ts +11 -0
- package/dist/types/src/utils/types/common.d.ts +22 -0
- package/dist/types/src/utils/types/index.d.ts +1 -0
- package/dist/types/src/worker/index.d.ts +1 -0
- package/dist/types/stories/index.stories.d.ts +9 -0
- package/install-deps.bash +23 -0
- package/package.json +108 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GlobalModuleInfo } from '@module-federation/sdk';
|
|
2
|
+
import { MarkerType } from 'reactflow';
|
|
3
|
+
export interface NodeCustomData {
|
|
4
|
+
info: string;
|
|
5
|
+
color: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface NodeType {
|
|
9
|
+
id: string;
|
|
10
|
+
type: string;
|
|
11
|
+
position: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
data: NodeCustomData;
|
|
16
|
+
}
|
|
17
|
+
export type Edge = 'default' | 'straight' | 'step' | 'smoothstep' | 'bezier';
|
|
18
|
+
export interface EdgeType {
|
|
19
|
+
id: string;
|
|
20
|
+
source: string;
|
|
21
|
+
target: string;
|
|
22
|
+
type: Edge;
|
|
23
|
+
markerEnd: {
|
|
24
|
+
type: MarkerType;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare const validateSemver: (schema: string) => boolean;
|
|
30
|
+
export declare const validatePort: (schema: string) => boolean;
|
|
31
|
+
export declare class DependencyGraph {
|
|
32
|
+
snapshot: GlobalModuleInfo;
|
|
33
|
+
initTarget: string;
|
|
34
|
+
node: Array<NodeType>;
|
|
35
|
+
edge: Array<EdgeType>;
|
|
36
|
+
graph: any;
|
|
37
|
+
identifyMap: Map<string, string>;
|
|
38
|
+
handledModuleMap: Map<string, boolean>;
|
|
39
|
+
constructor(snapshot: GlobalModuleInfo, initTarget: string);
|
|
40
|
+
createGraph(target?: string): void;
|
|
41
|
+
addNode(id: string, type: string, x: number, y: number, nodeData: NodeCustomData): void;
|
|
42
|
+
addEdge(id: string, source: string, target: string, type?: Edge): void;
|
|
43
|
+
run(targetGraph: any, target: string, type: string, id?: string, depth?: number, maxDepth?: number): void;
|
|
44
|
+
identify(): string;
|
|
45
|
+
calculateDepth(target?: string, visited?: Set<string>): number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './graph';
|
|
2
|
+
export declare const setLocalStorage: (key: string, value: any) => void;
|
|
3
|
+
export declare const getLocalStorage: (key: string) => string;
|
|
4
|
+
export declare const removeLocalStorage: (key: string) => void;
|
|
5
|
+
export declare const mergeLocalStorage: (target: string, key: string, value: any) => void;
|
|
6
|
+
export declare const removeLocalStorageKey: (target: string, key: string) => void;
|
|
7
|
+
export declare const isObject: (target: any) => boolean;
|
|
8
|
+
export declare const reloadPage: () => void;
|
|
9
|
+
export declare const validateCustom: (schema: string) => boolean;
|
|
10
|
+
export declare const getUnpkgUrl: (pkg: string, version: string) => string;
|
|
11
|
+
export declare const definePropertyGlobalVal: (target: Record<string, any>, key: string, val: any) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { GlobalModuleInfo } from '@module-federation/sdk';
|
|
3
|
+
import { getModuleInfo } from '../index';
|
|
4
|
+
export interface FormItemStatus {
|
|
5
|
+
keyStatus: boolean;
|
|
6
|
+
valueStatus: boolean;
|
|
7
|
+
}
|
|
8
|
+
type ParametersTypeOfRoot = Parameters<typeof getModuleInfo>;
|
|
9
|
+
type ReturnTypeOfRoot = ReturnType<typeof getModuleInfo>;
|
|
10
|
+
export interface RootComponentProps {
|
|
11
|
+
handleSnapshot?: (...args: ParametersTypeOfRoot) => Promise<ReturnTypeOfRoot>;
|
|
12
|
+
versionList?: Array<Array<string>>;
|
|
13
|
+
setVersionList?: React.Dispatch<React.SetStateAction<Array<Array<string>>>>;
|
|
14
|
+
getVersion?: (moduleName: string) => Promise<Array<string>>;
|
|
15
|
+
handleProxyAddress?: (address: string) => string;
|
|
16
|
+
customValueValidate?: (schema: string) => boolean;
|
|
17
|
+
headerSlot?: ReactNode;
|
|
18
|
+
onModuleInfoChange?: (moduleInfo: GlobalModuleInfo) => void;
|
|
19
|
+
onModuleInfoReset?: () => void;
|
|
20
|
+
tabId?: number;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './common';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
if [ "$SKIP_DEVTOOLS_POSTINSTALL" = "true" ]; then
|
|
2
|
+
echo "Skipping devtools postinstall script."
|
|
3
|
+
exit 0
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
if [ "$GITHUB_ACTIONS" = "true" ] && [ "$RUN_DEVTOOLS_POSTINSTALL" != "true" ]; then
|
|
7
|
+
echo "Skipping devtools postinstall outside the devtools workflow."
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
|
12
|
+
echo "Running in GitHub Actions environment."
|
|
13
|
+
# Only install if cache miss was reported by the cache action
|
|
14
|
+
if [ "$PLAYWRIGHT_CACHE_HIT" != "true" ]; then
|
|
15
|
+
echo "Playwright cache miss, installing Chromium dependencies and browser..."
|
|
16
|
+
npx playwright install-deps && npx playwright install chromium
|
|
17
|
+
else
|
|
18
|
+
echo "Using cached Playwright browsers."
|
|
19
|
+
fi
|
|
20
|
+
else
|
|
21
|
+
echo "Not running in GitHub Actions environment."
|
|
22
|
+
# 在这里放置不在 GitHub Actions 环境时要执行的命令
|
|
23
|
+
fi
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@module-federation/devtools",
|
|
3
|
+
"version": "0.0.0-chore-bump-node-22-20260710161714",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/module-federation/core.git",
|
|
8
|
+
"directory": "packages/chrome-devtools"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"install-deps.bash",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/types/src/App.d.ts",
|
|
18
|
+
"require": "./dist/lib/App.js",
|
|
19
|
+
"import": "./dist/es/App.js"
|
|
20
|
+
},
|
|
21
|
+
"./App": {
|
|
22
|
+
"types": "./dist/types/src/App.d.ts",
|
|
23
|
+
"require": "./dist/lib/App.js",
|
|
24
|
+
"import": "./dist/es/App.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"lint-staged": {
|
|
28
|
+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
|
|
29
|
+
"node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"eslintIgnore": [
|
|
33
|
+
"node_modules/",
|
|
34
|
+
"dist/"
|
|
35
|
+
],
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@modern-js/runtime": "2.70.8",
|
|
41
|
+
"@arco-design/web-react": "2.66.7",
|
|
42
|
+
"ahooks": "3.7.10",
|
|
43
|
+
"dagre": "0.8.5",
|
|
44
|
+
"reactflow": "11.11.4",
|
|
45
|
+
"echarts": "6.1.0",
|
|
46
|
+
"lucide-react": "0.364.0",
|
|
47
|
+
"echarts-for-react": "3.0.5",
|
|
48
|
+
"i18next": "23.0.0",
|
|
49
|
+
"react-i18next": "15.0.0",
|
|
50
|
+
"@module-federation/observability-plugin": "0.0.0-chore-bump-node-22-20260710161714",
|
|
51
|
+
"@module-federation/sdk": "0.0.0-chore-bump-node-22-20260710161714"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"react": "^18 || ^19",
|
|
55
|
+
"react-dom": "^18 || ^19"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"react": {
|
|
59
|
+
"optional": true
|
|
60
|
+
},
|
|
61
|
+
"react-dom": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"react": "^19.2.0",
|
|
67
|
+
"react-dom": "^19.2.0",
|
|
68
|
+
"@modern-js-app/eslint-config": "2.59.0",
|
|
69
|
+
"@modern-js/app-tools": "2.70.8",
|
|
70
|
+
"@modern-js/eslint-config": "2.59.0",
|
|
71
|
+
"@modern-js/module-tools": "2.70.8",
|
|
72
|
+
"@modern-js/storybook": "2.70.8",
|
|
73
|
+
"@modern-js/tsconfig": "2.70.8",
|
|
74
|
+
"@playwright/test": "1.57.0",
|
|
75
|
+
"@types/chrome": "^0.0.272",
|
|
76
|
+
"@types/dagre": "^0.7.52",
|
|
77
|
+
"@types/node": "^20.19.5",
|
|
78
|
+
"@types/react": "^19.2.2",
|
|
79
|
+
"@types/react-dom": "^19.2.2",
|
|
80
|
+
"lint-staged": "~13.1.0",
|
|
81
|
+
"prettier": "~3.3.3",
|
|
82
|
+
"typescript": "6.0.3",
|
|
83
|
+
"rimraf": "~6.0.1",
|
|
84
|
+
"vitest": "1.2.2",
|
|
85
|
+
"@module-federation/runtime": "0.0.0-chore-bump-node-22-20260710161714"
|
|
86
|
+
},
|
|
87
|
+
"scripts": {
|
|
88
|
+
"build:storybook": "storybook build",
|
|
89
|
+
"storybook": "storybook dev -p 6006",
|
|
90
|
+
"reset": "npx rimraf ./**/node_modules",
|
|
91
|
+
"dev": "modern-app dev",
|
|
92
|
+
"build:devtool": "modern-app build && node postpack.js",
|
|
93
|
+
"build": "npm run build:lib",
|
|
94
|
+
"build:debug": "DEBUG=true modern-app build && node postpack.js",
|
|
95
|
+
"build:lib": "rm -rf dist && modern-module build -c modern.lib.config.ts",
|
|
96
|
+
"release": "npm publish --tag canary",
|
|
97
|
+
"test": "rstest",
|
|
98
|
+
"test:e2e": "node ../../scripts/ensure-playwright.js && E2ETEST=true pnpm build:devtool && playwright test",
|
|
99
|
+
"test:e2e:ui": "node ../../scripts/ensure-playwright.js && E2ETEST=true pnpm build:devtool && playwright test --ui",
|
|
100
|
+
"start": "modern-app start",
|
|
101
|
+
"serve": "modern-app serve",
|
|
102
|
+
"postinstall": "bash install-deps.bash",
|
|
103
|
+
"build:chrome-plugins": "pnpm -C . build",
|
|
104
|
+
"e2e:devtools": "pnpm -C . test:e2e",
|
|
105
|
+
"e2e:devtools:ui": "pnpm -C . test:e2e:ui"
|
|
106
|
+
},
|
|
107
|
+
"types": "./dist/types/src/App.d.ts"
|
|
108
|
+
}
|