@cmmd-center/forge 0.13.5 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BunHttpServer-DKvSpNd1.cjs → BunHttpServer-C7-1JJ7b.cjs} +4 -4
- package/dist/{BunHttpServer-CDh4Vioe.mjs → BunHttpServer-CVPGkizx.mjs} +4 -4
- package/dist/{BunServices-D6PAheqS.mjs → BunServices-CPrZSIfE.mjs} +2 -2
- package/dist/{BunServices-DDh7Whyx.cjs → BunServices-Dl-3897e.cjs} +2 -2
- package/dist/{Cache-BVilO50s.mjs → Cache-C9cwdCDt.mjs} +2 -2
- package/dist/{Cache-DCF22Dfk.cjs → Cache-Cf3ARNaS.cjs} +2 -2
- package/dist/{HttpServer-ClsGgAq1.mjs → HttpServer-COaBeM7-.mjs} +2 -2
- package/dist/{HttpServer-D1gSU7NX.cjs → HttpServer-CggZzScj.cjs} +3 -3
- package/dist/{NodeHttpServer-Dfc7nSMq.cjs → NodeHttpServer-Bi339XFk.cjs} +5 -5
- package/dist/{NodeHttpServer-DT0TF8s4.mjs → NodeHttpServer-UQnvZnmu.mjs} +5 -5
- package/dist/{NodePTY-loxi8Vku.mjs → NodePTY-B1u6RHXk.mjs} +2 -2
- package/dist/{NodePTY-S4tPEwZc.cjs → NodePTY-UOaRyQsj.cjs} +2 -2
- package/dist/{NodeServices-Cb0rXFb2.cjs → NodeServices-CKFIZVu5.cjs} +2 -2
- package/dist/{NodeServices-DE8jhdcU.cjs → NodeServices-R0BZsZ72.cjs} +1 -1
- package/dist/{NodeServices-BahzLhbo.mjs → NodeServices-z1Ac4lEO.mjs} +2 -2
- package/dist/{NodeSqliteClient-DqFjB3u_.mjs → NodeSqliteClient-BrzqdOsF.mjs} +4 -4
- package/dist/{NodeSqliteClient-qjBWAOGq.cjs → NodeSqliteClient-CyJvo9y9.cjs} +4 -4
- package/dist/{NodeTerminal-rYbifme7.cjs → NodeTerminal-B89MobLp.cjs} +2 -2
- package/dist/{NodeTerminal-BPw7bktz.mjs → NodeTerminal-pYVVRTiD.mjs} +2 -2
- package/dist/{Path-CGCc_dDx.cjs → Path-BunGrE8F.cjs} +72 -1
- package/dist/{Path-C851t6sC.mjs → Path-evOm-H0Q.mjs} +61 -2
- package/dist/{SqlError-CzB6p9lL.cjs → SqlError-1wIMjXAf.cjs} +2 -2
- package/dist/{SqlError-3aqibZrj.mjs → SqlError-CezTFGvr.mjs} +2 -2
- package/dist/{SqliteClient-DTWCGkrj.mjs → SqliteClient-D3Yd3ZHn.mjs} +3 -3
- package/dist/{SqliteClient-Cq1peWN1.cjs → SqliteClient-bo7iui1t.cjs} +3 -3
- package/dist/bin.cjs +4819 -3952
- package/dist/bin.mjs +4357 -3496
- package/dist/client/assets/{CanvasPanel-BwSV27Ct.js → CanvasPanel-C21OO2qi.js} +2 -2
- package/dist/client/assets/{CompositeItem-CZk3X-ud.js → CompositeItem-naFGUtSL.js} +2 -2
- package/dist/client/assets/{DiffPanel-BeCVuoWI.js → DiffPanel-D_YC838v.js} +3 -3
- package/dist/client/assets/{DiffPanel.logic-DUE8JeYc.js → DiffPanel.logic-Bqk_6nE1.js} +2 -2
- package/dist/client/assets/DiffPanelShell-D1KMJc9z.js +2532 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Co6F91_V.js → DiffWorkerPoolProvider-B5tF5UEc.js} +10 -10
- package/dist/client/assets/PullRequestCodePanel-ClD3ZXbi.js +5 -0
- package/dist/client/assets/Virtualizer-cvcMb_IQ.js +2 -0
- package/dist/client/assets/{canvasStateStore-5DH2Z-PG.js → canvasStateStore-CpNOSHBt.js} +2 -2
- package/dist/client/assets/cmmdAuthRedirect-DdH7K490.js +2 -0
- package/dist/client/assets/index-BE83u7Db.css +1 -0
- package/dist/client/assets/index-yLc4LtMp.js +153 -0
- package/dist/client/assets/{popover-Dxp_1Sz0.js → popover-BajtiGgk.js} +2 -2
- package/dist/client/assets/src-D6fBWY6U.js +3 -0
- package/dist/client/assets/{toggle-B-GE6jq_.js → toggle-BRNCUuRT.js} +2 -2
- package/dist/client/index.html +11 -11
- package/dist/forge-build.json +1 -1
- package/dist/node_modules/@ff-labs/fff-bin-linux-x64-gnu/libfff_c.so +0 -0
- package/dist/node_modules/@ff-labs/fff-bin-linux-x64-gnu/package.json +27 -0
- package/dist/node_modules/@ff-labs/fff-node/.bun-tag-689ffe3747e13d19 +0 -0
- package/dist/node_modules/@ff-labs/fff-node/README.md +126 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/binary.d.ts +22 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/binary.js +144 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/fff-api.d.ts +581 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/fff-api.js +24 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/ffi.d.ts +137 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/ffi.js +1191 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/finder.d.ts +353 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/finder.js +488 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/index.d.ts +47 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/index.js +47 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/platform.d.ts +27 -0
- package/dist/node_modules/@ff-labs/fff-node/dist/src/platform.js +120 -0
- package/dist/node_modules/@ff-labs/fff-node/package.json +76 -0
- package/dist/node_modules/@yuuang/ffi-rs-linux-x64-gnu/README.md +794 -0
- package/dist/node_modules/@yuuang/ffi-rs-linux-x64-gnu/ffi-rs.linux-x64-gnu.node +0 -0
- package/dist/node_modules/@yuuang/ffi-rs-linux-x64-gnu/package.json +21 -0
- package/dist/node_modules/ffi-rs/LICENSE +21 -0
- package/dist/node_modules/ffi-rs/README.md +794 -0
- package/dist/node_modules/ffi-rs/index.d.ts +222 -0
- package/dist/node_modules/ffi-rs/index.js +380 -0
- package/dist/node_modules/ffi-rs/package.json +76 -0
- package/dist/{open-FIgTDosf.mjs → open-D8mGyWmt.mjs} +3 -3
- package/package.json +2 -1
- package/dist/client/assets/DiffPanelShell-BtlUvofR.js +0 -2532
- package/dist/client/assets/PullRequestCodePanel-BJZt8VNz.js +0 -5
- package/dist/client/assets/cmmdAuthRedirect-D68LO-sw.js +0 -2
- package/dist/client/assets/diffTargetResolution-CTZU_fcs.js +0 -2
- package/dist/client/assets/index-CiFHhuWE.js +0 -153
- package/dist/client/assets/index-DivaIsZ4.css +0 -1
- package/dist/client/assets/src-n5cTLVWV.js +0 -3
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform detection utilities for downloading the correct binary
|
|
3
|
+
*/
|
|
4
|
+
import { execSync } from "node:child_process";
|
|
5
|
+
/**
|
|
6
|
+
* Get the platform triple (e.g., "x86_64-unknown-linux-gnu")
|
|
7
|
+
*/
|
|
8
|
+
export function getTriple() {
|
|
9
|
+
const platform = process.platform;
|
|
10
|
+
const arch = process.arch;
|
|
11
|
+
let osName;
|
|
12
|
+
if (platform === "darwin") {
|
|
13
|
+
osName = "apple-darwin";
|
|
14
|
+
}
|
|
15
|
+
else if (platform === "linux") {
|
|
16
|
+
osName = detectLinuxLibc();
|
|
17
|
+
}
|
|
18
|
+
else if (platform === "win32") {
|
|
19
|
+
osName = "pc-windows-msvc";
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
23
|
+
}
|
|
24
|
+
const archName = normalizeArch(arch);
|
|
25
|
+
return `${archName}-${osName}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Detect whether we're on musl or glibc Linux
|
|
29
|
+
*/
|
|
30
|
+
function detectLinuxLibc() {
|
|
31
|
+
let output = "";
|
|
32
|
+
try {
|
|
33
|
+
output = execSync("ldd --version 2>&1", {
|
|
34
|
+
encoding: "utf-8",
|
|
35
|
+
timeout: 5000,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
const err = e;
|
|
40
|
+
output = String(err?.stdout ?? "") + String(err?.stderr ?? "");
|
|
41
|
+
}
|
|
42
|
+
// ldd on musl can produce stdout with musl either with exit code 1 or 0
|
|
43
|
+
if (output.toLowerCase().includes("musl")) {
|
|
44
|
+
return "unknown-linux-musl";
|
|
45
|
+
}
|
|
46
|
+
return "unknown-linux-gnu";
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Normalize architecture name to Rust target format
|
|
50
|
+
*/
|
|
51
|
+
function normalizeArch(arch) {
|
|
52
|
+
switch (arch) {
|
|
53
|
+
case "x64":
|
|
54
|
+
case "amd64":
|
|
55
|
+
return "x86_64";
|
|
56
|
+
case "arm64":
|
|
57
|
+
return "aarch64";
|
|
58
|
+
case "arm":
|
|
59
|
+
return "arm";
|
|
60
|
+
default:
|
|
61
|
+
throw new Error(`Unsupported architecture: ${arch}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get the library file extension for the current platform
|
|
66
|
+
*/
|
|
67
|
+
export function getLibExtension() {
|
|
68
|
+
switch (process.platform) {
|
|
69
|
+
case "darwin":
|
|
70
|
+
return "dylib";
|
|
71
|
+
case "win32":
|
|
72
|
+
return "dll";
|
|
73
|
+
default:
|
|
74
|
+
return "so";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get the library filename prefix (empty on Windows)
|
|
79
|
+
*/
|
|
80
|
+
export function getLibPrefix() {
|
|
81
|
+
return process.platform === "win32" ? "" : "lib";
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the full library filename for the current platform
|
|
85
|
+
*/
|
|
86
|
+
export function getLibFilename() {
|
|
87
|
+
const prefix = getLibPrefix();
|
|
88
|
+
const ext = getLibExtension();
|
|
89
|
+
return `${prefix}fff_c.${ext}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Map from Rust target triple to npm platform package name.
|
|
93
|
+
* The @ff-labs/fff-bin-* packages contain the pre-built libfff_c
|
|
94
|
+
* shared library and are runtime-agnostic (used by both Bun and Node).
|
|
95
|
+
*/
|
|
96
|
+
const TRIPLE_TO_NPM_PACKAGE = {
|
|
97
|
+
"aarch64-apple-darwin": "@ff-labs/fff-bin-darwin-arm64",
|
|
98
|
+
"x86_64-apple-darwin": "@ff-labs/fff-bin-darwin-x64",
|
|
99
|
+
"x86_64-unknown-linux-gnu": "@ff-labs/fff-bin-linux-x64-gnu",
|
|
100
|
+
"aarch64-unknown-linux-gnu": "@ff-labs/fff-bin-linux-arm64-gnu",
|
|
101
|
+
"x86_64-unknown-linux-musl": "@ff-labs/fff-bin-linux-x64-musl",
|
|
102
|
+
"aarch64-unknown-linux-musl": "@ff-labs/fff-bin-linux-arm64-musl",
|
|
103
|
+
"x86_64-pc-windows-msvc": "@ff-labs/fff-bin-win32-x64",
|
|
104
|
+
"aarch64-pc-windows-msvc": "@ff-labs/fff-bin-win32-arm64",
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Get the npm package name for the current platform's native binary.
|
|
108
|
+
*
|
|
109
|
+
* @returns Package name like "@ff-labs/fff-bin-darwin-arm64"
|
|
110
|
+
* @throws If the current platform is not supported
|
|
111
|
+
*/
|
|
112
|
+
export function getNpmPackageName() {
|
|
113
|
+
const triple = getTriple();
|
|
114
|
+
const packageName = TRIPLE_TO_NPM_PACKAGE[triple];
|
|
115
|
+
if (!packageName) {
|
|
116
|
+
throw new Error(`No npm package available for platform: ${triple}`);
|
|
117
|
+
}
|
|
118
|
+
return packageName;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ff-labs/fff-node",
|
|
3
|
+
"version": "0.9.4",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "High-performance fuzzy file finder for Node.js - perfect for LLM agent tools",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/src/index.js",
|
|
12
|
+
"types": "./dist/src/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"test": "node test/e2e.mjs",
|
|
21
|
+
"typecheck": "tsc --noEmit"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.0.0"
|
|
25
|
+
},
|
|
26
|
+
"os": [
|
|
27
|
+
"darwin",
|
|
28
|
+
"linux",
|
|
29
|
+
"win32"
|
|
30
|
+
],
|
|
31
|
+
"cpu": [
|
|
32
|
+
"x64",
|
|
33
|
+
"arm64"
|
|
34
|
+
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/dmtrKovalenko/fff.git",
|
|
38
|
+
"directory": "packages/fff-node"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"file-finder",
|
|
42
|
+
"fuzzy-search",
|
|
43
|
+
"node",
|
|
44
|
+
"ffi",
|
|
45
|
+
"llm-tools",
|
|
46
|
+
"agent-tools",
|
|
47
|
+
"fast",
|
|
48
|
+
"rust"
|
|
49
|
+
],
|
|
50
|
+
"author": "Dmitry Kovalenko",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/dmtrKovalenko/fff/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/dmtrKovalenko/fff#readme",
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"ffi-rs": "^1.0.0"
|
|
61
|
+
},
|
|
62
|
+
"optionalDependencies": {
|
|
63
|
+
"@ff-labs/fff-bin-darwin-arm64": "0.9.4",
|
|
64
|
+
"@ff-labs/fff-bin-darwin-x64": "0.9.4",
|
|
65
|
+
"@ff-labs/fff-bin-linux-x64-gnu": "0.9.4",
|
|
66
|
+
"@ff-labs/fff-bin-linux-arm64-gnu": "0.9.4",
|
|
67
|
+
"@ff-labs/fff-bin-linux-x64-musl": "0.9.4",
|
|
68
|
+
"@ff-labs/fff-bin-linux-arm64-musl": "0.9.4",
|
|
69
|
+
"@ff-labs/fff-bin-win32-x64": "0.9.4",
|
|
70
|
+
"@ff-labs/fff-bin-win32-arm64": "0.9.4"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"typescript": "^5.0.0",
|
|
74
|
+
"@types/node": "^22.0.0"
|
|
75
|
+
}
|
|
76
|
+
}
|