yamine 0.8.1 → 0.8.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46a9c0208ca1d5581c3c25d45b60370a6e37c7dd4fcf721bda7a5573fc1c70db
4
- data.tar.gz: 0b534671965987794b3872969dcc3065dfca5532a401f12701e531a0779e7820
3
+ metadata.gz: 52c2213e83a301befe5e048b7a83eec6e6c945f23475334928a298f81d9e8369
4
+ data.tar.gz: 39e2c51e536b6fa3d50a956bce2b20187899bf52a2c86a3b82ab110877a485fc
5
5
  SHA512:
6
- metadata.gz: 339e64fabec8dab3c019bfdec8ec8f9f558dc4700b647fd462c4898e4f8796f93c1b65078d9ff171c338f38c70d055a8185b1d21bb547c63831bd816c5b7c6de
7
- data.tar.gz: a71d56eef8327103f46a050307bb01095810ccd70085f3728a430617d3230cf567ffe3e9a04047428d6988d63efa7dd6965546bbb5e689f270991f8d4cc55d6d
6
+ metadata.gz: 543d3ba0a552e5cc2deef0784322d225c99a45ea19e35af090f6d5691d5cfc5b9637e8831755db5509e024a352fa33de70843aef2734353acf9bacfc867e805a
7
+ data.tar.gz: 57213387e578ba71b6d4140dd139d10fe2e7bf5168fe74ad85a3ba2b87089b69959284fc7f531f38034838dc67cb70b86b92f13b926aa638c1291a36bdbb1376
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.2] — 2026-09-10
4
+
5
+ ### Fixed
6
+
7
+ - **The rest of the `--json` stdout leaks.** Two writers still reached
8
+ stdout during a machine-readable run, corrupting the stream a parser
9
+ reads: the `-> <url>` line from the sequential boot path, and
10
+ "Starting proxy..." — which is printed before the reporter is even
11
+ installed, so it would have been the FIRST line of a `--json` run.
12
+ Both now route through the same stderr-when-json rule as the rest of
13
+ the narration, and the contract is pinned by tests rather than assumed
14
+ (two separate leaks have now been caught here).
15
+
16
+
3
17
  ## [0.8.1] — 2026-09-10
4
18
 
5
19
  ### Fixed
@@ -21,7 +21,7 @@ module Yamine
21
21
  # Ownership gate before any side effects: no proxy spawn, no
22
22
  # port allocation when we'd refuse anyway.
23
23
  check_worktree_ownership!(ctx, resolved, force: opts[:force])
24
- ensure_proxy!(ctx)
24
+ ensure_proxy!(ctx, json: opts[:json])
25
25
  boot_all(ctx, resolved, opts)
26
26
  end
27
27
 
@@ -180,7 +180,7 @@ module Yamine
180
180
  rails_dev_host: item[:hostname], database_url: db_url)
181
181
  routes_registered << { hostnames: item[:hostnames], app: app }
182
182
 
183
- puts " -> #{item[:url]}"
183
+ say opts, " -> #{item[:url]}"
184
184
  end
185
185
  children
186
186
  end
@@ -548,7 +548,11 @@ module Yamine
548
548
  Yamine::Resolver.resolve(Dir.pwd, variant: variant, tld: tld)
549
549
  end
550
550
 
551
- def ensure_proxy!(ctx)
551
+ # json: keeps stdout free for the machine-readable stream — this runs
552
+ # BEFORE boot_all installs the reporter, so its progress line is the
553
+ # one piece of narration that could still land mid-JSON and break a
554
+ # parser on the first line of a --json run.
555
+ def ensure_proxy!(ctx, json: false)
552
556
  port = ctx.proxy_port
553
557
  tls = ctx.proxy_tls
554
558
  if ProxyControl.listening?(port)
@@ -570,7 +574,8 @@ module Yamine
570
574
  $stderr.puts " Or start the proxy by hand: sudo yamine proxy start"
571
575
  exit 1
572
576
  end
573
- puts "Starting proxy#{privileged ? " (sudo)" : ""}..."
577
+ starting = "Starting proxy#{privileged ? " (sudo)" : ""}..."
578
+ json ? $stderr.puts(starting) : puts(starting)
574
579
  begin
575
580
  Yamine::ProxyControl.spawn_daemon(store: ctx.store, port: port, tls: tls, sudo: privileged)
576
581
  rescue Yamine::ProxyNotRunningError => e
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yamine
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto