import { formatConfigIssueLines } from "../../../config/issue-format.js"; import { stripUnknownConfigKeys } from "../../doctor-config-analysis.js"; import type { DoctorConfigPreflightResult } from "../../doctor-config-preflight.js"; import type { DoctorConfigMutationState } from "./config-mutation-state.js"; import { migrateLegacyConfig } from "./legacy-config-migrate.js";
return {
state: { // Doctor should keep using the best-effort migrated shape in memory even // during preview mode; confirmation only controls whether we write it.
cfg: migrated,
candidate: migrated, // The read path can normalize legacy config into the snapshot before // migrateLegacyConfig emits concrete mutations. Legacy issues still mean // the on-disk config needs a doctor --fix path.
pendingChanges: params.state.pendingChanges || params.snapshot.legacyIssues.length > 0,
fixHints: params.shouldRepair
? params.state.fixHints
: [
...params.state.fixHints,
`Run "${params.doctorFixCommand}" to migrate legacy config keys.`,
],
},
issueLines,
changeLines: changes,
};
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.