@code-pushup/cli 0.8.6 → 0.8.8
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 +27 -26
- package/package.json +3 -43
package/index.js
CHANGED
|
@@ -7,15 +7,15 @@ import { hideBin } from "yargs/helpers";
|
|
|
7
7
|
import chalk5 from "chalk";
|
|
8
8
|
|
|
9
9
|
// packages/core/src/lib/implementation/persist.ts
|
|
10
|
-
import { existsSync, mkdirSync } from "fs";
|
|
11
|
-
import { stat as stat2, writeFile } from "fs/promises";
|
|
12
|
-
import { join as join2 } from "path";
|
|
10
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
11
|
+
import { stat as stat2, writeFile } from "node:fs/promises";
|
|
12
|
+
import { join as join2 } from "node:path";
|
|
13
13
|
|
|
14
14
|
// packages/utils/src/lib/execute-process.ts
|
|
15
|
-
import { spawn } from "child_process";
|
|
15
|
+
import { spawn } from "node:child_process";
|
|
16
16
|
|
|
17
17
|
// packages/utils/src/lib/report.ts
|
|
18
|
-
import { join } from "path";
|
|
18
|
+
import { join } from "node:path";
|
|
19
19
|
|
|
20
20
|
// packages/models/src/lib/audit.ts
|
|
21
21
|
import { z as z2 } from "zod";
|
|
@@ -28,6 +28,7 @@ import { MATERIAL_ICONS } from "@code-pushup/portal-client";
|
|
|
28
28
|
var MAX_SLUG_LENGTH = 128;
|
|
29
29
|
var MAX_TITLE_LENGTH = 256;
|
|
30
30
|
var MAX_DESCRIPTION_LENGTH = 65536;
|
|
31
|
+
var MAX_ISSUE_MESSAGE_LENGTH = 1024;
|
|
31
32
|
|
|
32
33
|
// packages/models/src/lib/implementation/utils.ts
|
|
33
34
|
var slugRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
@@ -208,7 +209,7 @@ var issueSeveritySchema = z3.enum(["info", "warning", "error"], {
|
|
|
208
209
|
});
|
|
209
210
|
var issueSchema = z3.object(
|
|
210
211
|
{
|
|
211
|
-
message: z3.string({ description: "Descriptive error message" }).max(
|
|
212
|
+
message: z3.string({ description: "Descriptive error message" }).max(MAX_ISSUE_MESSAGE_LENGTH),
|
|
212
213
|
severity: issueSeveritySchema,
|
|
213
214
|
source: sourceFileLocationSchema.optional()
|
|
214
215
|
},
|
|
@@ -558,11 +559,11 @@ var SCORE_COLOR_RANGE = {
|
|
|
558
559
|
// packages/utils/src/lib/file-system.ts
|
|
559
560
|
import { bundleRequire } from "bundle-require";
|
|
560
561
|
import chalk from "chalk";
|
|
561
|
-
import { mkdir, readFile, readdir, stat } from "fs/promises";
|
|
562
|
+
import { mkdir, readFile, readdir, stat } from "node:fs/promises";
|
|
562
563
|
|
|
563
564
|
// packages/utils/src/lib/formatting.ts
|
|
564
565
|
function slugify(text) {
|
|
565
|
-
return text.trim().toLowerCase().replace(/\s+|\//g, "-").replace(/[^a-
|
|
566
|
+
return text.trim().toLowerCase().replace(/\s+|\//g, "-").replace(/[^a-z\d-]/g, "");
|
|
566
567
|
}
|
|
567
568
|
function formatBytes(bytes, decimals = 2) {
|
|
568
569
|
bytes = Math.max(bytes, 0);
|
|
@@ -947,6 +948,22 @@ async function getLatestCommit() {
|
|
|
947
948
|
return log?.latest;
|
|
948
949
|
}
|
|
949
950
|
|
|
951
|
+
// packages/utils/src/lib/group-by-status.ts
|
|
952
|
+
function groupByStatus(results) {
|
|
953
|
+
return results.reduce(
|
|
954
|
+
(acc, result) => {
|
|
955
|
+
if (result.status === "fulfilled") {
|
|
956
|
+
return { ...acc, fulfilled: [...acc.fulfilled, result] };
|
|
957
|
+
}
|
|
958
|
+
if (result.status === "rejected") {
|
|
959
|
+
return { ...acc, rejected: [...acc.rejected, result] };
|
|
960
|
+
}
|
|
961
|
+
return acc;
|
|
962
|
+
},
|
|
963
|
+
{ fulfilled: [], rejected: [] }
|
|
964
|
+
);
|
|
965
|
+
}
|
|
966
|
+
|
|
950
967
|
// packages/utils/src/lib/md/details.ts
|
|
951
968
|
function details(title, content, cfg = { open: false }) {
|
|
952
969
|
return `<details${cfg.open ? " open" : ""}>
|
|
@@ -1456,22 +1473,6 @@ var verboseUtils = (verbose) => ({
|
|
|
1456
1473
|
exec: getExecVerbose(verbose)
|
|
1457
1474
|
});
|
|
1458
1475
|
|
|
1459
|
-
// packages/utils/src/lib/group-by-status.ts
|
|
1460
|
-
function groupByStatus(results) {
|
|
1461
|
-
return results.reduce(
|
|
1462
|
-
(acc, result) => {
|
|
1463
|
-
if (result.status === "fulfilled") {
|
|
1464
|
-
return { ...acc, fulfilled: [...acc.fulfilled, result] };
|
|
1465
|
-
}
|
|
1466
|
-
if (result.status === "rejected") {
|
|
1467
|
-
return { ...acc, rejected: [...acc.rejected, result] };
|
|
1468
|
-
}
|
|
1469
|
-
return acc;
|
|
1470
|
-
},
|
|
1471
|
-
{ fulfilled: [], rejected: [] }
|
|
1472
|
-
);
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
1476
|
// packages/core/src/lib/implementation/persist.ts
|
|
1476
1477
|
var PersistDirError = class extends Error {
|
|
1477
1478
|
constructor(outputDir) {
|
|
@@ -1533,7 +1534,7 @@ function validateCommitData(commitData) {
|
|
|
1533
1534
|
import chalk4 from "chalk";
|
|
1534
1535
|
|
|
1535
1536
|
// packages/core/src/lib/implementation/runner.ts
|
|
1536
|
-
import { join as join3 } from "path";
|
|
1537
|
+
import { join as join3 } from "node:path";
|
|
1537
1538
|
async function executeRunnerConfig(cfg, onProgress) {
|
|
1538
1539
|
const { args, command, outputFile, outputTransform } = cfg;
|
|
1539
1540
|
const { duration, date } = await executeProcess({
|
|
@@ -1644,7 +1645,7 @@ function auditOutputsCorrelateWithPluginOutput(auditOutputs, pluginConfigAudits)
|
|
|
1644
1645
|
|
|
1645
1646
|
// packages/core/package.json
|
|
1646
1647
|
var name = "@code-pushup/core";
|
|
1647
|
-
var version = "0.8.
|
|
1648
|
+
var version = "0.8.8";
|
|
1648
1649
|
|
|
1649
1650
|
// packages/core/src/lib/implementation/collect.ts
|
|
1650
1651
|
async function collect(options2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"bin": {
|
|
5
5
|
"code-pushup": "index.js"
|
|
6
6
|
},
|
|
@@ -10,45 +10,5 @@
|
|
|
10
10
|
"yargs": "^17.7.2",
|
|
11
11
|
"chalk": "^5.3.0",
|
|
12
12
|
"@code-pushup/utils": "*"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
"homepage": "https://github.com/code-pushup/cli#readme",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/code-pushup/cli/issues"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/code-pushup/cli.git",
|
|
22
|
-
"directory": "packages/cli"
|
|
23
|
-
},
|
|
24
|
-
"contributors": [
|
|
25
|
-
{
|
|
26
|
-
"name": "Igor Katsuba",
|
|
27
|
-
"email": "igor@katsuba.dev",
|
|
28
|
-
"url": "https://katsuba.dev"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "Kateřina Pilátová",
|
|
32
|
-
"email": "katerina.pilatova@flowup.cz",
|
|
33
|
-
"url": "https://github.com/Tlacenka"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "Matěj Chalk",
|
|
37
|
-
"email": "matej.chalk@flowup.cz",
|
|
38
|
-
"url": "https://github.com/matejchalk"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "Michael Hladky",
|
|
42
|
-
"email": "michael.hladky@push-based.io",
|
|
43
|
-
"url": "https://push-based.io"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "Michael Seredenko",
|
|
47
|
-
"email": "misha.seredenko@push-based.io",
|
|
48
|
-
"url": "https://github.com/MishaSeredenkoPushBased"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"type": "module",
|
|
52
|
-
"main": "./index.js",
|
|
53
|
-
"types": "./src/index.d.ts"
|
|
54
|
-
}
|
|
13
|
+
}
|
|
14
|
+
}
|