@@ -3,7 +3,7 @@ import path from "path";
33
44import type { ActionState } from "./action-common" ;
55import { getTemporaryDirectory } from "./actions-util" ;
6- import type { Config } from "./config-utils " ;
6+ import type { ActionConfig } from "./config/action-config " ;
77import { Language } from "./languages" ;
88import { getActionsLogger , type Logger } from "./logging" ;
99import {
@@ -160,7 +160,7 @@ export function getDiagnosticsPath(basePath: string, language?: Language) {
160160 * @param diagnostic The diagnostic message to add to the database.
161161 */
162162export function addDiagnostic (
163- config : Config ,
163+ config : ActionConfig < "dbLocation" | "tempDir" > ,
164164 language : Language ,
165165 diagnostic : DiagnosticMessage ,
166166 logger : Logger = getActionsLogger ( ) ,
@@ -185,7 +185,7 @@ export function addDiagnostic(
185185
186186/** Adds a diagnostic that is not specific to any language. */
187187export function addNoLanguageDiagnostic (
188- config : Config | undefined ,
188+ config : ActionConfig < "languages" | "dbLocation" | "tempDir" > | undefined ,
189189 diagnostic : DiagnosticMessage ,
190190 logger : Logger = getActionsLogger ( ) ,
191191) {
@@ -268,7 +268,7 @@ function writeDiagnosticFile(
268268
269269/** Gets the path where diagnostics for {@link language} should be stored in the database. */
270270export function getDatabaseDiagnosticsPath (
271- config : Config ,
271+ config : ActionConfig < "dbLocation" > ,
272272 language : Language | undefined ,
273273) {
274274 return getDiagnosticsPath ( config . dbLocation , language ) ;
@@ -283,7 +283,7 @@ export function getDatabaseDiagnosticsPath(
283283 */
284284function writeDiagnostic (
285285 action : ActionState < [ "Logger" ] > ,
286- config : Config ,
286+ config : ActionConfig < "dbLocation" > ,
287287 language : Language | undefined ,
288288 diagnostic : DiagnosticMessage ,
289289) {
@@ -317,7 +317,7 @@ export function logTemporaryDiagnostics(action: ActionState<["Logger"]>) {
317317/** Relocates all temporary diagnostics to the respective databases. */
318318export function flushDiagnostics (
319319 action : ActionState < [ "Logger" ] > ,
320- config : Config ,
320+ config : ActionConfig < "dbLocation" | "languages" > ,
321321) {
322322 const diagnosticsCount = temporaryDiagnostics . length ;
323323 action . logger . debug (
0 commit comments