@nuasite/cli 0.51.0 → 0.53.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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Syntax check for the project's own code.
3
+ *
4
+ * A full build catches these, but it renders every page to get there. What actually fails is the
5
+ * parse: Astro compiles a `.astro` file to TypeScript and the bundler parses that, so compiling
6
+ * and parsing — without rendering anything — reproduces the same class of error in about a second.
7
+ *
8
+ * This is a *syntax* check, not a type check. A wrong prop type or a missing export still needs
9
+ * `astro check` or a build. What it does catch is the error that stops a build dead before a single
10
+ * page renders — an unescaped quote inside a Czech string being the one that prompted it.
11
+ */
12
+ import type { CheckFinding } from '@nuasite/cms-core';
13
+ export interface CodeCheckResult {
14
+ findings: CheckFinding[];
15
+ files: number;
16
+ }
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>;
19
+ //# sourceMappingURL=check-code.d.ts.map
@@ -0,0 +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"}
@@ -3,7 +3,18 @@ export interface CheckOptions {
3
3
  json: boolean;
4
4
  /** Treat warnings as failures too. Off by default: a dangling reference builds fine. */
5
5
  strict: boolean;
6
+ /** Skip the code syntax pass — content only. */
7
+ contentOnly: boolean;
6
8
  }
9
+ /**
10
+ * The Astro apps to check, relative to `cwd`.
11
+ *
12
+ * Running this at a monorepo root has to work: that is where an agent's workspace and a
13
+ * developer's shell both start, and `bun run build` there builds something else entirely
14
+ * (admin, api, worker). Every `packages/*` app is checked, not just the first — a repo with
15
+ * two sites must not have one of them silently skipped.
16
+ */
17
+ export declare function astroRoots(cwd: string): string[];
7
18
  /** Validate the content collections and return the process exit code. */
8
19
  export declare function check(options: CheckOptions): Promise<number>;
9
20
  //# sourceMappingURL=check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAA;IACb,wFAAwF;IACxF,MAAM,EAAE,OAAO,CAAA;CACf;AAED,yEAAyE;AACzE,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBlE"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/check.ts"],"names":[],"mappings":"AAKA,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;CACpB;AAMD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAYhD;AAWD,yEAAyE;AACzE,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CA0ClE"}