refactor: remove module barrels (#24554)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -241,3 +241,5 @@ export async function globUp(pattern: string, start: string, stop?: string) {
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
export * as Filesystem from "./filesystem"
|
||||
|
||||
@@ -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"
|
||||
@@ -99,3 +99,5 @@ export function parse(key: string): Info[] {
|
||||
return info
|
||||
})
|
||||
}
|
||||
|
||||
export * as Keybind from "./keybind"
|
||||
|
||||
@@ -21,3 +21,5 @@ export function create<T>(name: string) {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export * as LocalContext from "./local-context"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -94,3 +94,5 @@ export async function write(key: string): Promise<Disposable> {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export * as Lock from "./lock"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -62,3 +62,5 @@ export function client<T extends Definition>(target: {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export * as Rpc from "./rpc"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -55,3 +55,5 @@ function matchSequence(items: string[], patterns: string[]): boolean {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
export * as Wildcard from "./wildcard"
|
||||
|
||||
Reference in New Issue
Block a user