bimba-cli 0.5.1 → 0.5.2

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/package.json +1 -1
  2. package/serve.js +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimba-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/HeapVoid/bimba.git"
package/serve.js CHANGED
@@ -260,6 +260,7 @@ export function serve(entrypoint, flags) {
260
260
  let _fadeTimers = []
261
261
  let _fadeId = 0
262
262
  let _statusSaved = false
263
+ const _isTTY = process.stdout.isTTY
263
264
 
264
265
  function cancelFade() {
265
266
  _fadeTimers.forEach(t => clearTimeout(t))
@@ -267,6 +268,22 @@ export function serve(entrypoint, flags) {
267
268
  }
268
269
 
269
270
  function printStatus(file, state, errors) {
271
+ // non-TTY (pipes, Claude Code bash, CI): plain newline-terminated output,
272
+ // no ANSI cursor tricks, no fade-out — so logs stay readable.
273
+ if (!_isTTY) {
274
+ const now = new Date().toLocaleTimeString('ru-RU', { hour: '2-digit', minute: '2-digit', second: '2-digit' })
275
+ const tag = state === 'ok' ? 'ok' : 'fail'
276
+ process.stdout.write(` ${now} ${file} ${tag}\n`)
277
+ if (errors?.length) {
278
+ for (const err of errors) {
279
+ const msg = err.message || String(err)
280
+ const line = err.range?.start?.line
281
+ process.stdout.write(` ${msg}${line ? ` (line ${line})` : ''}\n`)
282
+ }
283
+ }
284
+ return
285
+ }
286
+
270
287
  cancelFade()
271
288
  if (_statusSaved) {
272
289
  process.stdout.write('\x1b[u\x1b[J')