mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-19 02:27:10 +00:00
sync
This commit is contained in:
1
bun.lock
1
bun.lock
@@ -177,6 +177,7 @@
|
||||
"devDependencies": {
|
||||
"@ai-sdk/amazon-bedrock": "2.2.10",
|
||||
"@octokit/webhooks-types": "7.6.1",
|
||||
"@opentui/core-win32-x64": "0.1.24",
|
||||
"@standard-schema/spec": "1.0.0",
|
||||
"@tsconfig/bun": "1.0.7",
|
||||
"@types/bun": "catalog:",
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"devDependencies": {
|
||||
"@ai-sdk/amazon-bedrock": "2.2.10",
|
||||
"@octokit/webhooks-types": "7.6.1",
|
||||
"@opentui/core-win32-x64": "0.1.24",
|
||||
"@standard-schema/spec": "1.0.0",
|
||||
"@tsconfig/bun": "1.0.7",
|
||||
"@types/bun": "catalog:",
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import solidPlugin from "../../../node_modules/@opentui/solid/scripts/solid-plugin"
|
||||
|
||||
const dir = new URL("..", import.meta.url).pathname
|
||||
process.chdir(dir)
|
||||
import { $ } from "bun"
|
||||
import path from "path"
|
||||
|
||||
import pkg from "../package.json"
|
||||
|
||||
@@ -32,7 +36,14 @@ for (const [os, arch] of targets) {
|
||||
await $`CGO_ENABLED=0 GOOS=${os} GOARCH=${GOARCH[arch]} go build -ldflags="-s -w -X main.Version=${version}" -o ../opencode/dist/${name}/bin/tui ../tui/cmd/opencode/main.go`.cwd(
|
||||
"../tui",
|
||||
)
|
||||
const opentui = `@opentui/core-${os === "windows" ? "win32" : os}-${arch.replace("-baseline", "")}`
|
||||
await $`mkdir -p ../../node_modules/${opentui}`
|
||||
await $`npm pack npm pack ${opentui}`.cwd(path.join(dir, "../../node_modules"))
|
||||
await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1`
|
||||
await Bun.build({
|
||||
conditions: ["browser"],
|
||||
tsconfig: "./tsconfig.json",
|
||||
plugins: [solidPlugin],
|
||||
compile: {
|
||||
target: `bun-${os}-${arch}` as any,
|
||||
outfile: `dist/${name}/bin/opencode`,
|
||||
|
||||
Reference in New Issue
Block a user