Files

41 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

#!/usr/bin/env bun
import { Script } from "@opencode-ai/script"
import path from "path"
import { fileURLToPath } from "url"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const dir = path.resolve(__dirname, "..")
process.chdir(dir)
2026-06-15 14:48:05 +02:00
const generated = await import("./generate.ts")
2026-04-09 16:29:46 +08:00
await Bun.build({
target: "node",
2026-07-09 16:54:09 +02:00
// kilocode_change start
entrypoints: [
"./src/node.ts",
"../kilo-sandbox/src/kilo-sandbox-mutation-worker.ts",
"../kilo-sandbox/src/kilo-sandbox-network-relay.ts",
],
// kilocode_change end
2026-04-09 13:18:46 +08:00
outdir: "./dist/node",
format: "esm",
sourcemap: "linked",
2026-04-09 13:18:46 +08:00
external: ["jsonc-parser", "@lydell/node-pty"],
define: {
2026-06-15 14:48:05 +02:00
KILO_MODELS_DEV: generated.modelsData,
2026-08-07 16:07:19 +02:00
KILO_VERSION: `'${Script.version}'`, // kilocode_change
KILO_SANDBOX_MUTATION_WORKER_PATH: `'./kilo-sandbox-mutation-worker.js'`, // kilocode_change
2026-07-09 16:54:09 +02:00
KILO_SANDBOX_NETWORK_RELAY_PATH: `'./kilo-sandbox-network-relay.js'`, // kilocode_change
KILO_SANDBOX_SECCOMP_PATH: "undefined", // kilocode_change
2026-05-06 12:13:06 +02:00
KILO_CHANNEL: `'${Script.channel}'`,
},
2026-04-09 13:18:46 +08:00
files: {
"opencode-web-ui.gen.ts": "",
},
})
console.log("Build complete")