@fabriccode/cli 7.0.87 → 7.0.89

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.
Files changed (2) hide show
  1. package/bin/kilo +8 -36
  2. package/package.json +13 -13
package/bin/kilo CHANGED
@@ -157,41 +157,26 @@ const names = (() => {
157
157
  return [base]
158
158
  })()
159
159
 
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 = []
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) && !found.includes(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) break
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 candidates = findBinaries(scriptDir)
194
- if (candidates.length === 0) {
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
- 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)
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.87",
10
+ "version": "7.0.89",
11
11
  "license": "MIT",
12
12
  "optionalDependencies": {
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"
13
+ "@fabriccode/cli-linux-x64-musl": "7.0.89",
14
+ "@fabriccode/cli-darwin-x64": "7.0.89",
15
+ "@fabriccode/cli-darwin-x64-baseline": "7.0.89",
16
+ "@fabriccode/cli-windows-arm64": "7.0.89",
17
+ "@fabriccode/cli-linux-x64-baseline-musl": "7.0.89",
18
+ "@fabriccode/cli-linux-x64-baseline": "7.0.89",
19
+ "@fabriccode/cli-linux-arm64": "7.0.89",
20
+ "@fabriccode/cli-linux-arm64-musl": "7.0.89",
21
+ "@fabriccode/cli-windows-x64": "7.0.89",
22
+ "@fabriccode/cli-darwin-arm64": "7.0.89",
23
+ "@fabriccode/cli-windows-x64-baseline": "7.0.89",
24
+ "@fabriccode/cli-linux-x64": "7.0.89"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",