@jtakeit/kit 0.1.0 → 0.3.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,9 @@
1
+ /** The published content as one document, from the files in `jtk/` — what the build renders from. */
2
+ export function collectContent(root: string, options?: { dir?: string }): Promise<{
3
+ schema_version: number;
4
+ content_rev: number;
5
+ site: { slug: string; locale: string; media_base: string; business: Record<string, unknown> };
6
+ pages: { path: string; seo: Record<string, unknown>; blocks: Record<string, unknown>[]; collection?: string; visible?: boolean }[];
7
+ shared?: { locale?: string; blocks: Record<string, unknown>[] }[];
8
+ }>;
9
+ export function sharedLocaleOf(name: string): string | null;
@@ -0,0 +1,19 @@
1
+ export interface Finding { code: string; says: string }
2
+ export interface Verdict { findings: Finding[]; ok: boolean; pages: number; shared: boolean; line: string }
3
+ export interface LintOptions {
4
+ /** The site's root, holding `jtk/`; the working directory by default. */
5
+ root?: string;
6
+ /** The built pages; `dist` under the root by default. */
7
+ dist?: string;
8
+ /** The address the build is for (`SITE_URL`); empty skips the host checks. */
9
+ siteURL?: string;
10
+ catalogue?: unknown;
11
+ content?: unknown;
12
+ }
13
+ /** The annotation lint the platform's build runs: the built pages against the content and the catalogue. */
14
+ export function lint(options?: LintOptions): Promise<Verdict>;
15
+ /** Print the findings the way the build does; 0 when clean, 1 otherwise. */
16
+ export function lintCommand(options?: LintOptions): Promise<number>;
17
+ export const TAPPABLE: Set<string>;
18
+ export const CODES: Readonly<Record<string, string>>;
19
+ export function said(code: string, message: string): string;