@nuasite/cli 0.65.2 → 0.66.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.
@@ -8,12 +8,26 @@
8
8
  * This is a *syntax* check, not a type check. A wrong prop type or a missing export still needs
9
9
  * `astro check` or a build. What it does catch is the error that stops a build dead before a single
10
10
  * page renders — an unescaped quote inside a Czech string being the one that prompted it.
11
+ *
12
+ * Stylesheets are parsed the way the build parses them. A Nua site builds with Tailwind's Vite
13
+ * plugin, which runs every stylesheet through Tailwind's CSS parser, Tailwind or not, and that
14
+ * parser refuses what a browser quietly repairs: a rule cut off before its closing brace failed a
15
+ * whole site's build while the editor preview, which concatenates the files, only lost its styles.
11
16
  */
12
17
  import type { CheckFinding } from '@nuasite/cms-core';
13
18
  export interface CodeCheckResult {
14
19
  findings: CheckFinding[];
15
20
  files: number;
21
+ /** The files parsed, relative to the root: what `--fail-on` can vouch for. */
22
+ paths: string[];
23
+ }
24
+ export interface CodeCheckOptions {
25
+ /**
26
+ * May the check load the project's own packages? Its `tailwindcss` is the site's real parser, but loading it runs
27
+ * the project's installed code, which `--no-live` promises not to do; the bundled parser stands in then.
28
+ */
29
+ projectCode: boolean;
16
30
  }
17
- /** Parse every `.astro`/`.ts`/`.tsx` under `root`, newest failure first is not meaningful here — order is by path. */
18
- export declare function checkCode(root: string): Promise<CodeCheckResult>;
31
+ /** Parse every `.astro`/`.ts`/`.tsx`/`.css` under `root`; order is by path. */
32
+ export declare function checkCode(root: string, { projectCode }?: CodeCheckOptions): Promise<CodeCheckResult>;
19
33
  //# sourceMappingURL=check-code.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-code.d.ts","sourceRoot":"","sources":["../../src/check-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AA2FrD,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACb;AAED,sHAAsH;AACtH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAqBtE"}
1
+ {"version":3,"file":"check-code.d.ts","sourceRoot":"","sources":["../../src/check-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAkKrD,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAChC;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAA;CACpB;AAED,+EAA+E;AAC/E,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,GAAE,gBAAyC,GAAG,OAAO,CAAC,eAAe,CAAC,CA0BlI"}
@@ -7,6 +7,11 @@ export interface CheckOptions {
7
7
  contentOnly: boolean;
8
8
  /** Validate against the project's real schemas, which means importing and running its content config. */
9
9
  live: boolean;
10
+ /**
11
+ * Fail only on errors in these files, relative to `cwd`; every finding is still reported. For a commit
12
+ * that must not add a broken file but should not be blocked by one it did not touch.
13
+ */
14
+ failOn: string[] | null;
10
15
  }
11
16
  /**
12
17
  * `nua check`'s argv, as options.
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,wFAAwF;IACxF,MAAM,EAAE,OAAO,CAAA;IACf,gDAAgD;IAChD,WAAW,EAAE,OAAO,CAAA;IACpB,yGAAyG;IACzG,IAAI,EAAE,OAAO,CAAA;CACb;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAUxE;AAMD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYhD;AA8BD,yEAAyE;AACzE,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAgDlE"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,wFAAwF;IACxF,MAAM,EAAE,OAAO,CAAA;IACf,gDAAgD;IAChD,WAAW,EAAE,OAAO,CAAA;IACpB,yGAAyG;IACzG,IAAI,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,YAAY,CAWxE;AAeD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYhD;AA8BD,yEAAyE;AACzE,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAwElE"}