@@ -12,7 +12,6 @@ import { frontmatterTryParse, splitMarkdown, updateFrontmatter } from "./frontma
1212import { JSONLStringify , JSONLTryParse } from "./jsonl.js" ;
1313import { HTMLTablesToJSON , HTMLToMarkdown , HTMLToText } from "./html.js" ;
1414import { CancelError } from "./error.js" ;
15- import { fetchText } from "./fetchtext.js" ;
1615import { GitHubClient } from "./githubclient.js" ;
1716import { GitClient } from "./git.js" ;
1817import { estimateTokens , truncateTextToTokens } from "./tokens.js" ;
@@ -62,26 +61,26 @@ export function installGlobals() {
6261 glb . YAML = createYAML ( ) ;
6362
6463 // Freeze CSV utilities
65- glb . CSV = Object . freeze < CSV > ( {
64+ glb . CSV = Object . freeze < CSVObject > ( {
6665 parse : CSVParse , // Parse CSV string to objects
6766 stringify : CSVStringify , // Convert objects to CSV string
6867 markdownify : dataToMarkdownTable , // Convert CSV to Markdown format
6968 chunk : CSVChunk ,
7069 } ) ;
7170
7271 // Freeze INI utilities
73- glb . INI = Object . freeze < INI > ( {
72+ glb . INI = Object . freeze < INIObject > ( {
7473 parse : INIParse , // Parse INI string to objects
7574 stringify : INIStringify , // Convert objects to INI string
7675 } ) ;
7776
7877 // Freeze XML utilities
79- glb . XML = Object . freeze < XML > ( {
78+ glb . XML = Object . freeze < XMLObject > ( {
8079 parse : XMLParse , // Parse XML string to objects
8180 } ) ;
8281
8382 // Freeze Markdown utilities with frontmatter operations
84- glb . MD = Object . freeze < MD > ( {
83+ glb . MD = Object . freeze < MDObject > ( {
8584 stringify : MarkdownStringify ,
8685 frontmatter : ( text , format ) => frontmatterTryParse ( text , { format } ) ?. value ?? { } , // Parse frontmatter from markdown
8786 content : ( text ) => splitMarkdown ( text ) ?. content , // Extract content from markdown
@@ -97,12 +96,12 @@ export function installGlobals() {
9796 } ) ;
9897
9998 // Freeze JSONL utilities
100- glb . JSONL = Object . freeze < JSONL > ( {
99+ glb . JSONL = Object . freeze < JSONLObject > ( {
101100 parse : JSONLTryParse , // Parse JSONL string to objects
102101 stringify : JSONLStringify , // Convert objects to JSONL string
103102 } ) ;
104103
105- glb . JSON5 = Object . freeze < JSON5 > ( {
104+ glb . JSON5 = Object . freeze < JSON5Object > ( {
106105 parse : JSON5TryParse ,
107106 stringify : JSON5Stringify ,
108107 } ) ;
@@ -113,7 +112,7 @@ export function installGlobals() {
113112 } ) ;
114113
115114 // Freeze HTML utilities
116- glb . HTML = Object . freeze < HTML > ( {
115+ glb . HTML = Object . freeze < HTMLObject > ( {
117116 convertTablesToJSON : HTMLTablesToJSON , // Convert HTML tables to JSON
118117 convertToMarkdown : HTMLToMarkdown , // Convert HTML to Markdown
119118 convertToText : HTMLToText , // Convert HTML to plain text
@@ -149,19 +148,10 @@ export function installGlobals() {
149148 chunk : chunk ,
150149 } ) ;
151150
152- /**
153- * Asynchronous function to fetch text from a URL or file.
154- * Handles both HTTP(S) URLs and local workspace files.
155- * @param urlOrFile - URL or file descriptor.
156- * @param [fetchOptions] - Options for fetching.
157- * @returns Fetch result.
158- */
159- glb . fetchText = fetchText ; // Assign fetchText function to global
160-
161151 // ffmpeg
162152 glb . ffmpeg = new FFmepgClient ( ) ;
163153
164- glb . DIFF = Object . freeze < DIFF > ( {
154+ glb . DIFF = Object . freeze < DIFFObject > ( {
165155 parse : tryDiffParse ,
166156 createPatch : diffCreatePatch ,
167157 findChunk : diffFindChunk ,
0 commit comments