@code-pushup/models 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -8
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
- package/src/lib/plugin-config-groups.d.ts +14 -0
- package/src/lib/plugin-config.d.ts +1 -0
package/index.js
CHANGED
|
@@ -232,19 +232,18 @@ var auditGroupRefSchema = weightedRefSchema(
|
|
|
232
232
|
"Weighted references to audits",
|
|
233
233
|
"Reference slug to an audit within this plugin (e.g. 'max-lines')"
|
|
234
234
|
);
|
|
235
|
+
var auditGroupMetaSchema = metaSchema({
|
|
236
|
+
titleDescription: "Descriptive name for the group",
|
|
237
|
+
descriptionDescription: "Description of the group (markdown)",
|
|
238
|
+
docsUrlDescription: "Group documentation site",
|
|
239
|
+
description: "Group metadata"
|
|
240
|
+
});
|
|
235
241
|
var auditGroupSchema = scorableSchema(
|
|
236
242
|
'An audit group aggregates a set of audits into a single score which can be referenced from a category. E.g. the group slug "performance" groups audits and can be referenced in a category',
|
|
237
243
|
auditGroupRefSchema,
|
|
238
244
|
getDuplicateRefsInGroups,
|
|
239
245
|
duplicateRefsInGroupsErrorMsg
|
|
240
|
-
).merge(
|
|
241
|
-
metaSchema({
|
|
242
|
-
titleDescription: "Descriptive name for the group",
|
|
243
|
-
descriptionDescription: "Description of the group (markdown)",
|
|
244
|
-
docsUrlDescription: "Group documentation site",
|
|
245
|
-
description: "Group metadata"
|
|
246
|
-
})
|
|
247
|
-
);
|
|
246
|
+
).merge(auditGroupMetaSchema);
|
|
248
247
|
var auditGroupsSchema = z5.array(auditGroupSchema, {
|
|
249
248
|
description: "List of groups"
|
|
250
249
|
}).optional().refine(
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { CoreConfig, coreConfigSchema, refineCoreConfig, unrefinedCoreConfigSche
|
|
|
3
3
|
export { MAX_DESCRIPTION_LENGTH, MAX_SLUG_LENGTH, MAX_TITLE_LENGTH, } from './lib/implementation/limits';
|
|
4
4
|
export { materialIconSchema } from './lib/implementation/schemas';
|
|
5
5
|
export { Format, PersistConfig, formatSchema, persistConfigSchema, } from './lib/persist-config';
|
|
6
|
-
export { PluginConfig, pluginConfigSchema } from './lib/plugin-config';
|
|
6
|
+
export { PluginConfig, pluginConfigSchema, PluginMeta, } from './lib/plugin-config';
|
|
7
7
|
export { Audit, auditSchema, pluginAuditsSchema, } from './lib/plugin-config-audits';
|
|
8
8
|
export { AuditGroup, AuditGroupRef, auditGroupSchema, } from './lib/plugin-config-groups';
|
|
9
9
|
export { OnProgress, RunnerConfig, RunnerFunction, onProgressSchema, runnerConfigSchema, } from './lib/plugin-config-runner';
|
|
@@ -10,6 +10,20 @@ export declare const auditGroupRefSchema: z.ZodObject<{
|
|
|
10
10
|
weight: number;
|
|
11
11
|
}>;
|
|
12
12
|
export type AuditGroupRef = z.infer<typeof auditGroupRefSchema>;
|
|
13
|
+
export declare const auditGroupMetaSchema: z.ZodObject<{
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
docsUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodString]>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
title: string;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
docsUrl?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
title: string;
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
docsUrl?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type AuditGroupMeta = z.infer<typeof auditGroupMetaSchema>;
|
|
13
27
|
export declare const auditGroupSchema: z.ZodObject<{
|
|
14
28
|
slug: z.ZodString;
|
|
15
29
|
refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
@@ -24,6 +24,7 @@ export declare const pluginMetaSchema: z.ZodObject<{
|
|
|
24
24
|
packageName?: string | undefined;
|
|
25
25
|
version?: string | undefined;
|
|
26
26
|
}>;
|
|
27
|
+
export type PluginMeta = z.infer<typeof pluginMetaSchema>;
|
|
27
28
|
export declare const pluginDataSchema: z.ZodObject<{
|
|
28
29
|
runner: z.ZodUnion<[z.ZodObject<{
|
|
29
30
|
command: z.ZodString;
|