44 */
55
66// Export text types
7- export * from './text-types' ;
8-
9- // Export constants
10- export * from './constants' ;
7+ export type * from "./text-types.d.ts" ;
118
129// Export metadata types
13- export * from './metadata-types' ;
10+ export type * from "./metadata-types.d.ts" ;
11+
12+ // Export external engine types
13+ export type * from "./external-engine.d.ts" ;
1414
1515// Export project context types
16- export * from ' ./project-context' ;
16+ export type * from " ./project-context.d.ts" ;
1717
1818// Export execution engine types
19- export * from './execution-engine' ;
20-
21- // Export external engine types
22- export * from './external-engine' ;
19+ export type * from "./execution-engine.d.ts" ;
2320
2421// Export Quarto API types
25- export * from './quarto-api' ;
26-
27- /**
28- * Utility to check if a project context satisfies EngineProjectContext interface
29- */
30- import { EngineProjectContext } from './project-context' ;
31-
32- export function isEngineProjectContext (
33- ctx : unknown
34- ) : ctx is EngineProjectContext {
35- if ( ! ctx ) return false ;
36-
37- const context = ctx as Partial < EngineProjectContext > ;
38-
39- return (
40- typeof context . dir === 'string' &&
41- typeof context . isSingleFile === 'boolean' &&
42- context . fileInformationCache instanceof Map &&
43- typeof context . resolveFullMarkdownForFile === 'function' &&
44- typeof context . getOutputDirectory === 'function' &&
45- ! ! context . quarto
46- ) ;
47- }
48-
49- /**
50- * Utility to get the output directory from a project context
51- */
52- import { kProjectOutputDir } from './constants' ;
53- import { resolve , join , isAbsolute } from 'path' ;
54-
55- export function projectOutputDir ( context : EngineProjectContext ) : string {
56- let outputDir = context . config ?. project ?. [ kProjectOutputDir ] ;
57-
58- if ( outputDir ) {
59- if ( ! isAbsolute ( outputDir ) ) {
60- outputDir = join ( context . dir , outputDir ) ;
61- }
62- } else {
63- outputDir = context . dir ;
64- }
65-
66- // Normalize the path
67- return resolve ( outputDir ) ;
68- }
22+ export type * from "./quarto-api.d.ts" ;
0 commit comments