@nuasite/cli 0.50.0 → 0.51.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  `@nuasite/cli` is the cli tool that powers [Astro](https://astro.build/) projects updated by
4
4
  [Nua Site](https://www.nuasite.com). It wraps `astro build`, `astro dev`, and
5
5
  `astro preview` with the Nua defaults and adds project-level commands
6
- (`init`, `clean`, `migrate`).
6
+ (`check`, `init`, `clean`, `migrate`).
7
7
 
8
8
  ## Install
9
9
 
@@ -58,6 +58,27 @@ Specifically it:
58
58
  After running, follow the printed next-steps: `bun install`, review the
59
59
  config, and run `nua dev`.
60
60
 
61
+ ### `nua check`
62
+
63
+ Validates the content collections without building the site:
64
+
65
+ ```bash
66
+ nua check # exit 1 on errors
67
+ nua check --json # machine-readable report
68
+ nua check --strict # warnings fail too
69
+ ```
70
+
71
+ It reads `src/content.config.ts`, walks every collection's entries and reports
72
+ frontmatter that does not parse, values that do not match a declared field type
73
+ (`order: ""` where the schema wants a number), missing required fields, and
74
+ `reference()` values pointing at no entry.
75
+
76
+ Use it instead of a full build when you only need to know whether the content is
77
+ still valid: `astro build` validates the same things but costs the whole render
78
+ and stops at the first bad entry, while this reports every problem in one pass —
79
+ under a second on a 1500-entry site. A dangling reference is a warning, because
80
+ it builds green and then renders nothing.
81
+
61
82
  ### `nua clean`
62
83
 
63
84
  Ejects your project from the Nua toolchain back to a standard Astro setup: