refactor: remove module barrels (#24554)

This commit is contained in:
Dax
2026-04-27 14:33:33 -04:00
committed by GitHub
parent 55ecb06748
commit f25f1485d5
313 changed files with 727 additions and 677 deletions

View File

@@ -13,3 +13,5 @@ export async function extractZip(zipPath: string, destDir: string) {
await Process.run(["unzip", "-o", "-q", zipPath, "-d", destDir])
}
export * as Archive from "./archive"

View File

@@ -15,3 +15,5 @@ export function hexToAnsiBold(hex?: string): string | undefined {
const { r, g, b } = hexToRgb(hex)
return `\x1b[38;2;${r};${g};${b}m\x1b[1m`
}
export * as Color from "./color"

View File

@@ -241,3 +241,5 @@ export async function globUp(pattern: string, start: string, stop?: string) {
}
return result
}
export * as Filesystem from "./filesystem"

View File

@@ -1,12 +0,0 @@
export * as Archive from "./archive"
export * as Color from "./color"
export * as Filesystem from "./filesystem"
export * as Keybind from "./keybind"
export * as LocalContext from "./local-context"
export * as Locale from "./locale"
export * as Lock from "./lock"
export * as Log from "@opencode-ai/core/util/log"
export * as Process from "./process"
export * as Rpc from "./rpc"
export * as Token from "./token"
export * as Wildcard from "./wildcard"

View File

@@ -99,3 +99,5 @@ export function parse(key: string): Info[] {
return info
})
}
export * as Keybind from "./keybind"

View File

@@ -21,3 +21,5 @@ export function create<T>(name: string) {
},
}
}
export * as LocalContext from "./local-context"

View File

@@ -77,3 +77,5 @@ export function pluralize(count: number, singular: string, plural: string): stri
const template = count === 1 ? singular : plural
return template.replace("{}", count.toString())
}
export * as Locale from "./locale"

View File

@@ -94,3 +94,5 @@ export async function write(key: string): Promise<Disposable> {
}
})
}
export * as Lock from "./lock"

View File

@@ -172,3 +172,5 @@ export async function text(cmd: string[], opts: RunOptions = {}): Promise<TextRe
export async function lines(cmd: string[], opts: RunOptions = {}): Promise<string[]> {
return (await text(cmd, opts)).text.split(/\r?\n/).filter(Boolean)
}
export * as Process from "./process"

View File

@@ -62,3 +62,5 @@ export function client<T extends Definition>(target: {
},
}
}
export * as Rpc from "./rpc"

View File

@@ -3,3 +3,5 @@ const CHARS_PER_TOKEN = 4
export function estimate(input: string) {
return Math.max(0, Math.round((input || "").length / CHARS_PER_TOKEN))
}
export * as Token from "./token"

View File

@@ -55,3 +55,5 @@ function matchSequence(items: string[], patterns: string[]): boolean {
}
return false
}
export * as Wildcard from "./wildcard"