mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 11:05:31 +08:00
fix(cli): roll back Bun 1.4
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Restore reliable CLI terminal startup across release targets.
|
||||
+2
-2
@@ -16,7 +16,7 @@ The Kilo Community is [on Discord](https://kilo.ai/discord).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Bun 1.4.0+** — required for all packages.
|
||||
- **Bun 1.3.14+** — required for all packages.
|
||||
- **Java 21** — required by the JetBrains plugin. The root `bun turbo typecheck` and `bun turbo test:ci` commands include `@kilocode/kilo-jetbrains` and will fail without Java 21.
|
||||
|
||||
The preferred way to install Java is via [SDKMAN](https://sdkman.io/install):
|
||||
@@ -41,7 +41,7 @@ The Kilo Community is [on Discord](https://kilo.ai/discord).
|
||||
|
||||
## Developing Kilo CLI
|
||||
|
||||
- **Requirements:** Bun 1.4.0+, Java 21 (see [Prerequisites](#prerequisites) above)
|
||||
- **Requirements:** Bun 1.3.14+, Java 21 (see [Prerequisites](#prerequisites) above)
|
||||
- Install dependencies and start the CLI from the repo root:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1069,7 +1069,7 @@
|
||||
"@tanstack/solid-virtual": "3.13.32",
|
||||
"@tsconfig/bun": "1.0.9",
|
||||
"@tsconfig/node22": "22.0.2",
|
||||
"@types/bun": "1.4.0",
|
||||
"@types/bun": "1.3.14",
|
||||
"@types/cross-spawn": "6.0.6",
|
||||
"@types/luxon": "3.7.1",
|
||||
"@types/node": "24.12.4",
|
||||
@@ -2536,7 +2536,7 @@
|
||||
|
||||
"@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.4.0", "", { "dependencies": { "bun-types": "1.4.0" } }, "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ=="],
|
||||
"@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
|
||||
|
||||
"@types/cacache": ["@types/cacache@20.0.1", "", { "dependencies": { "@types/node": "*", "minipass": "*" } }, "sha512-QlKW3AFoFr/hvPHwFHMIVUH/ZCYeetBNou3PCmxu5LaNDvrtBlPJtIA6uhmU9JRt9oxj7IYoqoLcpxtzpPiTcw=="],
|
||||
|
||||
@@ -2972,7 +2972,7 @@
|
||||
|
||||
"bun-pty": ["bun-pty@0.4.8", "", {}, "sha512-rO70Mrbr13+jxHHHu2YBkk2pNqrJE5cJn29WE++PUr+GFA0hq/VgtQPZANJ8dJo6d7XImvBk37Innt8GM7O28w=="],
|
||||
|
||||
"bun-types": ["bun-types@1.4.0", "", { "dependencies": { "@types/node": "*" } }, "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q=="],
|
||||
"bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
|
||||
|
||||
"bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="],
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
exact = true
|
||||
# Keep Kilo's longer supply-chain quarantine while allowing packages that must track coordinated releases.
|
||||
minimumReleaseAge = 410520 # seconds (~4.75 days / ~114 hours)
|
||||
minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish", "@types/bun", "bun-types"] # kilocode_change
|
||||
minimumReleaseAgeExcludes = ["mermaid", "@mermaid-js/parser", "@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish"]
|
||||
|
||||
[test]
|
||||
root = "./do-not-run-tests-from-root"
|
||||
|
||||
+4
-4
@@ -14,19 +14,19 @@ let
|
||||
sources = {
|
||||
"aarch64-linux" = {
|
||||
name = "bun-linux-aarch64";
|
||||
hash = "sha256-SxozLuhhmD65O8/m93D/+U4+MbLDiL2uo8jtNeWO7Q4=";
|
||||
hash = "sha256-on/7Y6gxA3WDbg1vZorhf6jY0YuIw3yCHGUzGXOhmjs=";
|
||||
};
|
||||
"x86_64-linux" = {
|
||||
name = "bun-linux-x64";
|
||||
hash = "sha256-LQP7X7g6yLVnrKCigbLOGhoZ1Ij1bClo2Iw/Jekv5FI=";
|
||||
hash = "sha256-lR7iruhV8IWVruxiJSJqKY0/6oOj3NZGXAnLzN9+hI8=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
name = "bun-darwin-aarch64";
|
||||
hash = "sha256-xmnpf2Fk4cluBwF0jbmN+ndJKQjL2DlMdVcTSnNd44E=";
|
||||
hash = "sha256-2LliIYKK1vl6x6wKt+lYcjQa92MAHogD6CZ2UsJlJiA=";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
name = "bun-darwin-x64";
|
||||
hash = "sha256-HQIRuPHcmRGCNEaHrRXnLuhvFUhFpff6R3mUzTQd2bA=";
|
||||
hash = "sha256-QYPfM3RiPlurMVxUfPoJdFM81FfYa3O2OfeoeXTNZjM=";
|
||||
};
|
||||
};
|
||||
source =
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
"description": "AI-powered development tool",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"packageManager": "bun@1.4.0",
|
||||
"packageManager": "bun@1.3.14",
|
||||
"scripts": {
|
||||
"dev": "KILO_CLIENT=cli bun run --cwd packages/opencode --conditions=node src/index.ts",
|
||||
"dev:stats": "bun sst shell --stage=production -- bun run --cwd packages/stats/app dev",
|
||||
@@ -35,7 +35,7 @@
|
||||
"@effect/platform-node": "4.0.0-beta.83",
|
||||
"@anthropic-ai/sandbox-runtime": "0.0.63",
|
||||
"@npmcli/arborist": "9.4.0",
|
||||
"@types/bun": "1.4.0",
|
||||
"@types/bun": "1.3.14",
|
||||
"@types/cross-spawn": "6.0.6",
|
||||
"@octokit/rest": "22.0.0",
|
||||
"@opentui/core": "0.4.5",
|
||||
|
||||
@@ -6,7 +6,7 @@ FROM ${REGISTRY}/build/base:24.04
|
||||
SHELL ["/bin/bash", "-lc"]
|
||||
|
||||
ARG NODE_VERSION=24.4.0
|
||||
ARG BUN_VERSION=1.4.0
|
||||
ARG BUN_VERSION=1.3.14
|
||||
|
||||
ENV BUN_INSTALL=/opt/bun
|
||||
ENV PATH=/opt/bun/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
@@ -3,69 +3,6 @@ import { KiloPtyTermination } from "./termination"
|
||||
import { spawn } from "#pty"
|
||||
|
||||
const TIMEOUT = 15_000
|
||||
const RENDER_TIMEOUT = 60_000
|
||||
|
||||
export function marker(output: string) {
|
||||
const text = output
|
||||
.replace(/\x1b\](?:[^\x07\x1b]|\x1b(?!\\))*(?:\x07|\x1b\\)/g, "")
|
||||
.replace(/\x1b[P^_](?:[^\x1b]|\x1b(?!\\))*\x1b\\/g, "")
|
||||
.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "")
|
||||
.replace(/\x1b[@-_]/g, "")
|
||||
return text.split(/\r?\n/).some((line) => line.trim() === "KILO_PTY_READY")
|
||||
}
|
||||
|
||||
async function render() {
|
||||
const proc = spawn(process.execPath, ["--pure"], {
|
||||
name: "xterm-256color",
|
||||
cwd: process.cwd(),
|
||||
env: {
|
||||
...process.env,
|
||||
TERM: "xterm-256color",
|
||||
KILO_TERMINAL: "1",
|
||||
KILO_NO_DAEMON: "1",
|
||||
KILO_DISABLE_AUTOUPDATE: "1",
|
||||
KILO_DISABLE_MODELS_FETCH: "1",
|
||||
KILO_DISABLE_PROJECT_CONFIG: "1",
|
||||
KILO_DISABLE_DEFAULT_PLUGINS: "1",
|
||||
KILO_DISABLE_TERMINAL_TITLE: "0",
|
||||
KILO_CONFIG_CONTENT: "{}",
|
||||
KILO_AUTH_CONTENT: "{}",
|
||||
} as Record<string, string>,
|
||||
cols: 100,
|
||||
rows: 40,
|
||||
})
|
||||
const state = { output: "", exited: false }
|
||||
const ready = Promise.withResolvers<void>()
|
||||
const data = proc.onData((chunk) => {
|
||||
state.output = (state.output + chunk).slice(-20_000)
|
||||
if (state.output.includes("Ask anything...")) ready.resolve()
|
||||
})
|
||||
const exit = proc.onExit((event) => {
|
||||
state.exited = true
|
||||
ready.reject(new Error(`TUI exited before rendering (code ${event.exitCode}): ${JSON.stringify(state.output)}`))
|
||||
})
|
||||
const timeout = AbortSignal.timeout(RENDER_TIMEOUT)
|
||||
|
||||
try {
|
||||
await Promise.race([
|
||||
ready.promise,
|
||||
new Promise<never>((_, reject) =>
|
||||
timeout.addEventListener(
|
||||
"abort",
|
||||
() =>
|
||||
reject(
|
||||
new Error(`TUI produced no rendered frame within ${RENDER_TIMEOUT}ms: ${JSON.stringify(state.output)}`),
|
||||
),
|
||||
{ once: true },
|
||||
),
|
||||
),
|
||||
])
|
||||
} finally {
|
||||
data.dispose()
|
||||
exit.dispose()
|
||||
if (!state.exited) await KiloPtyTermination.terminate(proc)
|
||||
}
|
||||
}
|
||||
|
||||
export async function smoke() {
|
||||
const proc = spawn(Shell.preferred(), [], {
|
||||
@@ -80,7 +17,8 @@ export async function smoke() {
|
||||
const exited = Promise.withResolvers<number>()
|
||||
const data = proc.onData((chunk) => {
|
||||
state.output += chunk
|
||||
if (marker(state.output)) output.resolve()
|
||||
const lines = state.output.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").split(/\r?\n/)
|
||||
if (lines.some((line) => line.trim() === "KILO_PTY_READY")) output.resolve()
|
||||
})
|
||||
const exit = proc.onExit((event) => {
|
||||
state.exited = true
|
||||
@@ -129,8 +67,6 @@ export async function smoke() {
|
||||
} finally {
|
||||
if (!stopped) active.kill()
|
||||
}
|
||||
|
||||
await render()
|
||||
}
|
||||
|
||||
export * as PtySmoke from "./smoke"
|
||||
|
||||
@@ -183,13 +183,7 @@ describe("durable PTY registry", () => {
|
||||
const info = yield* Effect.scoped(
|
||||
Effect.gen(function* () {
|
||||
const pty = yield* Pty.Service
|
||||
return yield* pty.create({ command: "/bin/sh", cwd: dir.path })
|
||||
}).pipe(Effect.provide(locations.get(target))),
|
||||
)
|
||||
yield* Effect.scoped(
|
||||
Effect.gen(function* () {
|
||||
const pty = yield* Pty.Service
|
||||
yield* pty.write(info.id, "exit 7\r")
|
||||
return yield* pty.create({ command: "/bin/sh", args: ["-c", "exit 7"], cwd: dir.path })
|
||||
}).pipe(Effect.provide(locations.get(target))),
|
||||
)
|
||||
const exited = yield* Queue.take(queue).pipe(Effect.timeout("5 seconds"))
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { marker } from "../../src/kilocode/pty/smoke"
|
||||
|
||||
describe("PTY smoke output", () => {
|
||||
test("detects a marker after PowerShell formatting", () => {
|
||||
const output =
|
||||
"\x1b[93mecho KILO_PTY_READY\r\n\x1b[mKILO_PTY_READY\r\n\x1b]0;Administrator: PowerShell\x07PS> "
|
||||
|
||||
expect(marker(output)).toBe(true)
|
||||
})
|
||||
|
||||
test("does not accept the echoed command", () => {
|
||||
expect(marker("\x1b[93mecho KILO_PTY_READY\r\n\x1b[mPS> ")).toBe(false)
|
||||
})
|
||||
|
||||
test("detects a marker around OSC and DCS sequences", () => {
|
||||
const output = "\x1b]133;A\x07\x1bP+q4d73\x1b\\KILO_PTY_READY\r\n"
|
||||
|
||||
expect(marker(output)).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -16,7 +16,7 @@ This document will help you set up your development environment and understand h
|
||||
Before you begin, make sure you have the following installed:
|
||||
|
||||
1. **Git** - For version control
|
||||
2. **Bun 1.4.0+** - Required for installing dependencies and running scripts
|
||||
2. **Bun 1.3.14+** - Required for installing dependencies and running scripts
|
||||
3. **Visual Studio Code** - Our recommended IDE for development
|
||||
4. **Java 21** - Required only when running JetBrains plugin checks or repo-level checks that include `@kilocode/kilo-jetbrains`
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
<ul>
|
||||
<li><strong>VSCode</strong> ≥ 1.105.1 (matches kilocode's <code>engines.vscode</code>)</li>
|
||||
<li>
|
||||
<strong>Bun</strong> ≥ 1.4.0 (the build script checks the version) — install via
|
||||
<strong>Bun</strong> ≥ 1.3.14 (the build script checks the version) — install via
|
||||
<code>brew install bun</code> or <a href="https://bun.sh">bun.sh</a>
|
||||
</li>
|
||||
<li><strong>GitHub CLI</strong> (<code>gh</code>) — optional but makes the PR checkout one command</li>
|
||||
|
||||
@@ -24,7 +24,6 @@ import { stageBubblewrap } from "./kilocode/bubblewrap"
|
||||
import { LanceDBRuntime } from "../src/kilocode/lancedb"
|
||||
import { KiloSandboxWorker } from "./kilocode/kilo-sandbox-worker"
|
||||
import { KiloSandboxNetwork } from "./kilocode/kilo-sandbox-network"
|
||||
import { KiloCliSmoke } from "./kilocode/cli-smoke"
|
||||
// kilocode_change end
|
||||
|
||||
const singleFlag = process.argv.includes("--single")
|
||||
@@ -313,7 +312,7 @@ for (const item of targets) {
|
||||
// kilocode_change end
|
||||
format: "esm",
|
||||
minify: true,
|
||||
// kilocode_change start - keep the compiled OpenTUI/Solid graph in one chunk to avoid blank startup frames.
|
||||
// kilocode_change start - Bun 1.3.14 emits invalid cross-chunk exports in compiled binaries.
|
||||
splitting: false,
|
||||
// kilocode_change end
|
||||
compile: {
|
||||
@@ -396,9 +395,6 @@ for (const item of targets) {
|
||||
console.log("Models snapshot smoke test passed")
|
||||
await KiloSandboxWorker.smoke(binaryPath)
|
||||
console.log("Kilo sandbox mutation worker smoke test passed")
|
||||
console.log(`Running smoke test: ${binaryPath} --pure __pty-smoke`)
|
||||
await KiloCliSmoke.pty(binaryPath)
|
||||
console.log("Packaged TUI smoke test passed")
|
||||
// kilocode_change end
|
||||
// kilocode_change start
|
||||
} catch (e) {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import fs from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
|
||||
export namespace KiloCliSmoke {
|
||||
export async function pty(binary: string) {
|
||||
const root = await fs.promises.mkdtemp(path.join(os.tmpdir(), "kilo-pty-"))
|
||||
const env = { ...process.env }
|
||||
delete env.KILO_MODELS_PATH
|
||||
delete env.KILO_MODELS_URL
|
||||
delete env.KILO_CONFIG
|
||||
delete env.KILO_CONFIG_DIR
|
||||
|
||||
try {
|
||||
const proc = Bun.spawn([binary, "--pure", "__pty-smoke"], {
|
||||
env: {
|
||||
...env,
|
||||
HOME: root,
|
||||
XDG_DATA_HOME: path.join(root, "data"),
|
||||
XDG_CACHE_HOME: path.join(root, "cache"),
|
||||
XDG_CONFIG_HOME: path.join(root, "config"),
|
||||
XDG_STATE_HOME: path.join(root, "state"),
|
||||
KILO_PTY_SMOKE: "1",
|
||||
KILO_NO_DAEMON: "1",
|
||||
KILO_DISABLE_MODELS_FETCH: "1",
|
||||
KILO_DISABLE_PROJECT_CONFIG: "1",
|
||||
KILO_CONFIG_CONTENT: "{}",
|
||||
KILO_AUTH_CONTENT: "{}",
|
||||
},
|
||||
stdout: "inherit",
|
||||
stderr: "inherit",
|
||||
windowsHide: true,
|
||||
})
|
||||
const code = await proc.exited
|
||||
if (code !== 0) throw new Error(`Compiled TUI smoke test exited with code ${code}`)
|
||||
} finally {
|
||||
await fs.promises.rm(root, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// kilocode_change - new file
|
||||
// Bun 1.4 narrows NodeJS.Process event overloads.
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface Process {
|
||||
on(event: string | symbol, listener: (...args: never[]) => void): this
|
||||
off(event: string | symbol, listener: (...args: never[]) => void): this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
@@ -29,109 +29,3 @@ index 3454256..6dca25a 100644
|
||||
|
||||
if (existsSync(binaryPath)) {
|
||||
return binaryPath;
|
||||
diff --git a/src/ffi.ts b/src/ffi.ts
|
||||
--- a/src/ffi.ts
|
||||
+++ b/src/ffi.ts
|
||||
@@ -328,6 +328,10 @@
|
||||
return new TextEncoder().encode(`${s}\0`);
|
||||
}
|
||||
-
|
||||
+
|
||||
+function asResult(value: Pointer | bigint | null): Pointer | null {
|
||||
+ return value as unknown as Pointer | null;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Convert snake_case keys to camelCase recursively
|
||||
*/
|
||||
@@ -1121,4 +1126,4 @@
|
||||
minComboCount,
|
||||
);
|
||||
- return parseSearchResult(resultPtr);
|
||||
+ return parseSearchResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1145,4 +1150,4 @@
|
||||
pageSize,
|
||||
);
|
||||
- return parseSearchResult(resultPtr);
|
||||
+ return parseSearchResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1168,4 +1173,4 @@
|
||||
pageSize,
|
||||
);
|
||||
- return parseDirSearchResult(resultPtr);
|
||||
+ return parseDirSearchResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1195,4 +1200,4 @@
|
||||
minComboCount,
|
||||
);
|
||||
- return parseMixedSearchResult(resultPtr);
|
||||
+ return parseMixedSearchResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1230,4 +1235,4 @@
|
||||
classifyDefinitions,
|
||||
);
|
||||
- return parseGrepResult(resultPtr);
|
||||
+ return parseGrepResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1265,4 +1270,4 @@
|
||||
classifyDefinitions,
|
||||
);
|
||||
- return parseGrepResult(resultPtr);
|
||||
+ return parseGrepResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1274,4 +1279,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_scan_files(handle);
|
||||
- return parseVoidResult(resultPtr);
|
||||
+ return parseVoidResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1291,4 +1296,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_get_base_path(handle);
|
||||
- return parseStringResult(resultPtr);
|
||||
+ return parseStringResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1336,4 +1341,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_wait_for_scan(handle, BigInt(timeoutMs));
|
||||
- return parseBoolResult(resultPtr);
|
||||
+ return parseBoolResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1351,4 +1356,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_restart_index(handle, ptr(encodeString(newPath)));
|
||||
- return parseVoidResult(resultPtr);
|
||||
+ return parseVoidResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1360,4 +1365,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_refresh_git_status(handle);
|
||||
- return parseIntResult(resultPtr);
|
||||
+ return parseIntResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1377,4 +1382,4 @@
|
||||
ptr(encodeString(filePath)),
|
||||
);
|
||||
- return parseBoolResult(resultPtr);
|
||||
+ return parseBoolResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1392,4 +1397,4 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_get_historical_query(handle, BigInt(offset));
|
||||
- return parseStringResult(resultPtr);
|
||||
+ return parseStringResult(asResult(resultPtr));
|
||||
}
|
||||
@@ -1306,3 +1311,3 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_get_scan_progress(handle);
|
||||
- const envelope = readResultEnvelope(resultPtr);
|
||||
+ const envelope = readResultEnvelope(asResult(resultPtr));
|
||||
@@ -1406,6 +1411,6 @@
|
||||
const library = loadLibrary();
|
||||
const resultPtr = library.symbols.fff_health_check(
|
||||
handle ?? (0 as unknown as Pointer),
|
||||
ptr(encodeString(testPath)),
|
||||
);
|
||||
- return parseJsonResult<unknown>(resultPtr);
|
||||
+ return parseJsonResult<unknown>(asResult(resultPtr));
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"ts-morph": "^24.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "1.4.0"
|
||||
"@types/bun": "1.3.14"
|
||||
},
|
||||
"peerDependencies": {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user