@code-pushup/models 0.53.0 → 0.54.0
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 +2 -3
- package/package.json +18 -8
- package/src/index.d.ts +1 -1
- package/src/lib/core-config.d.ts +21 -21
- package/src/lib/implementation/schemas.d.ts +1 -2
- package/src/lib/plugin-config.d.ts +8 -8
- package/src/lib/report.d.ts +14 -14
- package/src/lib/reports-diff.d.ts +12 -12
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var MAX_ISSUE_MESSAGE_LENGTH = 1024;
|
|
|
12
12
|
var slugRegex = /^[a-z\d]+(?:-[a-z\d]+)*$/;
|
|
13
13
|
var filenameRegex = /^(?!.*[ \\/:*?"<>|]).+$/;
|
|
14
14
|
function hasDuplicateStrings(strings) {
|
|
15
|
-
const sortedStrings =
|
|
15
|
+
const sortedStrings = strings.toSorted();
|
|
16
16
|
const duplStrings = sortedStrings.filter(
|
|
17
17
|
(item, index) => index !== 0 && item === sortedStrings[index - 1]
|
|
18
18
|
);
|
|
@@ -106,7 +106,6 @@ var fileNameSchema = z.string().trim().regex(filenameRegex, {
|
|
|
106
106
|
message: `The filename has to be valid`
|
|
107
107
|
}).min(1, { message: "file name is invalid" });
|
|
108
108
|
var positiveIntSchema = z.number().int().positive();
|
|
109
|
-
var nonnegativeIntSchema = z.number().int().nonnegative();
|
|
110
109
|
var nonnegativeNumberSchema = z.number().nonnegative();
|
|
111
110
|
function packageVersionSchema(options) {
|
|
112
111
|
const { versionDescription = "NPM version of the package", required } = options ?? {};
|
|
@@ -660,7 +659,7 @@ var auditDiffSchema = scorableWithPluginDiffSchema.merge(
|
|
|
660
659
|
z16.object({
|
|
661
660
|
values: makeComparisonSchema(auditValueSchema).merge(
|
|
662
661
|
z16.object({
|
|
663
|
-
diff: z16.number().
|
|
662
|
+
diff: z16.number().describe("Value change (`values.after - values.before`)")
|
|
664
663
|
})
|
|
665
664
|
).describe("Audit `value` comparison"),
|
|
666
665
|
displayValues: makeComparisonSchema(auditDisplayValueSchema).describe(
|
package/package.json
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Model definitions and validators for the Code PushUp CLI",
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"zod": "^3.22.1",
|
|
8
|
-
"vscode-material-icons": "^0.1.0"
|
|
9
|
-
},
|
|
10
6
|
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/models#readme",
|
|
11
7
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/code-pushup/cli/issues"
|
|
8
|
+
"url": "https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3A\"🧩%20models\""
|
|
13
9
|
},
|
|
14
10
|
"repository": {
|
|
15
11
|
"type": "git",
|
|
16
12
|
"url": "git+https://github.com/code-pushup/cli.git",
|
|
17
13
|
"directory": "packages/models"
|
|
18
14
|
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"CLI",
|
|
17
|
+
"Code PushUp",
|
|
18
|
+
"developer tools",
|
|
19
|
+
"code quality",
|
|
20
|
+
"conformance",
|
|
21
|
+
"type definition",
|
|
22
|
+
"validators",
|
|
23
|
+
"models"
|
|
24
|
+
],
|
|
19
25
|
"publishConfig": {
|
|
20
26
|
"access": "public"
|
|
21
27
|
},
|
|
22
28
|
"type": "module",
|
|
23
29
|
"main": "./index.js",
|
|
24
|
-
"types": "./src/index.d.ts"
|
|
25
|
-
|
|
30
|
+
"types": "./src/index.d.ts",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"zod": "^3.22.1",
|
|
33
|
+
"vscode-material-icons": "^0.1.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { type AuditDetails, type AuditOutput, type AuditOutputs, auditDetailsSch
|
|
|
5
5
|
export { type CategoryConfig, type CategoryRef, categoryConfigSchema, categoryRefSchema, } from './lib/category-config';
|
|
6
6
|
export { type Commit, commitSchema } from './lib/commit';
|
|
7
7
|
export { type CoreConfig, coreConfigSchema } from './lib/core-config';
|
|
8
|
-
export { type Group, type GroupRef, groupRefSchema, groupSchema, } from './lib/group';
|
|
8
|
+
export { type Group, type GroupRef, type GroupMeta, groupRefSchema, groupSchema, } from './lib/group';
|
|
9
9
|
export { CONFIG_FILE_NAME, SUPPORTED_CONFIG_FILE_FORMATS, } from './lib/implementation/configuration';
|
|
10
10
|
export { DEFAULT_PERSIST_FILENAME, DEFAULT_PERSIST_FORMAT, DEFAULT_PERSIST_OUTPUT_DIR, } from './lib/implementation/constants';
|
|
11
11
|
export { MAX_DESCRIPTION_LENGTH, MAX_ISSUE_MESSAGE_LENGTH, MAX_SLUG_LENGTH, MAX_TITLE_LENGTH, } from './lib/implementation/limits';
|