UNPKG

@code-pushup/js-packages-plugin

Version:
63 lines (62 loc) 2.62 kB
import { z } from 'zod'; import { type IssueSeverity } from '@code-pushup/models'; export declare const dependencyGroups: readonly ["prod", "dev", "optional"]; export type DependencyGroup = (typeof dependencyGroups)[number]; declare const packageCommandSchema: z.ZodEnum<{ audit: "audit"; outdated: "outdated"; }>; export type PackageCommand = z.infer<typeof packageCommandSchema>; declare const packageManagerIdSchema: z.ZodEnum<{ npm: "npm"; "yarn-classic": "yarn-classic"; "yarn-modern": "yarn-modern"; pnpm: "pnpm"; }>; export type PackageManagerId = z.infer<typeof packageManagerIdSchema>; declare const packageJsonPathSchema: z.ZodDefault<z.ZodString>; export type PackageJsonPath = z.infer<typeof packageJsonPathSchema>; export declare const packageAuditLevels: readonly ["critical", "high", "moderate", "low", "info"]; declare const packageAuditLevelSchema: z.ZodEnum<{ critical: "critical"; high: "high"; moderate: "moderate"; low: "low"; info: "info"; }>; export type PackageAuditLevel = z.infer<typeof packageAuditLevelSchema>; export type AuditSeverity = Record<PackageAuditLevel, IssueSeverity>; export declare function fillAuditLevelMapping(mapping: Partial<AuditSeverity>): AuditSeverity; export declare const jsPackagesPluginConfigSchema: z.ZodObject<{ checks: z.ZodDefault<z.ZodArray<z.ZodEnum<{ audit: "audit"; outdated: "outdated"; }>>>; packageManager: z.ZodOptional<z.ZodEnum<{ npm: "npm"; "yarn-classic": "yarn-classic"; "yarn-modern": "yarn-modern"; pnpm: "pnpm"; }>>; dependencyGroups: z.ZodDefault<z.ZodArray<z.ZodEnum<{ prod: "prod"; dev: "dev"; optional: "optional"; }>>>; auditLevelMapping: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodEnum<{ critical: "critical"; high: "high"; moderate: "moderate"; low: "low"; info: "info"; }> & z.core.$partial, z.ZodEnum<{ error: "error"; info: "info"; warning: "warning"; }>>>, z.ZodTransform<AuditSeverity, Partial<Record<"critical" | "high" | "moderate" | "low" | "info", "info" | "error" | "warning">>>>; packageJsonPath: z.ZodDefault<z.ZodString>; scoreTargets: z.ZodOptional<z.ZodUnion<readonly [z.ZodOptional<z.ZodNumber>, z.ZodRecord<z.ZodString, z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>>]>>; }, z.core.$strip>; export type JSPackagesPluginConfig = z.input<typeof jsPackagesPluginConfigSchema>; export type FinalJSPackagesPluginConfig = Required<Omit<z.infer<typeof jsPackagesPluginConfigSchema>, 'scoreTargets'>>; export {};