@code-pushup/eslint-plugin
Advanced tools
Comparing version 0.25.7 to 0.26.0
82
bin.js
@@ -319,19 +319,38 @@ // packages/plugin-eslint/src/lib/runner/index.ts | ||
// packages/models/src/lib/commit.ts | ||
import { z as z6 } from "zod"; | ||
var commitSchema = z6.object( | ||
{ | ||
hash: z6.string({ description: "Commit SHA (full)" }).regex( | ||
/^[\da-f]{40}$/, | ||
"Commit SHA should be a 40-character hexadecimal string" | ||
), | ||
message: z6.string({ description: "Commit message" }), | ||
date: z6.coerce.date({ | ||
description: "Date and time when commit was authored" | ||
}), | ||
author: z6.string({ | ||
description: "Commit author name" | ||
}).trim() | ||
}, | ||
{ description: "Git commit" } | ||
); | ||
// packages/models/src/lib/core-config.ts | ||
import { z as z11 } from "zod"; | ||
import { z as z12 } from "zod"; | ||
// packages/models/src/lib/persist-config.ts | ||
import { z as z6 } from "zod"; | ||
var formatSchema = z6.enum(["json", "md"]); | ||
var persistConfigSchema = z6.object({ | ||
import { z as z7 } from "zod"; | ||
var formatSchema = z7.enum(["json", "md"]); | ||
var persistConfigSchema = z7.object({ | ||
outputDir: filePathSchema.describe("Artifacts folder").optional(), | ||
filename: fileNameSchema.describe("Artifacts file name (without extension)").optional(), | ||
format: z6.array(formatSchema).optional() | ||
format: z7.array(formatSchema).optional() | ||
}); | ||
// packages/models/src/lib/plugin-config.ts | ||
import { z as z9 } from "zod"; | ||
import { z as z10 } from "zod"; | ||
// packages/models/src/lib/group.ts | ||
import { z as z7 } from "zod"; | ||
import { z as z8 } from "zod"; | ||
var groupRefSchema = weightedRefSchema( | ||
@@ -353,3 +372,3 @@ "Weighted reference to a group", | ||
).merge(groupMetaSchema); | ||
var groupsSchema = z7.array(groupSchema, { | ||
var groupsSchema = z8.array(groupSchema, { | ||
description: "List of groups" | ||
@@ -382,10 +401,10 @@ }).optional().refine( | ||
// packages/models/src/lib/runner-config.ts | ||
import { z as z8 } from "zod"; | ||
var outputTransformSchema = z8.function().args(z8.unknown()).returns(z8.union([auditOutputsSchema, z8.promise(auditOutputsSchema)])); | ||
var runnerConfigSchema = z8.object( | ||
import { z as z9 } from "zod"; | ||
var outputTransformSchema = z9.function().args(z9.unknown()).returns(z9.union([auditOutputsSchema, z9.promise(auditOutputsSchema)])); | ||
var runnerConfigSchema = z9.object( | ||
{ | ||
command: z8.string({ | ||
command: z9.string({ | ||
description: "Shell command to execute" | ||
}), | ||
args: z8.array(z8.string({ description: "Command arguments" })).optional(), | ||
args: z9.array(z9.string({ description: "Command arguments" })).optional(), | ||
outputFile: filePathSchema.describe("Output path"), | ||
@@ -398,4 +417,4 @@ outputTransform: outputTransformSchema.optional() | ||
); | ||
var onProgressSchema = z8.function().args(z8.unknown()).returns(z8.void()); | ||
var runnerFunctionSchema = z8.function().args(onProgressSchema.optional()).returns(z8.union([auditOutputsSchema, z8.promise(auditOutputsSchema)])); | ||
var onProgressSchema = z9.function().args(z9.unknown()).returns(z9.void()); | ||
var runnerFunctionSchema = z9.function().args(onProgressSchema.optional()).returns(z9.union([auditOutputsSchema, z9.promise(auditOutputsSchema)])); | ||
@@ -411,3 +430,3 @@ // packages/models/src/lib/plugin-config.ts | ||
).merge( | ||
z9.object({ | ||
z10.object({ | ||
slug: slugSchema.describe("Unique plugin slug within core config"), | ||
@@ -417,4 +436,4 @@ icon: materialIconSchema | ||
); | ||
var pluginDataSchema = z9.object({ | ||
runner: z9.union([runnerConfigSchema, runnerFunctionSchema]), | ||
var pluginDataSchema = z10.object({ | ||
runner: z10.union([runnerConfigSchema, runnerFunctionSchema]), | ||
audits: pluginAuditsSchema, | ||
@@ -445,6 +464,6 @@ groups: groupsSchema | ||
// packages/models/src/lib/upload-config.ts | ||
import { z as z10 } from "zod"; | ||
var uploadConfigSchema = z10.object({ | ||
import { z as z11 } from "zod"; | ||
var uploadConfigSchema = z11.object({ | ||
server: urlSchema.describe("URL of deployed portal API"), | ||
apiKey: z10.string({ | ||
apiKey: z11.string({ | ||
description: "API key with write access to portal (use `process.env` for security)" | ||
@@ -456,8 +475,8 @@ }), | ||
project: slugSchema.describe("Project slug from Code PushUp portal"), | ||
timeout: z10.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional() | ||
timeout: z11.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional() | ||
}); | ||
// packages/models/src/lib/core-config.ts | ||
var unrefinedCoreConfigSchema = z11.object({ | ||
plugins: z11.array(pluginConfigSchema, { | ||
var unrefinedCoreConfigSchema = z12.object({ | ||
plugins: z12.array(pluginConfigSchema, { | ||
description: "List of plugins to be used (official, community-provided, or custom)" | ||
@@ -485,3 +504,3 @@ }).min(1), | ||
// packages/models/src/lib/report.ts | ||
import { z as z12 } from "zod"; | ||
import { z as z13 } from "zod"; | ||
var auditReportSchema = auditSchema.merge(auditOutputSchema); | ||
@@ -494,5 +513,5 @@ var pluginReportSchema = pluginMetaSchema.merge( | ||
).merge( | ||
z12.object({ | ||
audits: z12.array(auditReportSchema).min(1), | ||
groups: z12.array(groupSchema).optional() | ||
z13.object({ | ||
audits: z13.array(auditReportSchema).min(1), | ||
groups: z13.array(groupSchema).optional() | ||
}) | ||
@@ -531,6 +550,7 @@ ).refine( | ||
).merge( | ||
z12.object( | ||
z13.object( | ||
{ | ||
categories: z12.array(categoryConfigSchema), | ||
plugins: z12.array(pluginReportSchema).min(1) | ||
categories: z13.array(categoryConfigSchema), | ||
plugins: z13.array(pluginReportSchema).min(1), | ||
commit: commitSchema.describe("Git commit for which report was collected").nullable() | ||
}, | ||
@@ -537,0 +557,0 @@ { description: "Collect output data" } |
84
index.js
@@ -8,3 +8,3 @@ // packages/plugin-eslint/src/lib/eslint-plugin.ts | ||
var name = "@code-pushup/eslint-plugin"; | ||
var version = "0.25.7"; | ||
var version = "0.26.0"; | ||
@@ -342,19 +342,38 @@ // packages/plugin-eslint/src/lib/config.ts | ||
// packages/models/src/lib/commit.ts | ||
import { z as z7 } from "zod"; | ||
var commitSchema = z7.object( | ||
{ | ||
hash: z7.string({ description: "Commit SHA (full)" }).regex( | ||
/^[\da-f]{40}$/, | ||
"Commit SHA should be a 40-character hexadecimal string" | ||
), | ||
message: z7.string({ description: "Commit message" }), | ||
date: z7.coerce.date({ | ||
description: "Date and time when commit was authored" | ||
}), | ||
author: z7.string({ | ||
description: "Commit author name" | ||
}).trim() | ||
}, | ||
{ description: "Git commit" } | ||
); | ||
// packages/models/src/lib/core-config.ts | ||
import { z as z12 } from "zod"; | ||
import { z as z13 } from "zod"; | ||
// packages/models/src/lib/persist-config.ts | ||
import { z as z7 } from "zod"; | ||
var formatSchema = z7.enum(["json", "md"]); | ||
var persistConfigSchema = z7.object({ | ||
import { z as z8 } from "zod"; | ||
var formatSchema = z8.enum(["json", "md"]); | ||
var persistConfigSchema = z8.object({ | ||
outputDir: filePathSchema.describe("Artifacts folder").optional(), | ||
filename: fileNameSchema.describe("Artifacts file name (without extension)").optional(), | ||
format: z7.array(formatSchema).optional() | ||
format: z8.array(formatSchema).optional() | ||
}); | ||
// packages/models/src/lib/plugin-config.ts | ||
import { z as z10 } from "zod"; | ||
import { z as z11 } from "zod"; | ||
// packages/models/src/lib/group.ts | ||
import { z as z8 } from "zod"; | ||
import { z as z9 } from "zod"; | ||
var groupRefSchema = weightedRefSchema( | ||
@@ -376,3 +395,3 @@ "Weighted reference to a group", | ||
).merge(groupMetaSchema); | ||
var groupsSchema = z8.array(groupSchema, { | ||
var groupsSchema = z9.array(groupSchema, { | ||
description: "List of groups" | ||
@@ -405,10 +424,10 @@ }).optional().refine( | ||
// packages/models/src/lib/runner-config.ts | ||
import { z as z9 } from "zod"; | ||
var outputTransformSchema = z9.function().args(z9.unknown()).returns(z9.union([auditOutputsSchema, z9.promise(auditOutputsSchema)])); | ||
var runnerConfigSchema = z9.object( | ||
import { z as z10 } from "zod"; | ||
var outputTransformSchema = z10.function().args(z10.unknown()).returns(z10.union([auditOutputsSchema, z10.promise(auditOutputsSchema)])); | ||
var runnerConfigSchema = z10.object( | ||
{ | ||
command: z9.string({ | ||
command: z10.string({ | ||
description: "Shell command to execute" | ||
}), | ||
args: z9.array(z9.string({ description: "Command arguments" })).optional(), | ||
args: z10.array(z10.string({ description: "Command arguments" })).optional(), | ||
outputFile: filePathSchema.describe("Output path"), | ||
@@ -421,4 +440,4 @@ outputTransform: outputTransformSchema.optional() | ||
); | ||
var onProgressSchema = z9.function().args(z9.unknown()).returns(z9.void()); | ||
var runnerFunctionSchema = z9.function().args(onProgressSchema.optional()).returns(z9.union([auditOutputsSchema, z9.promise(auditOutputsSchema)])); | ||
var onProgressSchema = z10.function().args(z10.unknown()).returns(z10.void()); | ||
var runnerFunctionSchema = z10.function().args(onProgressSchema.optional()).returns(z10.union([auditOutputsSchema, z10.promise(auditOutputsSchema)])); | ||
@@ -434,3 +453,3 @@ // packages/models/src/lib/plugin-config.ts | ||
).merge( | ||
z10.object({ | ||
z11.object({ | ||
slug: slugSchema.describe("Unique plugin slug within core config"), | ||
@@ -440,4 +459,4 @@ icon: materialIconSchema | ||
); | ||
var pluginDataSchema = z10.object({ | ||
runner: z10.union([runnerConfigSchema, runnerFunctionSchema]), | ||
var pluginDataSchema = z11.object({ | ||
runner: z11.union([runnerConfigSchema, runnerFunctionSchema]), | ||
audits: pluginAuditsSchema, | ||
@@ -468,6 +487,6 @@ groups: groupsSchema | ||
// packages/models/src/lib/upload-config.ts | ||
import { z as z11 } from "zod"; | ||
var uploadConfigSchema = z11.object({ | ||
import { z as z12 } from "zod"; | ||
var uploadConfigSchema = z12.object({ | ||
server: urlSchema.describe("URL of deployed portal API"), | ||
apiKey: z11.string({ | ||
apiKey: z12.string({ | ||
description: "API key with write access to portal (use `process.env` for security)" | ||
@@ -479,8 +498,8 @@ }), | ||
project: slugSchema.describe("Project slug from Code PushUp portal"), | ||
timeout: z11.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional() | ||
timeout: z12.number({ description: "Request timeout in minutes (default is 5)" }).positive().int().optional() | ||
}); | ||
// packages/models/src/lib/core-config.ts | ||
var unrefinedCoreConfigSchema = z12.object({ | ||
plugins: z12.array(pluginConfigSchema, { | ||
var unrefinedCoreConfigSchema = z13.object({ | ||
plugins: z13.array(pluginConfigSchema, { | ||
description: "List of plugins to be used (official, community-provided, or custom)" | ||
@@ -508,3 +527,3 @@ }).min(1), | ||
// packages/models/src/lib/report.ts | ||
import { z as z13 } from "zod"; | ||
import { z as z14 } from "zod"; | ||
var auditReportSchema = auditSchema.merge(auditOutputSchema); | ||
@@ -517,5 +536,5 @@ var pluginReportSchema = pluginMetaSchema.merge( | ||
).merge( | ||
z13.object({ | ||
audits: z13.array(auditReportSchema).min(1), | ||
groups: z13.array(groupSchema).optional() | ||
z14.object({ | ||
audits: z14.array(auditReportSchema).min(1), | ||
groups: z14.array(groupSchema).optional() | ||
}) | ||
@@ -554,6 +573,7 @@ ).refine( | ||
).merge( | ||
z13.object( | ||
z14.object( | ||
{ | ||
categories: z13.array(categoryConfigSchema), | ||
plugins: z13.array(pluginReportSchema).min(1) | ||
categories: z14.array(categoryConfigSchema), | ||
plugins: z14.array(pluginReportSchema).min(1), | ||
commit: commitSchema.describe("Git commit for which report was collected").nullable() | ||
}, | ||
@@ -560,0 +580,0 @@ { description: "Collect output data" } |
{ | ||
"name": "@code-pushup/eslint-plugin", | ||
"version": "0.25.7", | ||
"version": "0.26.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
81203
1890