wokku-cli 0.9.0 → 0.11.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -0
- data/lib/wokku/commands/bucket.rb +56 -0
- data/lib/wokku/commands/github.rb +14 -0
- data/lib/wokku/commands/previews.rb +16 -0
- data/lib/wokku/commands/vitals.rb +7 -0
- data/lib/wokku/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48fc9e0bee672d55ceff412f082299e1758af711f412445ae5afa06d51737578
|
|
4
|
+
data.tar.gz: 9f76fd4142865f2e2ff3a6cbd2ba54c1e6b1c934d43419756729b15dc54dc322
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5dcab4511394cd6650e33394aa078013470ee12bf22322eda3a46778f65fd7c6d3b4c5e20bb8d34a52b50b8afab81ffa0e8fc817e9a555128207cdd885086b6
|
|
7
|
+
data.tar.gz: 948b3df0aa6441118186ba27bd4daaf3c0bb004035e486fe3aa12946f1b436f7a1ae73277b1ac37465f8e60d82fee43bcab3725b5fc882cfbb4e95ae1d8c6b05
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0 — 2026-11-22
|
|
4
|
+
|
|
5
|
+
- `bucket APP [--reveal]` — show an app's object storage bucket (endpoint, usage, keys; the secret only with `--reveal`).
|
|
6
|
+
- `bucket:create APP` — enable object storage; the app gets `S3_*` env vars and restarts when ready.
|
|
7
|
+
- `bucket:resize APP GB`, `bucket:rotate APP`, `bucket:destroy APP` — change the quota, rotate keys, delete the bucket and its files.
|
|
8
|
+
|
|
9
|
+
## 0.10.0 — 2026-11-01
|
|
10
|
+
|
|
11
|
+
- `previews:settings APP [--on|--off] [--database empty|snapshot|shared]` — set up PR previews.
|
|
12
|
+
- `github:repos [OWNER/REPO]` — repos the Wokku GitHub App can see, or a repo's branches, to pick for `github:connect`.
|
|
13
|
+
- `vitals:rotate-token APP` — issue a new web-vitals ingest token.
|
|
14
|
+
|
|
3
15
|
## 0.9.0 — 2026-11-01
|
|
4
16
|
|
|
5
17
|
- `transfers`, `transfers:accept ID`, `transfers:decline ID`, `transfers:cancel ID` — finish an app transfer without the dashboard.
|
data/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Run `wokku --help` for the full list. ~30 first-class commands today, grouped:
|
|
|
35
35
|
- **Config:** `config`, `config:set`, `config:get`, `config:unset`, `config:export`
|
|
36
36
|
- **Domains + SSL:** `domains`, `domains:add/remove/clear`, `certs:enable`, `certs:disable`
|
|
37
37
|
- **Databases:** `databases`, `databases:create/destroy/link/unlink/info`, `backups`, `backups:create/restore`
|
|
38
|
+
- **Object storage:** `bucket`, `bucket:create/resize/rotate/destroy`
|
|
38
39
|
- **SSH keys:** `ssh-keys`, `ssh-keys:add/remove`
|
|
39
40
|
- **Servers:** `servers`, `servers:info`, `servers:default` (multi-Dokku-host installs)
|
|
40
41
|
- **Teams:** `teams`, `teams:members`, `teams:invite`, `teams:remove`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# --- Object storage (one S3-compatible bucket per app) ---
|
|
4
|
+
# Named "bucket" so it can't be confused with the old volume `storage` API.
|
|
5
|
+
# The S3_* / AWS_* env vars are set on the app automatically.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# The API returns the secret to team members; keep it off the terminal
|
|
9
|
+
# (and out of --json) unless asked for with --reveal.
|
|
10
|
+
def print_bucket(data, reveal: false)
|
|
11
|
+
data = data.reject { |k, _| k == "secret_access_key" } unless reveal
|
|
12
|
+
Wokku::Output.render(data) do |b|
|
|
13
|
+
puts "Bucket: #{b['bucket']}"
|
|
14
|
+
puts "Status: #{b['status']}"
|
|
15
|
+
puts "Used: #{b['used_gb']} / #{b['quota_gb']} GB"
|
|
16
|
+
puts "Endpoint: #{b['endpoint']}"
|
|
17
|
+
puts "Region: #{b['region']}"
|
|
18
|
+
puts "Access: #{b['access_key_id']}"
|
|
19
|
+
puts "Secret: #{reveal ? b['secret_access_key'] : '(hidden; add --reveal)'}"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
register "bucket", "Show an app's object storage bucket (usage: wokku bucket APP [--reveal])" do
|
|
24
|
+
app = ARGV.shift || abort("Usage: wokku bucket APP [--reveal]")
|
|
25
|
+
print_bucket(api(:get, "/apps/#{app}/object_storage"), reveal: ARGV.delete("--reveal"))
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
register "bucket:create", "Enable object storage for an app (usage: wokku bucket:create APP)" do
|
|
29
|
+
app = ARGV.shift || abort("Usage: wokku bucket:create APP")
|
|
30
|
+
data = api(:post, "/apps/#{app}/object_storage")
|
|
31
|
+
Wokku::Output.render(data.reject { |k, _| k == "secret_access_key" }) do |b|
|
|
32
|
+
puts "Bucket #{b['bucket']} is provisioning. The app gets S3_* env vars and restarts when it's ready."
|
|
33
|
+
puts "Check: wokku bucket #{app}"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
register "bucket:resize", "Change the bucket quota in GB (usage: wokku bucket:resize APP GB)" do
|
|
38
|
+
app = ARGV.shift || abort("Usage: wokku bucket:resize APP GB")
|
|
39
|
+
gb = Integer(ARGV.shift.to_s, exception: false) || abort("Usage: wokku bucket:resize APP GB (a whole number, 1-1024)")
|
|
40
|
+
data = api(:patch, "/apps/#{app}/object_storage", { quota_gb: gb })
|
|
41
|
+
Wokku::Output.status "Quota for #{app}: #{data['quota_gb']} GB"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
register "bucket:rotate", "Rotate the bucket's access keys; the app restarts onto them (usage: wokku bucket:rotate APP)" do
|
|
45
|
+
app = ARGV.shift || abort("Usage: wokku bucket:rotate APP")
|
|
46
|
+
api(:post, "/apps/#{app}/object_storage/rotate")
|
|
47
|
+
Wokku::Output.status "Rotating keys for #{app}. The old key stops working now; the app restarts with the new one."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
register "bucket:destroy", "Delete the bucket and all its files (usage: wokku bucket:destroy APP)" do
|
|
51
|
+
app = ARGV.shift || abort("Usage: wokku bucket:destroy APP")
|
|
52
|
+
print "Delete #{app}'s bucket and ALL its files? This cannot be undone. (y/N): "
|
|
53
|
+
abort "Cancelled." unless $stdin.gets.to_s.strip.downcase == "y"
|
|
54
|
+
api(:delete, "/apps/#{app}/object_storage")
|
|
55
|
+
Wokku::Output.status "Deleting #{app}'s bucket."
|
|
56
|
+
end
|
|
@@ -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
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.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johannes Dwicahyo
|
|
@@ -47,6 +47,7 @@ files:
|
|
|
47
47
|
- lib/wokku/commands/auth.rb
|
|
48
48
|
- lib/wokku/commands/backups.rb
|
|
49
49
|
- lib/wokku/commands/billing.rb
|
|
50
|
+
- lib/wokku/commands/bucket.rb
|
|
50
51
|
- lib/wokku/commands/cdn.rb
|
|
51
52
|
- lib/wokku/commands/certs.rb
|
|
52
53
|
- lib/wokku/commands/checks.rb
|