@code-pushup/create-cli 0.54.0 → 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.
Files changed (2) hide show
  1. package/index.js +8 -14
  2. 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(
@@ -530,12 +530,9 @@ var unrefinedCoreConfigSchema = z14.object({
530
530
  var coreConfigSchema = refineCoreConfig(unrefinedCoreConfigSchema);
531
531
  function refineCoreConfig(schema) {
532
532
  return schema.refine(
533
- (coreCfg) => !getMissingRefsForCategories(coreCfg.categories ?? [], coreCfg.plugins),
534
- (coreCfg) => ({
535
- message: missingRefsForCategoriesErrorMsg(
536
- coreCfg.categories ?? [],
537
- coreCfg.plugins
538
- )
533
+ ({ categories, plugins }) => !getMissingRefsForCategories(categories, plugins),
534
+ ({ categories, plugins }) => ({
535
+ message: missingRefsForCategoriesErrorMsg(categories, plugins)
539
536
  })
540
537
  );
541
538
  }
@@ -587,19 +584,16 @@ var reportSchema = packageVersionSchema({
587
584
  ).merge(
588
585
  z15.object(
589
586
  {
590
- categories: z15.array(categoryConfigSchema),
591
587
  plugins: z15.array(pluginReportSchema).min(1),
588
+ categories: z15.array(categoryConfigSchema).optional(),
592
589
  commit: commitSchema.describe("Git commit for which report was collected").nullable()
593
590
  },
594
591
  { description: "Collect output data" }
595
592
  )
596
593
  ).refine(
597
- (report) => !getMissingRefsForCategories(report.categories, report.plugins),
598
- (report) => ({
599
- message: missingRefsForCategoriesErrorMsg(
600
- report.categories,
601
- report.plugins
602
- )
594
+ ({ categories, plugins }) => !getMissingRefsForCategories(categories, plugins),
595
+ ({ categories, plugins }) => ({
596
+ message: missingRefsForCategoriesErrorMsg(categories, plugins)
603
597
  })
604
598
  );
605
599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/create-cli",
3
- "version": "0.54.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.54.0",
32
- "@code-pushup/utils": "0.54.0"
31
+ "@code-pushup/nx-plugin": "0.55.0",
32
+ "@code-pushup/utils": "0.55.0"
33
33
  }
34
34
  }