mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
30 lines
878 B
TypeScript
30 lines
878 B
TypeScript
import type { ResolvedPolicyPaths } from "./permission-manager";
|
|
|
|
export interface ResolvedConfigLogEntry {
|
|
globalConfigPath: string;
|
|
globalConfigExists: boolean;
|
|
agentsDir: string;
|
|
agentsDirExists: boolean;
|
|
projectAgentsDir: string | null;
|
|
projectAgentsDirExists: boolean;
|
|
legacyGlobalPolicyDetected: boolean;
|
|
legacyExtensionConfigDetected: boolean;
|
|
}
|
|
|
|
export interface BuildResolvedConfigLogEntryOptions {
|
|
policyPaths: ResolvedPolicyPaths;
|
|
legacyGlobalPolicyDetected?: boolean;
|
|
legacyExtensionConfigDetected?: boolean;
|
|
}
|
|
|
|
export function buildResolvedConfigLogEntry(
|
|
options: BuildResolvedConfigLogEntryOptions,
|
|
): ResolvedConfigLogEntry {
|
|
return {
|
|
...options.policyPaths,
|
|
legacyGlobalPolicyDetected: options.legacyGlobalPolicyDetected ?? false,
|
|
legacyExtensionConfigDetected:
|
|
options.legacyExtensionConfigDetected ?? false,
|
|
};
|
|
}
|