New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@code-pushup/models

Package Overview
Dependencies
Maintainers
3
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-pushup/models - npm Package Compare versions

Comparing version 0.25.7 to 0.26.0

src/lib/commit.d.ts

83

index.js

@@ -315,19 +315,38 @@ // packages/models/src/lib/audit.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(

@@ -349,3 +368,3 @@ "Weighted reference to a group",

).merge(groupMetaSchema);
var groupsSchema = z7.array(groupSchema, {
var groupsSchema = z8.array(groupSchema, {
description: "List of groups"

@@ -378,10 +397,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"),

@@ -394,4 +413,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)]));

@@ -407,3 +426,3 @@ // packages/models/src/lib/plugin-config.ts

).merge(
z9.object({
z10.object({
slug: slugSchema.describe("Unique plugin slug within core config"),

@@ -413,4 +432,4 @@ icon: materialIconSchema

);
var pluginDataSchema = z9.object({
runner: z9.union([runnerConfigSchema, runnerFunctionSchema]),
var pluginDataSchema = z10.object({
runner: z10.union([runnerConfigSchema, runnerFunctionSchema]),
audits: pluginAuditsSchema,

@@ -441,6 +460,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)"

@@ -452,8 +471,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)"

@@ -490,3 +509,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);

@@ -499,5 +518,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()
})

@@ -536,6 +555,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()
},

@@ -570,2 +590,3 @@ { description: "Collect output data" }

categoryRefSchema,
commitSchema,
coreConfigSchema,

@@ -572,0 +593,0 @@ exists,

{
"name": "@code-pushup/models",
"version": "0.25.7",
"version": "0.26.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "dependencies": {

export { Audit, auditSchema } from './lib/audit';
export { AuditDetails, AuditOutput, AuditOutputs, auditDetailsSchema, auditOutputSchema, auditOutputsSchema, } from './lib/audit-output';
export { CategoryConfig, CategoryRef, categoryConfigSchema, categoryRefSchema, } from './lib/category-config';
export { Commit, commitSchema } from './lib/commit';
export { CoreConfig, coreConfigSchema } from './lib/core-config';

@@ -5,0 +6,0 @@ export { Group, GroupRef, groupRefSchema, groupSchema } from './lib/group';

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc