wokku-cli 0.9.0 → 0.10.0

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: b3597333cab6700ca27a5956994611fae266fb1d575b34063e4aa3b0ce81f224
4
- data.tar.gz: ef1d8138fe50d785d24fbbce69cd0121f9840f1d15b440b3bcc0b6cfaf3d9627
3
+ metadata.gz: cfbd0663d45d51e3a5dabedad854c58f432f7c85a8ad5cc9ea8216530148d140
4
+ data.tar.gz: 76cbf9f44acd070052c4fe9bcc864ecd09e159553f9f37f28c7f08618de0c1d3
5
5
  SHA512:
6
- metadata.gz: 2ac21809795e4cdc1995864fe9e9c3938a4767ff9804b7d9d65445976be5795a379654aa95050443796872044fa526e9f38abeab38e02e5243610f8d67cdab7c
7
- data.tar.gz: f56048c0cdefd8e318ca8f33f8143d6c0862346b9543d0c5f7704a2ea718b18736acce9361f6933cfb960988acb1b6c40504b8962b9c5a5ae466834c73784250
6
+ metadata.gz: 2b2ae0d32869a272fc5c7d8a3e52a62a54d50db38494d52d16a785aadda94714687969ead7f5874c61597c1f7baf44fe95c3cdf4ab313e00128383292db8c625
7
+ data.tar.gz: 59290e05932336abaefee7d004f29e35d4e5eababef8284d03e8f3508811b0e035c81bd3646f8badd2ca5c2204fa92b74c54c249ce3851171896ce85e1743911
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 — 2026-11-01
4
+
5
+ - `previews:settings APP [--on|--off] [--database empty|snapshot|shared]` — set up PR previews.
6
+ - `github:repos [OWNER/REPO]` — repos the Wokku GitHub App can see, or a repo's branches, to pick for `github:connect`.
7
+ - `vitals:rotate-token APP` — issue a new web-vitals ingest token.
8
+
3
9
  ## 0.9.0 — 2026-11-01
4
10
 
5
11
  - `transfers`, `transfers:accept ID`, `transfers:decline ID`, `transfers:cancel ID` — finish an app transfer without the dashboard.
@@ -23,3 +23,17 @@ register "github:disconnect", "Disconnect the GitHub repo from an app (usage: wo
23
23
  message = data.is_a?(Hash) ? data["message"] : nil
24
24
  Wokku::Output.status(message || "Disconnected.")
25
25
  end
26
+
27
+ register "github:repos", "List repos the Wokku GitHub App can see, or one repo's branches (usage: wokku github:repos [OWNER/REPO])" do
28
+ repo = ARGV.shift
29
+ if repo
30
+ data = api(:get, "/github/repos?repo=#{URI.encode_www_form_component(repo)}")
31
+ branches = data.is_a?(Hash) ? Array(data["branches"]) : []
32
+ branches.empty? ? Wokku::Output.status("no branches") : branches.each { |b| Wokku::Output.status b }
33
+ else
34
+ rows = api(:get, "/github/repos")
35
+ rows = [] unless rows.is_a?(Array)
36
+ next Wokku::Output.status("no repos — install the Wokku GitHub App on more repositories") if rows.empty?
37
+ rows.each { |r| Wokku::Output.status "#{r['full_name']} #{r['private'] ? 'private' : 'public'} #{r['default_branch']}" }
38
+ end
39
+ end
@@ -24,3 +24,19 @@ register "previews:destroy", "Queue cleanup of a PR preview (usage: wokku previe
24
24
  message = data.is_a?(Hash) ? data["message"] : nil
25
25
  Wokku::Output.status(message || "Preview destroy queued.")
26
26
  end
27
+
28
+ register "previews:settings", "Turn PR previews on/off and pick their database (usage: wokku previews:settings APP [--on|--off] [--database empty|snapshot|shared])" do
29
+ id = ARGV.shift || abort("Usage: wokku previews:settings APP [--on|--off] [--database empty|snapshot|shared]")
30
+ body = {}
31
+ while arg = ARGV.shift
32
+ case arg
33
+ when "--on" then body[:preview_enabled] = true
34
+ when "--off" then body[:preview_enabled] = false
35
+ when "--database" then body[:database_strategy] = ARGV.shift || abort("--database needs empty, snapshot or shared")
36
+ end
37
+ end
38
+ abort "Pass --on, --off and/or --database" if body.empty?
39
+ data = api(:patch, "/apps/#{id}/preview_settings", body)
40
+ data = {} unless data.is_a?(Hash)
41
+ Wokku::Output.status "previews: #{data['preview_enabled'] ? 'on' : 'off'}, database: #{data['database_strategy']}"
42
+ end
@@ -21,3 +21,10 @@ register "vitals", "Show p75 per Core Web Vital (usage: wokku vitals APP)" do
21
21
  end
22
22
  end
23
23
  end
24
+
25
+ register "vitals:rotate-token", "Issue a new web-vitals ingest token; the old one stops working (usage: wokku vitals:rotate-token APP)" do
26
+ id = ARGV.shift || abort("Usage: wokku vitals:rotate-token APP")
27
+ data = api(:post, "/apps/#{id}/vitals/rotate_token")
28
+ token = data.is_a?(Hash) ? data["vitals_ingest_token"] : nil
29
+ Wokku::Output.status(token ? "New token: #{token} (update the vitals snippet on your site)" : "Token rotated.")
30
+ end
data/lib/wokku/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Wokku
3
- VERSION = "0.9.0"
3
+ VERSION = "0.10.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wokku-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Dwicahyo