示例工程 49-handrolled-vite-config
49-handrolled-vite-config/app/shared/ipc.ts
export const CH = {
snapshot: "build:snapshot",
refresh: "build:refresh",
} as const;
export type EventRow = {
at: number;
kind: string;
detail: string;
};
export type Check = {
id: string;
label: string;
pass: boolean;
detail: string;
};
export type Artifact = {
target: string;
entry: string;
outDir: string;
format: string;
external: string[];
file: string;
exists: boolean;
bytes: number;
sourcemap: boolean;
};
export type Probe = {
url: string;
requireType: string;
processType: string;
relativeScript: boolean;
scriptSrcs: string[];
styleCount: number;
csp: string;
};
export type Snapshot = {
platform: string;
electronVersion: string;
nodeVersion: string;
mainDir: string;
appPath: string;
resourcesPath: string;
devUrl: string;
artifacts: Artifact[];
probe: Probe;
checks: Check[];
score: number;
events: EventRow[];
};