myst-cli
Version:
Command line tools for MyST
346 lines • 16.5 kB
TypeScript
import { z } from 'zod';
import type { Config } from 'myst-config';
declare const JupyterBookConfig: z.ZodObject<{
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
copyright: z.ZodOptional<z.ZodNullable<z.ZodString>>;
logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
exclude_patterns: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
parse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
myst_enable_extensions: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNull, z.ZodArray<z.ZodString, "many">]>>>;
myst_url_schemes: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNull, z.ZodArray<z.ZodString, "many">]>>>;
myst_dmath_double_inline: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
myst_dmath_double_inline: boolean;
myst_enable_extensions?: string[] | null | undefined;
myst_url_schemes?: string[] | null | undefined;
}, {
myst_enable_extensions?: string[] | null | undefined;
myst_url_schemes?: string[] | null | undefined;
myst_dmath_double_inline?: boolean | undefined;
}>>>;
execute: z.ZodOptional<z.ZodNullable<z.ZodObject<{
eval_regex: z.ZodDefault<z.ZodString>;
raise_on_error: z.ZodDefault<z.ZodBoolean>;
show_tb: z.ZodDefault<z.ZodBoolean>;
execute_notebooks: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"cache">, z.ZodLiteral<"force">, z.ZodLiteral<"inline">, z.ZodLiteral<"off">, z.ZodLiteral<false>]>>;
cache: z.ZodOptional<z.ZodNullable<z.ZodString>>;
timeout: z.ZodDefault<z.ZodNumber>;
allow_errors: z.ZodDefault<z.ZodBoolean>;
stderr_output: z.ZodDefault<z.ZodEnum<["show", "remove", "remove-warn", "warn", "error", "severe"]>>;
run_in_temp: z.ZodDefault<z.ZodBoolean>;
exclude_patterns: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
}, "strip", z.ZodTypeAny, {
eval_regex: string;
raise_on_error: boolean;
show_tb: boolean;
execute_notebooks: false | "cache" | "force" | "auto" | "inline" | "off";
timeout: number;
allow_errors: boolean;
stderr_output: "error" | "warn" | "remove" | "show" | "remove-warn" | "severe";
run_in_temp: boolean;
cache?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
}, {
cache?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
eval_regex?: string | undefined;
raise_on_error?: boolean | undefined;
show_tb?: boolean | undefined;
execute_notebooks?: false | "cache" | "force" | "auto" | "inline" | "off" | undefined;
timeout?: number | undefined;
allow_errors?: boolean | undefined;
stderr_output?: "error" | "warn" | "remove" | "show" | "remove-warn" | "severe" | undefined;
run_in_temp?: boolean | undefined;
}>>>;
html: z.ZodOptional<z.ZodNullable<z.ZodObject<{
favicon: z.ZodOptional<z.ZodNullable<z.ZodString>>;
use_edit_page_button: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
use_repository_button: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
use_issues_button: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
extra_footer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
google_analytics_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
analytics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
plausible_analytics_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
google_analytics_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
}, {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
}>>>;
home_page_in_navbar: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
baseurl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
comments: z.ZodOptional<z.ZodNullable<z.ZodObject<{
hypothesis: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
utterances: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
}, "strip", z.ZodTypeAny, {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
}, {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
}>>>;
announcement: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
favicon?: string | null | undefined;
comments?: {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
} | null | undefined;
baseurl?: string | null | undefined;
use_edit_page_button?: boolean | null | undefined;
use_repository_button?: boolean | null | undefined;
use_issues_button?: boolean | null | undefined;
extra_footer?: string | null | undefined;
google_analytics_id?: string | null | undefined;
analytics?: {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
} | null | undefined;
home_page_in_navbar?: boolean | null | undefined;
announcement?: string | null | undefined;
}, {
favicon?: string | null | undefined;
comments?: {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
} | null | undefined;
baseurl?: string | null | undefined;
use_edit_page_button?: boolean | null | undefined;
use_repository_button?: boolean | null | undefined;
use_issues_button?: boolean | null | undefined;
extra_footer?: string | null | undefined;
google_analytics_id?: string | null | undefined;
analytics?: {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
} | null | undefined;
home_page_in_navbar?: boolean | null | undefined;
announcement?: string | null | undefined;
}>>>;
latex: z.ZodOptional<z.ZodNullable<z.ZodObject<{
latex_engine: z.ZodDefault<z.ZodString>;
use_jupyterbook_latex: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
latex_documents: z.ZodOptional<z.ZodNullable<z.ZodObject<{
targetname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
targetname?: string | null | undefined;
}, {
targetname?: string | null | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
latex_engine: string;
use_jupyterbook_latex?: boolean | null | undefined;
latex_documents?: {
targetname?: string | null | undefined;
} | null | undefined;
}, {
latex_engine?: string | undefined;
use_jupyterbook_latex?: boolean | null | undefined;
latex_documents?: {
targetname?: string | null | undefined;
} | null | undefined;
}>>>;
bibtex_bibfiles: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
launch_buttons: z.ZodOptional<z.ZodNullable<z.ZodObject<{
notebook_interface: z.ZodOptional<z.ZodNullable<z.ZodString>>;
binderhub_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
jupyterhub_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
thebe: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
colab_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
thebe?: boolean | null | undefined;
notebook_interface?: string | null | undefined;
binderhub_url?: string | null | undefined;
jupyterhub_url?: string | null | undefined;
colab_url?: string | null | undefined;
}, {
thebe?: boolean | null | undefined;
notebook_interface?: string | null | undefined;
binderhub_url?: string | null | undefined;
jupyterhub_url?: string | null | undefined;
colab_url?: string | null | undefined;
}>>>;
repository: z.ZodOptional<z.ZodNullable<z.ZodObject<{
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
path_to_book: z.ZodOptional<z.ZodNullable<z.ZodString>>;
branch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
url?: string | null | undefined;
branch?: string | null | undefined;
path_to_book?: string | null | undefined;
}, {
url?: string | null | undefined;
branch?: string | null | undefined;
path_to_book?: string | null | undefined;
}>>>;
sphinx: z.ZodOptional<z.ZodNullable<z.ZodObject<{
extra_extensions: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNull, z.ZodArray<z.ZodString, "many">]>>>;
local_extensions: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
recursive_update: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
config: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
}, "strip", z.ZodTypeAny, {
config?: Record<string, any> | null | undefined;
extra_extensions?: string[] | null | undefined;
local_extensions?: Record<string, any> | null | undefined;
recursive_update?: boolean | null | undefined;
}, {
config?: Record<string, any> | null | undefined;
extra_extensions?: string[] | null | undefined;
local_extensions?: Record<string, any> | null | undefined;
recursive_update?: boolean | null | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
title?: string | null | undefined;
copyright?: string | null | undefined;
html?: {
favicon?: string | null | undefined;
comments?: {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
} | null | undefined;
baseurl?: string | null | undefined;
use_edit_page_button?: boolean | null | undefined;
use_repository_button?: boolean | null | undefined;
use_issues_button?: boolean | null | undefined;
extra_footer?: string | null | undefined;
google_analytics_id?: string | null | undefined;
analytics?: {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
} | null | undefined;
home_page_in_navbar?: boolean | null | undefined;
announcement?: string | null | undefined;
} | null | undefined;
author?: string | null | undefined;
latex?: {
latex_engine: string;
use_jupyterbook_latex?: boolean | null | undefined;
latex_documents?: {
targetname?: string | null | undefined;
} | null | undefined;
} | null | undefined;
execute?: {
eval_regex: string;
raise_on_error: boolean;
show_tb: boolean;
execute_notebooks: false | "cache" | "force" | "auto" | "inline" | "off";
timeout: number;
allow_errors: boolean;
stderr_output: "error" | "warn" | "remove" | "show" | "remove-warn" | "severe";
run_in_temp: boolean;
cache?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
} | null | undefined;
logo?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
parse?: {
myst_dmath_double_inline: boolean;
myst_enable_extensions?: string[] | null | undefined;
myst_url_schemes?: string[] | null | undefined;
} | null | undefined;
bibtex_bibfiles?: string[] | null | undefined;
launch_buttons?: {
thebe?: boolean | null | undefined;
notebook_interface?: string | null | undefined;
binderhub_url?: string | null | undefined;
jupyterhub_url?: string | null | undefined;
colab_url?: string | null | undefined;
} | null | undefined;
repository?: {
url?: string | null | undefined;
branch?: string | null | undefined;
path_to_book?: string | null | undefined;
} | null | undefined;
sphinx?: {
config?: Record<string, any> | null | undefined;
extra_extensions?: string[] | null | undefined;
local_extensions?: Record<string, any> | null | undefined;
recursive_update?: boolean | null | undefined;
} | null | undefined;
}, {
title?: string | null | undefined;
copyright?: string | null | undefined;
html?: {
favicon?: string | null | undefined;
comments?: {
hypothesis?: boolean | Record<string, any> | null | undefined;
utterances?: boolean | Record<string, any> | null | undefined;
} | null | undefined;
baseurl?: string | null | undefined;
use_edit_page_button?: boolean | null | undefined;
use_repository_button?: boolean | null | undefined;
use_issues_button?: boolean | null | undefined;
extra_footer?: string | null | undefined;
google_analytics_id?: string | null | undefined;
analytics?: {
google_analytics_id?: string | null | undefined;
plausible_analytics_domain?: string | null | undefined;
} | null | undefined;
home_page_in_navbar?: boolean | null | undefined;
announcement?: string | null | undefined;
} | null | undefined;
author?: string | null | undefined;
latex?: {
latex_engine?: string | undefined;
use_jupyterbook_latex?: boolean | null | undefined;
latex_documents?: {
targetname?: string | null | undefined;
} | null | undefined;
} | null | undefined;
execute?: {
cache?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
eval_regex?: string | undefined;
raise_on_error?: boolean | undefined;
show_tb?: boolean | undefined;
execute_notebooks?: false | "cache" | "force" | "auto" | "inline" | "off" | undefined;
timeout?: number | undefined;
allow_errors?: boolean | undefined;
stderr_output?: "error" | "warn" | "remove" | "show" | "remove-warn" | "severe" | undefined;
run_in_temp?: boolean | undefined;
} | null | undefined;
logo?: string | null | undefined;
exclude_patterns?: string[] | null | undefined;
parse?: {
myst_enable_extensions?: string[] | null | undefined;
myst_url_schemes?: string[] | null | undefined;
myst_dmath_double_inline?: boolean | undefined;
} | null | undefined;
bibtex_bibfiles?: string[] | null | undefined;
launch_buttons?: {
thebe?: boolean | null | undefined;
notebook_interface?: string | null | undefined;
binderhub_url?: string | null | undefined;
jupyterhub_url?: string | null | undefined;
colab_url?: string | null | undefined;
} | null | undefined;
repository?: {
url?: string | null | undefined;
branch?: string | null | undefined;
path_to_book?: string | null | undefined;
} | null | undefined;
sphinx?: {
config?: Record<string, any> | null | undefined;
extra_extensions?: string[] | null | undefined;
local_extensions?: Record<string, any> | null | undefined;
recursive_update?: boolean | null | undefined;
} | null | undefined;
}>;
export type JupyterBookConfig = z.infer<typeof JupyterBookConfig>;
/**
* Validate a loaded Jupyter Book _config.yml, or return undefined
*
* @param config - config object
*/
export declare function validateJupyterBookConfig(config: unknown): JupyterBookConfig;
/**
* Upgrade a Jupyter Book _config.yml into a myst.yml configuration
*
* @param config - validated Jupyter Book configuration
*/
export declare function upgradeConfig(data: JupyterBookConfig): Pick<Config, 'project' | 'site'>;
export {};
//# sourceMappingURL=config.d.ts.map