summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-04-15 22:52:34 -0400
committerGitHub <[email protected]>2026-04-16 02:52:34 +0000
commit665a8430864fb7a55dedea63a6cbdbe400218f80 (patch)
tree993c227aeff45f4d59f5afc83104089658696e89
parent1508196c0f4f4892325accddb5affeadbc4e8574 (diff)
downloadopencode-665a8430864fb7a55dedea63a6cbdbe400218f80.tar.gz
opencode-665a8430864fb7a55dedea63a6cbdbe400218f80.zip
feat: unwrap Archive namespace to flat exports + barrel (#22722)
-rw-r--r--packages/opencode/src/lsp/server.ts2
-rw-r--r--packages/opencode/src/util/archive.ts22
-rw-r--r--packages/opencode/src/util/index.ts1
3 files changed, 12 insertions, 13 deletions
diff --git a/packages/opencode/src/lsp/server.ts b/packages/opencode/src/lsp/server.ts
index f4554ae3e..769880ef0 100644
--- a/packages/opencode/src/lsp/server.ts
+++ b/packages/opencode/src/lsp/server.ts
@@ -8,7 +8,7 @@ import fs from "fs/promises"
import { Filesystem } from "../util/filesystem"
import { Instance } from "../project/instance"
import { Flag } from "../flag/flag"
-import { Archive } from "../util/archive"
+import { Archive } from "../util"
import { Process } from "../util/process"
import { which } from "../util/which"
import { Module } from "@opencode-ai/shared/util/module"
diff --git a/packages/opencode/src/util/archive.ts b/packages/opencode/src/util/archive.ts
index f65ceba54..cf2563684 100644
--- a/packages/opencode/src/util/archive.ts
+++ b/packages/opencode/src/util/archive.ts
@@ -1,17 +1,15 @@
import path from "path"
import { Process } from "./process"
-export namespace Archive {
- export async function extractZip(zipPath: string, destDir: string) {
- if (process.platform === "win32") {
- const winZipPath = path.resolve(zipPath)
- const winDestDir = path.resolve(destDir)
- // $global:ProgressPreference suppresses PowerShell's blue progress bar popup
- const cmd = `$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${winZipPath}' -DestinationPath '${winDestDir}' -Force`
- await Process.run(["powershell", "-NoProfile", "-NonInteractive", "-Command", cmd])
- return
- }
-
- await Process.run(["unzip", "-o", "-q", zipPath, "-d", destDir])
+export async function extractZip(zipPath: string, destDir: string) {
+ if (process.platform === "win32") {
+ const winZipPath = path.resolve(zipPath)
+ const winDestDir = path.resolve(destDir)
+ // $global:ProgressPreference suppresses PowerShell's blue progress bar popup
+ const cmd = `$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${winZipPath}' -DestinationPath '${winDestDir}' -Force`
+ await Process.run(["powershell", "-NoProfile", "-NonInteractive", "-Command", cmd])
+ return
}
+
+ await Process.run(["unzip", "-o", "-q", zipPath, "-d", destDir])
}
diff --git a/packages/opencode/src/util/index.ts b/packages/opencode/src/util/index.ts
new file mode 100644
index 000000000..157bb8e52
--- /dev/null
+++ b/packages/opencode/src/util/index.ts
@@ -0,0 +1 @@
+export * as Archive from "./archive"