File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,7 @@ import { normalizeNewlines } from "../core/lib/text.ts";
4747import { DirectiveCell } from "../core/lib/break-quarto-md-types.ts" ;
4848import { QuartoJSONSchema , readYamlFromMarkdown } from "../core/yaml.ts" ;
4949import { refSchema } from "../core/lib/yaml-schema/common.ts" ;
50- import {
51- BrandPathBoolLightDark ,
52- Zod ,
53- } from "../resources/types/zod/schema-types.ts" ;
50+ import { Zod } from "../resources/types/zod/schema-types.ts" ;
5451import { Brand } from "../core/brand/brand.ts" ;
5552import { assert } from "testing/asserts" ;
5653
@@ -547,7 +544,7 @@ export async function projectResolveBrand(
547544 let fileNames = [ "_brand.yml" , "_brand.yaml" ] . map ( ( file ) =>
548545 join ( project . dir , file )
549546 ) ;
550- let brand = project ?. config ?. brand as Boolean | string | {
547+ const brand = project ?. config ?. brand as boolean | string | {
551548 light ?: string ;
552549 dark ?: string ;
553550 } ;
@@ -582,7 +579,7 @@ export async function projectResolveBrand(
582579 return project . brandCache . brand ;
583580 } else {
584581 const metadata = await project . fileMetadata ( fileName ) ;
585- const brand = Zod . BrandPathBoolLightDark . parse ( metadata . brand ) ; // as BrandPathBoolLightDark;
582+ const brand = Zod . BrandPathBoolLightDark . parse ( metadata . brand ) ;
586583 if ( brand === false ) {
587584 return undefined ;
588585 }
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ import { exitWithCleanup, onCleanup } from "../../core/cleanup.ts";
109109import { projectExtensionDirs } from "../../extension/extension.ts" ;
110110import { findOpenPort } from "../../core/port.ts" ;
111111import { kLocalhost } from "../../core/port-consts.ts" ;
112- import { ProjectServe } from "../../resources/types/schema-types.ts" ;
112+ import { ProjectServe } from "../../resources/types/zod/ schema-types.ts" ;
113113import { handleHttpRequests } from "../../core/http-server.ts" ;
114114import { touch } from "../../core/file.ts" ;
115115import { staticResource } from "../../preview/preview-static.ts" ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import { ExecutionEngine, ExecutionTarget } from "../execute/types.ts";
1414import { InspectedMdCell } from "../quarto-core/inspect-types.ts" ;
1515import { NotebookContext } from "../render/notebook/notebook-types.ts" ;
1616import {
17- Brand as BrandJson ,
1817 NavigationItem as NavItem ,
1918 NavigationItemObject ,
2019 NavigationItemObject as SidebarTool ,
@@ -70,8 +69,12 @@ export interface ProjectContext {
7069 fileInformationCache : Map < string , FileInformation > ;
7170
7271 // This is a cache of _brand.yml for a project
73- brandCache ?: { brand ?: LightDarkBrand } ;
74- resolveBrand : ( fileName ?: string ) => Promise < undefined | { light ?: Brand | undefined , dark ?: Brand | undefined } > ;
72+ brandCache ?: { brand ?: LightDarkBrand } ;
73+ resolveBrand : (
74+ fileName ?: string ,
75+ ) => Promise <
76+ undefined | { light ?: Brand | undefined ; dark ?: Brand | undefined }
77+ > ;
7578
7679 // expands markdown for a file
7780 // input file doesn't have to be markdown; it can be, for example, a knitr spin file
You can’t perform that action at this time.
0 commit comments