perf(setup): reuse initial diagnostics during planning (#940)

* perf(setup): reuse initial diagnostics during planning

* test(setup): verify post-configuration doctor refresh

* style(setup): remove extra test spacing
This commit is contained in:
morluto
2026-10-07 19:52:43 +08:00
committed by GitHub
parent c92a344d47
commit 118d43e787
6 changed files with 105 additions and 4 deletions
+5
View File
@@ -52,6 +52,11 @@ export class FakeSetupHost implements SetupHost {
linuxDistribution = (): Promise<LinuxDistribution | undefined> =>
Promise.resolve(this.distribution);
hopperPath = (): Promise<string | undefined> => Promise.resolve(this.hopper);
initialSetupState = async (scope?: DoctorScope) => ({
...(this.hopper === undefined ? {} : { hopperPath: this.hopper }),
providerEnvironment: await this.providerEnvironment(),
doctor: await this.doctor(scope),
});
providerEnvironment = (): Promise<SetupProviderEnvironment> =>
Promise.resolve({
...(this.hopper === undefined