@module-federation/devtools 0.0.0-docs-remove-invalid-lark-link-20251205062649

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.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -0
  3. package/dist/es/App.js +42 -0
  4. package/dist/es/App.module.js +5 -0
  5. package/dist/es/App_module.css +19 -0
  6. package/dist/es/component/Form/index.js +288 -0
  7. package/dist/es/component/Form/index.module.js +5 -0
  8. package/dist/es/component/Form/index_module.css +47 -0
  9. package/dist/es/component/Graph/index.js +127 -0
  10. package/dist/es/component/Graph/index.module.js +5 -0
  11. package/dist/es/component/Graph/index_module.css +12 -0
  12. package/dist/es/component/GraphItem/index.js +73 -0
  13. package/dist/es/component/GraphItem/index.module.js +5 -0
  14. package/dist/es/component/GraphItem/index_module.css +61 -0
  15. package/dist/es/component/Layout/index.js +218 -0
  16. package/dist/es/component/Layout/index.module.js +5 -0
  17. package/dist/es/component/Layout/index_module.css +48 -0
  18. package/dist/es/init.js +8 -0
  19. package/dist/es/template/constant.js +67 -0
  20. package/dist/es/template/index.js +1 -0
  21. package/dist/es/utils/chrome/fast-refresh.js +218 -0
  22. package/dist/es/utils/chrome/index.js +211 -0
  23. package/dist/es/utils/chrome/post-message-init.js +5 -0
  24. package/dist/es/utils/chrome/post-message-listener.js +20 -0
  25. package/dist/es/utils/chrome/post-message-start.js +8 -0
  26. package/dist/es/utils/chrome/post-message.js +62 -0
  27. package/dist/es/utils/chrome/snapshot-plugin.js +36 -0
  28. package/dist/es/utils/chrome/storage.js +45 -0
  29. package/dist/es/utils/data/index.js +79 -0
  30. package/dist/es/utils/data/snapshot.js +82 -0
  31. package/dist/es/utils/index.js +4 -0
  32. package/dist/es/utils/sdk/graph.js +155 -0
  33. package/dist/es/utils/sdk/index.js +61 -0
  34. package/dist/es/utils/types/common.js +0 -0
  35. package/dist/es/utils/types/index.js +1 -0
  36. package/dist/es/worker/index.js +1 -0
  37. package/dist/lib/App.js +72 -0
  38. package/dist/lib/App.module.js +25 -0
  39. package/dist/lib/App_module.css +19 -0
  40. package/dist/lib/component/Form/index.js +299 -0
  41. package/dist/lib/component/Form/index.module.js +25 -0
  42. package/dist/lib/component/Form/index_module.css +47 -0
  43. package/dist/lib/component/Graph/index.js +149 -0
  44. package/dist/lib/component/Graph/index.module.js +25 -0
  45. package/dist/lib/component/Graph/index_module.css +12 -0
  46. package/dist/lib/component/GraphItem/index.js +103 -0
  47. package/dist/lib/component/GraphItem/index.module.js +25 -0
  48. package/dist/lib/component/GraphItem/index_module.css +61 -0
  49. package/dist/lib/component/Layout/index.js +224 -0
  50. package/dist/lib/component/Layout/index.module.js +25 -0
  51. package/dist/lib/component/Layout/index_module.css +48 -0
  52. package/dist/lib/init.js +9 -0
  53. package/dist/lib/template/constant.js +98 -0
  54. package/dist/lib/template/index.js +22 -0
  55. package/dist/lib/utils/chrome/fast-refresh.js +215 -0
  56. package/dist/lib/utils/chrome/index.js +245 -0
  57. package/dist/lib/utils/chrome/post-message-init.js +6 -0
  58. package/dist/lib/utils/chrome/post-message-listener.js +21 -0
  59. package/dist/lib/utils/chrome/post-message-start.js +9 -0
  60. package/dist/lib/utils/chrome/post-message.js +83 -0
  61. package/dist/lib/utils/chrome/snapshot-plugin.js +59 -0
  62. package/dist/lib/utils/chrome/storage.js +67 -0
  63. package/dist/lib/utils/data/index.js +106 -0
  64. package/dist/lib/utils/data/snapshot.js +107 -0
  65. package/dist/lib/utils/index.js +28 -0
  66. package/dist/lib/utils/sdk/graph.js +179 -0
  67. package/dist/lib/utils/sdk/index.js +95 -0
  68. package/dist/lib/utils/types/common.js +16 -0
  69. package/dist/lib/utils/types/index.js +22 -0
  70. package/dist/lib/worker/index.js +2 -0
  71. package/dist/types/src/App.d.ts +6 -0
  72. package/dist/types/src/component/Form/index.d.ts +19 -0
  73. package/dist/types/src/component/Graph/index.d.ts +7 -0
  74. package/dist/types/src/component/GraphItem/index.d.ts +10 -0
  75. package/dist/types/src/component/Layout/index.d.ts +16 -0
  76. package/dist/types/src/index.d.ts +1 -0
  77. package/dist/types/src/init.d.ts +13 -0
  78. package/dist/types/src/template/constant.d.ts +24 -0
  79. package/dist/types/src/template/index.d.ts +1 -0
  80. package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
  81. package/dist/types/src/utils/chrome/index.d.ts +16 -0
  82. package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
  83. package/dist/types/src/utils/chrome/post-message-listener.d.ts +0 -0
  84. package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
  85. package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
  86. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +4 -0
  87. package/dist/types/src/utils/chrome/storage.d.ts +4 -0
  88. package/dist/types/src/utils/data/index.d.ts +11 -0
  89. package/dist/types/src/utils/data/snapshot.d.ts +3 -0
  90. package/dist/types/src/utils/index.d.ts +4 -0
  91. package/dist/types/src/utils/sdk/graph.d.ts +45 -0
  92. package/dist/types/src/utils/sdk/index.d.ts +10 -0
  93. package/dist/types/src/utils/types/common.d.ts +18 -0
  94. package/dist/types/src/utils/types/index.d.ts +1 -0
  95. package/dist/types/src/worker/index.d.ts +0 -0
  96. package/dist/types/stories/index.stories.d.ts +9 -0
  97. package/install-deps.bash +19 -0
  98. package/package.json +87 -0
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var sdk_exports = {};
21
+ __export(sdk_exports, {
22
+ definePropertyGlobalVal: () => definePropertyGlobalVal,
23
+ getUnpkgUrl: () => getUnpkgUrl,
24
+ isObject: () => isObject,
25
+ mergeLocalStorage: () => mergeLocalStorage,
26
+ reloadPage: () => reloadPage,
27
+ removeLocalStorage: () => removeLocalStorage,
28
+ removeLocalStorageKey: () => removeLocalStorageKey,
29
+ setLocalStorage: () => setLocalStorage,
30
+ validateCustom: () => validateCustom
31
+ });
32
+ module.exports = __toCommonJS(sdk_exports);
33
+ __reExport(sdk_exports, require("./graph"), module.exports);
34
+ const setLocalStorage = (key, value) => {
35
+ localStorage.setItem(key, value);
36
+ };
37
+ const removeLocalStorage = (key) => {
38
+ const data = localStorage.getItem(key);
39
+ if (data) {
40
+ localStorage.removeItem(key);
41
+ }
42
+ };
43
+ const mergeLocalStorage = (target, key, value) => {
44
+ const str = localStorage.getItem(target);
45
+ const obj = JSON.parse(str || "{}");
46
+ obj[key] = value;
47
+ localStorage.setItem(target, JSON.stringify(obj));
48
+ };
49
+ const removeLocalStorageKey = (target, key) => {
50
+ const str = localStorage.getItem(target);
51
+ if (str) {
52
+ const obj = JSON.parse(str || "{}");
53
+ delete obj[key];
54
+ localStorage.setItem(target, JSON.stringify(obj));
55
+ }
56
+ };
57
+ const isObject = (target) => Object.prototype.toString.call(target) === "[object Object]";
58
+ const reloadPage = () => {
59
+ var _a;
60
+ (_a = globalThis == null ? void 0 : globalThis.location) == null ? void 0 : _a.reload();
61
+ };
62
+ const validateCustom = (schema) => schema == null ? void 0 : schema.endsWith(".json");
63
+ const getUnpkgUrl = (pkg, version) => {
64
+ if (pkg === "react") {
65
+ return `https://unpkg.com/react@${version}/umd/react.development.js`;
66
+ } else if (pkg === "react-dom") {
67
+ return `https://unpkg.com/react-dom@${version}/umd/react-dom.development.js`;
68
+ } else if (pkg === "vue") {
69
+ if ((version || "").split(".")[0] === "3") {
70
+ return `https://unpkg.com/vue@${version}/dist/vue.global.js`;
71
+ } else {
72
+ return `https://unpkg.com/vue@${version}/dist/vue.common.dev.js`;
73
+ }
74
+ }
75
+ };
76
+ const definePropertyGlobalVal = (target, key, val) => {
77
+ Object.defineProperty(target, key, {
78
+ value: val,
79
+ configurable: false,
80
+ writable: true
81
+ });
82
+ };
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ definePropertyGlobalVal,
86
+ getUnpkgUrl,
87
+ isObject,
88
+ mergeLocalStorage,
89
+ reloadPage,
90
+ removeLocalStorage,
91
+ removeLocalStorageKey,
92
+ setLocalStorage,
93
+ validateCustom,
94
+ ...require("./graph")
95
+ });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var common_exports = {};
16
+ module.exports = __toCommonJS(common_exports);
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
18
+ __reExport(types_exports, require("./common"), module.exports);
19
+ // Annotate the CommonJS export names for ESM import in node:
20
+ 0 && (module.exports = {
21
+ ...require("./common")
22
+ });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ console.log("Module Federation Worker");
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import './init';
3
+ import { RootComponentProps } from './utils';
4
+ import '@arco-design/web-react/dist/css/arco.css';
5
+ declare const App: (props: RootComponentProps) => import("react").JSX.Element;
6
+ export default App;
@@ -0,0 +1,19 @@
1
+ import { SetStateAction, ReactNode } from 'react';
2
+ import { FormInstance } from '@arco-design/web-react';
3
+ import { FormItemStatus, RootComponentProps } from '../../utils';
4
+ interface FormProps {
5
+ form: FormInstance<any, any, string | number | symbol>;
6
+ condition: {
7
+ status: string;
8
+ message: string;
9
+ color: string;
10
+ };
11
+ formStatus: Array<FormItemStatus>;
12
+ setFormStatus: React.Dispatch<SetStateAction<FormItemStatus[]>>;
13
+ validateForm: any;
14
+ enableHMR: string;
15
+ onHMRChange: (on: boolean) => void;
16
+ headerSlot?: ReactNode;
17
+ }
18
+ declare const FormComponent: (props: FormProps & RootComponentProps) => import("react").JSX.Element;
19
+ export default FormComponent;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { GlobalModuleInfo } from '@module-federation/sdk';
3
+ import 'reactflow/dist/style.css';
4
+ declare const Graph: (props: {
5
+ snapshot: GlobalModuleInfo;
6
+ }) => import("react").JSX.Element;
7
+ export default Graph;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import 'reactflow/dist/style.css';
3
+ declare const GraphItem: (props: {
4
+ data: {
5
+ info?: string;
6
+ color?: string;
7
+ remote?: any;
8
+ };
9
+ }) => import("react").JSX.Element;
10
+ export default GraphItem;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { GlobalModuleInfo } from '@module-federation/sdk';
3
+ import type { Federation } from '@module-federation/runtime';
4
+ import { RootComponentProps } from '../../utils';
5
+ declare global {
6
+ interface Window {
7
+ __FEDERATION__: Federation & {
8
+ originModuleInfo: GlobalModuleInfo;
9
+ moduleInfo: GlobalModuleInfo;
10
+ };
11
+ }
12
+ }
13
+ declare const Layout: (props: {
14
+ moduleInfo: GlobalModuleInfo;
15
+ } & RootComponentProps) => import("react").JSX.Element;
16
+ export default Layout;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="chrome" />
2
+ import { GlobalModuleInfo } from '@module-federation/sdk';
3
+ declare global {
4
+ interface Window {
5
+ targetTab: chrome.tabs.Tab;
6
+ moduleHandler: (...args: Array<any>) => void;
7
+ }
8
+ }
9
+ declare module '@module-federation/runtime' {
10
+ interface Federation {
11
+ originModuleInfo: GlobalModuleInfo;
12
+ }
13
+ }
@@ -0,0 +1,24 @@
1
+ export declare const FormID = "FormID";
2
+ export declare const ENABLEHMR = "enableHMR";
3
+ export declare const proxyFormField = "proxyFormField";
4
+ export declare const defaultDataItem: {
5
+ key: string;
6
+ value: string;
7
+ checked: boolean;
8
+ };
9
+ export declare const defaultModuleData: {
10
+ proxyFormField: {
11
+ key: string;
12
+ value: string;
13
+ checked: boolean;
14
+ }[];
15
+ };
16
+ export declare const statusInfo: Record<string, {
17
+ status: string;
18
+ message: string;
19
+ color: string;
20
+ }>;
21
+ export declare const __ENABLE_FAST_REFRESH__ = "enableFastRefresh";
22
+ export declare const __EAGER_SHARE__ = "eagerShare";
23
+ export declare const BROWSER_ENV_KEY = "MF_ENV";
24
+ export declare const __FEDERATION_DEVTOOLS__ = "__MF_DEVTOOLS__";
@@ -0,0 +1 @@
1
+ export * from './constant';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="chrome" />
2
+ import { GlobalModuleInfo } from '@module-federation/sdk';
3
+ export * from './storage';
4
+ export declare const injectPostMessage: (postMessageUrl: string) => void;
5
+ export declare const TabInfo: {
6
+ currentTabId: number;
7
+ };
8
+ export declare function getCurrentTabId(): number;
9
+ export declare function getInspectWindowTabId(): Promise<unknown>;
10
+ export declare const getGlobalModuleInfo: (callback: React.Dispatch<React.SetStateAction<GlobalModuleInfo>>) => Promise<void>;
11
+ export declare const getTabs: (queryOptions?: {}) => Promise<chrome.tabs.Tab[]>;
12
+ export declare const getScope: () => Promise<string>;
13
+ export declare const injectScript: (excuteScript: (...args: Array<any>) => any, world?: boolean, ...args: any) => Promise<void>;
14
+ export declare const getUrl: (file: string) => string;
15
+ export declare const injectToast: (toastUtilUrl: string, e2eFlag: string) => void;
16
+ export declare const setChromeStorage: (formData: Record<string, any>) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ declare const moduleInfo: import("@module-federation/sdk/.").GlobalModuleInfo;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ declare global {
2
+ var __INIT_VMOK_CHROME_DEVTOOL_PLUGIN__: boolean | undefined;
3
+ }
4
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const mergeStorage: (...args: any[]) => Promise<void>;
2
+ export declare const removeStorageKey: (...args: any[]) => Promise<void>;
3
+ export declare const removeStorage: (...args: any[]) => Promise<void>;
4
+ export declare const setStorage: (...args: any[]) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ export declare const separateType: (moduleInfo: GlobalModuleInfo) => {
3
+ consumers: Record<string, import("@module-federation/sdk").ModuleInfo | import("@module-federation/sdk").ManifestProvider | import("@module-federation/sdk").PureEntryProvider | undefined>;
4
+ producer: string[];
5
+ };
6
+ export declare const getModuleInfo: (proxyRules: Array<any>) => Promise<{
7
+ status: string;
8
+ moduleInfo: GlobalModuleInfo;
9
+ overrides: Record<string, string>;
10
+ }>;
11
+ export * from './snapshot';
@@ -0,0 +1,3 @@
1
+ import { GlobalModuleInfo } from '@module-federation/sdk';
2
+ export declare const calculateSnapshot: (originSnapshot: GlobalModuleInfo, overrides: Record<string, string>) => any;
3
+ export declare const calculateMicroAppSnapshot: (originSnapshot: GlobalModuleInfo, overrides: Record<string, string>) => any;
@@ -0,0 +1,4 @@
1
+ export * from './chrome';
2
+ export * from './sdk';
3
+ export * from './data';
4
+ export * from './types';
@@ -0,0 +1,45 @@
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 | undefined, type: string, id?: string): void;
44
+ identify(): string;
45
+ }
@@ -0,0 +1,10 @@
1
+ export * from './graph';
2
+ export declare const setLocalStorage: (key: string, value: any) => void;
3
+ export declare const removeLocalStorage: (key: string) => void;
4
+ export declare const mergeLocalStorage: (target: string, key: string, value: any) => void;
5
+ export declare const removeLocalStorageKey: (target: string, key: string) => void;
6
+ export declare const isObject: (target: any) => boolean;
7
+ export declare const reloadPage: () => void;
8
+ export declare const validateCustom: (schema: string) => boolean;
9
+ export declare const getUnpkgUrl: (pkg: string, version: string) => string | undefined;
10
+ export declare const definePropertyGlobalVal: (target: Record<string, any>, key: string, val: any) => void;
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import { getModuleInfo } from '../index';
3
+ export interface FormItemStatus {
4
+ keyStatus: boolean;
5
+ valueStatus: boolean;
6
+ }
7
+ type ParametersTypeOfRoot = Parameters<typeof getModuleInfo>;
8
+ type ReturnTypeOfRoot = ReturnType<typeof getModuleInfo>;
9
+ export interface RootComponentProps {
10
+ handleSnapshot?: (...args: ParametersTypeOfRoot) => Promise<ReturnTypeOfRoot>;
11
+ versionList?: Array<Array<string>>;
12
+ setVersionList?: React.Dispatch<React.SetStateAction<Array<Array<string>>>>;
13
+ getVersion?: (moduleName: string) => Promise<Array<string>>;
14
+ handleProxyAddress?: (address: string) => string;
15
+ customValueValidate?: (schema: string) => boolean;
16
+ headerSlot?: ReactNode;
17
+ }
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from './common';
File without changes
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import '../src/init';
3
+ import '../mock';
4
+ declare const _default: {
5
+ title: string;
6
+ component: () => React.JSX.Element;
7
+ };
8
+ export default _default;
9
+ export declare const Primary: {};
@@ -0,0 +1,19 @@
1
+ if [ "$SKIP_DEVTOOLS_POSTINSTALL" = "true" ]; then
2
+ echo "Skipping devtools postinstall script."
3
+ exit 0
4
+ fi
5
+
6
+ if [ "$GITHUB_ACTIONS" = "true" ]; then
7
+ echo "Running in GitHub Actions environment."
8
+ # Only install if cache miss was reported by the cache action
9
+ if [ "$PLAYWRIGHT_CACHE_HIT" != "true" ]; then
10
+ echo "Playwright cache miss, installing dependencies and browsers..."
11
+ npx playwright install-deps && npx playwright install
12
+ else
13
+ npx playwright install
14
+ echo "Using cached Playwright browsers."
15
+ fi
16
+ else
17
+ echo "Not running in GitHub Actions environment."
18
+ # 在这里放置不在 GitHub Actions 环境时要执行的命令
19
+ fi
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@module-federation/devtools",
3
+ "version": "0.0.0-docs-remove-invalid-lark-link-20251205062649",
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/App.d.ts",
18
+ "require": "./dist/lib/App.js",
19
+ "import": "./dist/es/App.js"
20
+ },
21
+ "./App": {
22
+ "types": "./dist/types/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
+ "@arco-design/web-react": "^2.64.1",
41
+ "@modern-js/runtime": "2.68.2",
42
+ "ahooks": "^3.7.10",
43
+ "dagre": "^0.8.5",
44
+ "react": "~18.3.1",
45
+ "react-dom": "~18.3.1",
46
+ "reactflow": "11.11.4",
47
+ "@module-federation/sdk": "0.0.0-docs-remove-invalid-lark-link-20251205062649"
48
+ },
49
+ "devDependencies": {
50
+ "@modern-js-app/eslint-config": "2.59.0",
51
+ "@modern-js/app-tools": "2.68.2",
52
+ "@modern-js/eslint-config": "2.59.0",
53
+ "@modern-js/module-tools": "2.68.2",
54
+ "@modern-js/storybook": "2.68.2",
55
+ "@modern-js/tsconfig": "2.68.2",
56
+ "@playwright/test": "1.49.1",
57
+ "@types/chrome": "^0.0.272",
58
+ "@types/dagre": "^0.7.52",
59
+ "@types/jest": "~29.2.4",
60
+ "@types/node": "~20.12.12",
61
+ "@types/react": "~18.2.0",
62
+ "@types/react-dom": "~18.3.0",
63
+ "lint-staged": "~13.1.0",
64
+ "prettier": "~3.3.3",
65
+ "rimraf": "~6.0.1",
66
+ "typescript": "~5.0.4",
67
+ "vitest": "1.2.2",
68
+ "@module-federation/runtime": "0.0.0-docs-remove-invalid-lark-link-20251205062649"
69
+ },
70
+ "scripts": {
71
+ "build:storybook": "storybook build",
72
+ "storybook": "storybook dev -p 6006",
73
+ "reset": "npx rimraf ./**/node_modules",
74
+ "dev": "modern-app dev",
75
+ "build": "modern-app build && node postpack.js",
76
+ "build:debug": "DEBUG=true modern-app build && node postpack.js",
77
+ "build:lib": "rm -rf dist && modern-module build -c modern.lib.config.ts",
78
+ "release": "npm publish --tag canary",
79
+ "test": "vitest run",
80
+ "test:e2e": "E2ETEST=true pnpm build && playwright test",
81
+ "test:e2e:ui": "E2ETEST=true pnpm build && playwright test --ui",
82
+ "start": "modern-app start",
83
+ "serve": "modern-app serve",
84
+ "postinstall": "bash install-deps.bash"
85
+ },
86
+ "types": "./dist/index.d.ts"
87
+ }