@fabriccode/cli 7.0.87 → 7.0.88
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 +8 -36
- package/package.json +13 -13
package/bin/kilo
CHANGED
|
@@ -157,41 +157,26 @@ const names = (() => {
|
|
|
157
157
|
return [base]
|
|
158
158
|
})()
|
|
159
159
|
|
|
160
|
-
|
|
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 = []
|
|
160
|
+
function findBinary(startDir) {
|
|
166
161
|
let current = startDir
|
|
167
162
|
for (;;) {
|
|
168
163
|
const modules = path.join(current, "node_modules")
|
|
169
164
|
if (fs.existsSync(modules)) {
|
|
170
165
|
for (const name of names) {
|
|
171
166
|
const candidate = path.join(modules, name, "bin", binary)
|
|
172
|
-
if (fs.existsSync(candidate)
|
|
173
|
-
found.push(candidate)
|
|
174
|
-
}
|
|
167
|
+
if (fs.existsSync(candidate)) return candidate
|
|
175
168
|
}
|
|
176
169
|
}
|
|
177
170
|
const parent = path.dirname(current)
|
|
178
|
-
if (parent === current)
|
|
171
|
+
if (parent === current) {
|
|
172
|
+
return
|
|
173
|
+
}
|
|
179
174
|
current = parent
|
|
180
175
|
}
|
|
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)
|
|
191
176
|
}
|
|
192
177
|
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
178
|
+
const resolved = findBinary(scriptDir)
|
|
179
|
+
if (!resolved) {
|
|
195
180
|
console.error(
|
|
196
181
|
"It seems that your package manager failed to install the right version of the Fabric CLI for your platform. You can try manually installing " +
|
|
197
182
|
names.map((n) => `\"${n}\"`).join(" or ") +
|
|
@@ -200,17 +185,4 @@ if (candidates.length === 0) {
|
|
|
200
185
|
process.exit(1)
|
|
201
186
|
}
|
|
202
187
|
|
|
203
|
-
|
|
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)
|
|
188
|
+
run(resolved)
|
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.88",
|
|
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.88",
|
|
14
|
+
"@fabriccode/cli-darwin-x64": "7.0.88",
|
|
15
|
+
"@fabriccode/cli-darwin-x64-baseline": "7.0.88",
|
|
16
|
+
"@fabriccode/cli-windows-arm64": "7.0.88",
|
|
17
|
+
"@fabriccode/cli-linux-x64-baseline-musl": "7.0.88",
|
|
18
|
+
"@fabriccode/cli-linux-x64-baseline": "7.0.88",
|
|
19
|
+
"@fabriccode/cli-linux-arm64": "7.0.88",
|
|
20
|
+
"@fabriccode/cli-linux-arm64-musl": "7.0.88",
|
|
21
|
+
"@fabriccode/cli-windows-x64": "7.0.88",
|
|
22
|
+
"@fabriccode/cli-darwin-arm64": "7.0.88",
|
|
23
|
+
"@fabriccode/cli-windows-x64-baseline": "7.0.88",
|
|
24
|
+
"@fabriccode/cli-linux-x64": "7.0.88"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|