@code-pushup/create-cli 0.53.1 → 0.55.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 +10 -16
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -31,7 +31,7 @@ function exists(value) {
|
|
|
31
31
|
return value != null;
|
|
32
32
|
}
|
|
33
33
|
function getMissingRefsForCategories(categories, plugins) {
|
|
34
|
-
if (categories.length === 0) {
|
|
34
|
+
if (!categories || categories.length === 0) {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
37
37
|
const auditRefsFromCategory = categories.flatMap(
|
|
@@ -108,7 +108,6 @@ var fileNameSchema = z.string().trim().regex(filenameRegex, {
|
|
|
108
108
|
message: `The filename has to be valid`
|
|
109
109
|
}).min(1, { message: "file name is invalid" });
|
|
110
110
|
var positiveIntSchema = z.number().int().positive();
|
|
111
|
-
var nonnegativeIntSchema = z.number().int().nonnegative();
|
|
112
111
|
var nonnegativeNumberSchema = z.number().nonnegative();
|
|
113
112
|
function packageVersionSchema(options) {
|
|
114
113
|
const { versionDescription = "NPM version of the package", required } = options ?? {};
|
|
@@ -531,12 +530,9 @@ var unrefinedCoreConfigSchema = z14.object({
|
|
|
531
530
|
var coreConfigSchema = refineCoreConfig(unrefinedCoreConfigSchema);
|
|
532
531
|
function refineCoreConfig(schema) {
|
|
533
532
|
return schema.refine(
|
|
534
|
-
(
|
|
535
|
-
(
|
|
536
|
-
message: missingRefsForCategoriesErrorMsg(
|
|
537
|
-
coreCfg.categories ?? [],
|
|
538
|
-
coreCfg.plugins
|
|
539
|
-
)
|
|
533
|
+
({ categories, plugins }) => !getMissingRefsForCategories(categories, plugins),
|
|
534
|
+
({ categories, plugins }) => ({
|
|
535
|
+
message: missingRefsForCategoriesErrorMsg(categories, plugins)
|
|
540
536
|
})
|
|
541
537
|
);
|
|
542
538
|
}
|
|
@@ -588,19 +584,16 @@ var reportSchema = packageVersionSchema({
|
|
|
588
584
|
).merge(
|
|
589
585
|
z15.object(
|
|
590
586
|
{
|
|
591
|
-
categories: z15.array(categoryConfigSchema),
|
|
592
587
|
plugins: z15.array(pluginReportSchema).min(1),
|
|
588
|
+
categories: z15.array(categoryConfigSchema).optional(),
|
|
593
589
|
commit: commitSchema.describe("Git commit for which report was collected").nullable()
|
|
594
590
|
},
|
|
595
591
|
{ description: "Collect output data" }
|
|
596
592
|
)
|
|
597
593
|
).refine(
|
|
598
|
-
(
|
|
599
|
-
(
|
|
600
|
-
message: missingRefsForCategoriesErrorMsg(
|
|
601
|
-
report.categories,
|
|
602
|
-
report.plugins
|
|
603
|
-
)
|
|
594
|
+
({ categories, plugins }) => !getMissingRefsForCategories(categories, plugins),
|
|
595
|
+
({ categories, plugins }) => ({
|
|
596
|
+
message: missingRefsForCategoriesErrorMsg(categories, plugins)
|
|
604
597
|
})
|
|
605
598
|
);
|
|
606
599
|
|
|
@@ -652,7 +645,7 @@ var auditDiffSchema = scorableWithPluginDiffSchema.merge(
|
|
|
652
645
|
z16.object({
|
|
653
646
|
values: makeComparisonSchema(auditValueSchema).merge(
|
|
654
647
|
z16.object({
|
|
655
|
-
diff: z16.number().
|
|
648
|
+
diff: z16.number().describe("Value change (`values.after - values.before`)")
|
|
656
649
|
})
|
|
657
650
|
).describe("Audit `value` comparison"),
|
|
658
651
|
displayValues: makeComparisonSchema(auditDisplayValueSchema).describe(
|
|
@@ -737,6 +730,7 @@ function executeProcess(cfg) {
|
|
|
737
730
|
return new Promise((resolve, reject) => {
|
|
738
731
|
const spawnedProcess = spawn(command, args ?? [], {
|
|
739
732
|
shell: true,
|
|
733
|
+
windowsHide: true,
|
|
740
734
|
...options
|
|
741
735
|
});
|
|
742
736
|
let stdout = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/create-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": "index.js",
|
|
6
6
|
"homepage": "https://github.com/code-pushup/cli/tree/main/packages/create-cli#readme",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"main": "./index.js",
|
|
29
29
|
"types": "./src/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@code-pushup/nx-plugin": "0.
|
|
32
|
-
"@code-pushup/utils": "0.
|
|
31
|
+
"@code-pushup/nx-plugin": "0.55.0",
|
|
32
|
+
"@code-pushup/utils": "0.55.0"
|
|
33
33
|
}
|
|
34
34
|
}
|