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";
47
47
import { DirectiveCell } from "../core/lib/break-quarto-md-types.ts" ;
48
48
import { QuartoJSONSchema , readYamlFromMarkdown } from "../core/yaml.ts" ;
49
49
import { 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" ;
54
51
import { Brand } from "../core/brand/brand.ts" ;
55
52
import { assert } from "testing/asserts" ;
56
53
@@ -547,7 +544,7 @@ export async function projectResolveBrand(
547
544
let fileNames = [ "_brand.yml" , "_brand.yaml" ] . map ( ( file ) =>
548
545
join ( project . dir , file )
549
546
) ;
550
- let brand = project ?. config ?. brand as Boolean | string | {
547
+ const brand = project ?. config ?. brand as boolean | string | {
551
548
light ?: string ;
552
549
dark ?: string ;
553
550
} ;
@@ -582,7 +579,7 @@ export async function projectResolveBrand(
582
579
return project . brandCache . brand ;
583
580
} else {
584
581
const metadata = await project . fileMetadata ( fileName ) ;
585
- const brand = Zod . BrandPathBoolLightDark . parse ( metadata . brand ) ; // as BrandPathBoolLightDark;
582
+ const brand = Zod . BrandPathBoolLightDark . parse ( metadata . brand ) ;
586
583
if ( brand === false ) {
587
584
return undefined ;
588
585
}
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ import { exitWithCleanup, onCleanup } from "../../core/cleanup.ts";
109
109
import { projectExtensionDirs } from "../../extension/extension.ts" ;
110
110
import { findOpenPort } from "../../core/port.ts" ;
111
111
import { 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" ;
113
113
import { handleHttpRequests } from "../../core/http-server.ts" ;
114
114
import { touch } from "../../core/file.ts" ;
115
115
import { 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";
14
14
import { InspectedMdCell } from "../quarto-core/inspect-types.ts" ;
15
15
import { NotebookContext } from "../render/notebook/notebook-types.ts" ;
16
16
import {
17
- Brand as BrandJson ,
18
17
NavigationItem as NavItem ,
19
18
NavigationItemObject ,
20
19
NavigationItemObject as SidebarTool ,
@@ -70,8 +69,12 @@ export interface ProjectContext {
70
69
fileInformationCache : Map < string , FileInformation > ;
71
70
72
71
// 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
+ > ;
75
78
76
79
// expands markdown for a file
77
80
// 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