@fabriccode/cli 7.0.85 → 7.0.87
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/bin/kilo +36 -8
- package/package.json +13 -13
package/bin/kilo
CHANGED
|
@@ -157,26 +157,41 @@ const names = (() => {
|
|
|
157
157
|
return [base]
|
|
158
158
|
})()
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
// fabriccode_change — collect every existing variant in priority order so we
|
|
161
|
+
// can fall through to the next one if a binary exists on disk but fails to
|
|
162
|
+
// exec (e.g. the musl variant lands on a glibc system: existsSync(...) is
|
|
163
|
+
// true but spawn returns ENOENT because the musl dynamic linker is absent).
|
|
164
|
+
function findBinaries(startDir) {
|
|
165
|
+
const found = []
|
|
161
166
|
let current = startDir
|
|
162
167
|
for (;;) {
|
|
163
168
|
const modules = path.join(current, "node_modules")
|
|
164
169
|
if (fs.existsSync(modules)) {
|
|
165
170
|
for (const name of names) {
|
|
166
171
|
const candidate = path.join(modules, name, "bin", binary)
|
|
167
|
-
if (fs.existsSync(candidate)
|
|
172
|
+
if (fs.existsSync(candidate) && !found.includes(candidate)) {
|
|
173
|
+
found.push(candidate)
|
|
174
|
+
}
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
177
|
const parent = path.dirname(current)
|
|
171
|
-
if (parent === current)
|
|
172
|
-
return
|
|
173
|
-
}
|
|
178
|
+
if (parent === current) break
|
|
174
179
|
current = parent
|
|
175
180
|
}
|
|
181
|
+
return found
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function tryRun(target) {
|
|
185
|
+
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
186
|
+
stdio: "inherit",
|
|
187
|
+
})
|
|
188
|
+
if (result.error) return result.error
|
|
189
|
+
const code = typeof result.status === "number" ? result.status : 0
|
|
190
|
+
process.exit(code)
|
|
176
191
|
}
|
|
177
192
|
|
|
178
|
-
const
|
|
179
|
-
if (
|
|
193
|
+
const candidates = findBinaries(scriptDir)
|
|
194
|
+
if (candidates.length === 0) {
|
|
180
195
|
console.error(
|
|
181
196
|
"It seems that your package manager failed to install the right version of the Fabric CLI for your platform. You can try manually installing " +
|
|
182
197
|
names.map((n) => `\"${n}\"`).join(" or ") +
|
|
@@ -185,4 +200,17 @@ if (!resolved) {
|
|
|
185
200
|
process.exit(1)
|
|
186
201
|
}
|
|
187
202
|
|
|
188
|
-
|
|
203
|
+
let lastError
|
|
204
|
+
for (const candidate of candidates) {
|
|
205
|
+
lastError = tryRun(candidate)
|
|
206
|
+
// tryRun calls process.exit on success; if we get here the binary failed
|
|
207
|
+
// to exec — try the next variant.
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
console.error(
|
|
211
|
+
"Fabric CLI binary failed to launch on this platform. Tried:\n " +
|
|
212
|
+
candidates.join("\n ") +
|
|
213
|
+
"\nLast error: " +
|
|
214
|
+
(lastError && lastError.message ? lastError.message : String(lastError)),
|
|
215
|
+
)
|
|
216
|
+
process.exit(1)
|
package/package.json
CHANGED
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
9
9
|
},
|
|
10
|
-
"version": "7.0.
|
|
10
|
+
"version": "7.0.87",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@fabriccode/cli-linux-x64-musl": "7.0.
|
|
14
|
-
"@fabriccode/cli-darwin-x64": "7.0.
|
|
15
|
-
"@fabriccode/cli-darwin-x64-baseline": "7.0.
|
|
16
|
-
"@fabriccode/cli-windows-arm64": "7.0.
|
|
17
|
-
"@fabriccode/cli-linux-x64-baseline-musl": "7.0.
|
|
18
|
-
"@fabriccode/cli-linux-x64-baseline": "7.0.
|
|
19
|
-
"@fabriccode/cli-linux-arm64": "7.0.
|
|
20
|
-
"@fabriccode/cli-linux-arm64-musl": "7.0.
|
|
21
|
-
"@fabriccode/cli-windows-x64": "7.0.
|
|
22
|
-
"@fabriccode/cli-darwin-arm64": "7.0.
|
|
23
|
-
"@fabriccode/cli-windows-x64-baseline": "7.0.
|
|
24
|
-
"@fabriccode/cli-linux-x64": "7.0.
|
|
13
|
+
"@fabriccode/cli-linux-x64-musl": "7.0.87",
|
|
14
|
+
"@fabriccode/cli-darwin-x64": "7.0.87",
|
|
15
|
+
"@fabriccode/cli-darwin-x64-baseline": "7.0.87",
|
|
16
|
+
"@fabriccode/cli-windows-arm64": "7.0.87",
|
|
17
|
+
"@fabriccode/cli-linux-x64-baseline-musl": "7.0.87",
|
|
18
|
+
"@fabriccode/cli-linux-x64-baseline": "7.0.87",
|
|
19
|
+
"@fabriccode/cli-linux-arm64": "7.0.87",
|
|
20
|
+
"@fabriccode/cli-linux-arm64-musl": "7.0.87",
|
|
21
|
+
"@fabriccode/cli-windows-x64": "7.0.87",
|
|
22
|
+
"@fabriccode/cli-darwin-arm64": "7.0.87",
|
|
23
|
+
"@fabriccode/cli-windows-x64-baseline": "7.0.87",
|
|
24
|
+
"@fabriccode/cli-linux-x64": "7.0.87"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|