mvp-ai's picture
download
raw
1.1 kB
// Copyright (c) 2026 the Zuke contributors
// SPDX-License-Identifier: MIT
/**
* Resolve the user-facing {@link ApiDocsOptions} into a fully-populated form the
* renderers can consume without re-checking defaults.
*
* @module
*/
import type { ApiDocsOptions, ProjectInfo } from "./types.ts";
/** {@link ApiDocsOptions} with every default filled in. */
export interface ResolvedOptions {
packagesDir: string;
jsrBaseUrl: string;
index: string;
full: string;
readmes: boolean;
project: ProjectInfo;
regenerateCommand: string;
}
/** Apply defaults to {@link ApiDocsOptions}. */
export function resolveOptions(options: ApiDocsOptions): ResolvedOptions {
return {
packagesDir: options.packagesDir ?? "packages",
jsrBaseUrl: options.jsrBaseUrl ?? "https://jsr.io",
index: options.index ?? "llms.txt",
full: options.full ?? "llms-full.txt",
readmes: options.readmes ?? true,
project: options.project ??
{ title: "API documentation", summary: "Generated API reference." },
regenerateCommand: options.regenerateCommand ?? "deno task docs",
};
}

Xet Storage Details

Size:
1.1 kB
·
Xet hash:
2884977f84576e52fcdb1894ecc1ac12b798ac3d6e967d4fa3a705ab1b297749

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.