koigrid 0.23.0 → 0.25.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.
- package/CHANGELOG.md +12 -0
- package/dist/commands/apps.js +1 -1
- package/dist/commands/db.js +2 -2
- package/dist/commands/redis.js +2 -2
- package/dist/manifest.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to the koigrid CLI are documented here. Format: [Keep a Chan
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.25.0] — 2026-11-30
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- `koigrid apps domains --help` says which DNS record each domain needs: a subdomain (`www.example.com`) → CNAME to `<slug>.apps…`; a root domain (`example.com`) cannot hold a CNAME → ALIAS/ANAME to the same name (Cloudflare flattens a CNAME at the root), or CNAME `www` and redirect the root to it. `koigrid apps domains <id> add <root>` now also prints that note, which the API returns in English.
|
|
12
|
+
|
|
13
|
+
## [0.24.0] — 2026-11-30
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `koigrid db metrics <id>` and `koigrid redis metrics <id>` accept `--since <ISO> [--until <ISO>]` for any window of up to 168 h (like CloudWatch GetMetricData StartTime/EndTime), instead of only the last `--hours`. A week at `--bucket 5m` now fits (2016 points).
|
|
18
|
+
|
|
7
19
|
## [0.23.0] — 2026-11-30
|
|
8
20
|
|
|
9
21
|
### Added
|
package/dist/commands/apps.js
CHANGED
|
@@ -477,7 +477,7 @@ export async function apps(a) {
|
|
|
477
477
|
if (!d)
|
|
478
478
|
throw new Error('need <domain>');
|
|
479
479
|
const r = await api(`/apps/${encodeURIComponent(id)}/domains`, { method: 'POST', body: { domain: d } });
|
|
480
|
-
return console.log(json ? JSON.stringify(r, null, 2) : green(`✓ Added ${d} — create DNS: ${r.instructions}`) + (r.acme?.record ? `\n zero-downtime migration (optional): CNAME ${r.acme.record.name} → ${r.acme.record.value} (cert is issued before your DNS points here)` : ''));
|
|
480
|
+
return console.log(json ? JSON.stringify(r, null, 2) : green(`✓ Added ${d} — create DNS: ${r.instructions}`) + (r.record?.note ? `\n ${r.record.note}` : '') + (r.acme?.record ? `\n zero-downtime migration (optional): CNAME ${r.acme.record.name} → ${r.acme.record.value} (cert is issued before your DNS points here)` : ''));
|
|
481
481
|
}
|
|
482
482
|
if (act === 'rm') {
|
|
483
483
|
const d = a.positionals[2];
|
package/dist/commands/db.js
CHANGED
|
@@ -126,10 +126,10 @@ export async function db(a) {
|
|
|
126
126
|
return output(l, false, { rows: l.map((x) => ({ member: x.member, role: x.role + (x.papel === 'dr' ? ' (dr)' : ''), allocated: x.measured ? `${x.allocatedGb} GB` : 'not measured', used: x.measured ? `${x.usedGb} GB` : '', pct: x.measured ? `${x.usedPct}%` : '', ago: x.measured ? `${x.measuredAgoSec}s` : '' })), columns: ['member', 'role', 'allocated', 'used', 'pct', 'ago'] });
|
|
127
127
|
}
|
|
128
128
|
case 'metrics': {
|
|
129
|
-
// ?metric=a,b · ?bucket=5m&stat=max · ?hours (ficha c6f869c8, como CloudWatch GetMetricData)
|
|
129
|
+
// ?metric=a,b · ?bucket=5m&stat=max · ?hours o ?since=&until= (ficha c6f869c8, como CloudWatch GetMetricData)
|
|
130
130
|
need();
|
|
131
131
|
const q = new URLSearchParams();
|
|
132
|
-
for (const k of ['hours', 'metric', 'bucket', 'stat'])
|
|
132
|
+
for (const k of ['hours', 'metric', 'bucket', 'stat', 'since', 'until'])
|
|
133
133
|
if (a.flags[k] != null)
|
|
134
134
|
q.set(k, String(a.flags[k]));
|
|
135
135
|
return console.log(JSON.stringify(await api(`/databases/${encodeURIComponent(id)}/metrics${q.size ? `?${q}` : ''}`), null, 2));
|
package/dist/commands/redis.js
CHANGED
|
@@ -49,10 +49,10 @@ export async function redis(a) {
|
|
|
49
49
|
return process.exit(res.status ?? 0);
|
|
50
50
|
}
|
|
51
51
|
case 'metrics': {
|
|
52
|
-
// ?metric=a,b · ?bucket=5m&stat=max · ?hours (ficha c6f869c8, como CloudWatch GetMetricData)
|
|
52
|
+
// ?metric=a,b · ?bucket=5m&stat=max · ?hours o ?since=&until= (ficha c6f869c8, como CloudWatch GetMetricData)
|
|
53
53
|
need();
|
|
54
54
|
const q = new URLSearchParams();
|
|
55
|
-
for (const k of ['hours', 'metric', 'bucket', 'stat'])
|
|
55
|
+
for (const k of ['hours', 'metric', 'bucket', 'stat', 'since', 'until'])
|
|
56
56
|
if (a.flags[k] != null)
|
|
57
57
|
q.set(k, String(a.flags[k]));
|
|
58
58
|
return console.log(JSON.stringify(await api(`/redis/${encodeURIComponent(id)}/metrics${q.size ? `?${q}` : ''}`), null, 2));
|
package/dist/manifest.js
CHANGED
|
@@ -20,8 +20,11 @@ export const CLI_COMMANDS = [
|
|
|
20
20
|
--no-wait (or --detach) returns at once · --timeout <min> (default 20) · with --json it returns at once unless --wait
|
|
21
21
|
Other --project <id> · --json`,
|
|
22
22
|
domains: `koigrid apps domains <app-id> add <domain> | move <domain> | rm <domain> | ls | verify
|
|
23
|
-
Custom domain on your app: add it, create the DNS record it prints
|
|
24
|
-
|
|
23
|
+
Custom domain on your app: add it, create the DNS record it prints, and koigrid issues the TLS certificate.
|
|
24
|
+
Subdomain (www.example.com, app.example.com) → CNAME to <slug>.apps…
|
|
25
|
+
Root domain (example.com) → a root cannot hold a CNAME: ALIAS/ANAME (Cloudflare flattens a CNAME at the root) to the
|
|
26
|
+
same <slug>.apps… name; if your DNS has no ALIAS, CNAME www and redirect the root to www.
|
|
27
|
+
move <domain> takes it from another of your apps, keeping its certificate. verify re-checks the DNS.`,
|
|
25
28
|
},
|
|
26
29
|
subs: ['ls', 'deploy', 'logs', 'http', 'requests', 'rm', 'rename', 'health-path', 'port', 'release', 'build-settings', 'traffic-ramp', 'max-surge', 'min-ready', 'deploy-analysis', 'scale', 'resize', 'autoscale', 'scale-out', 'env', 'domains', 'volumes', 'cdn', 'cache', 'protection', 'retention', 'github', 'github-repos', 'hooks', 'rollback', 'pause', 'resume', 'restore', 'migrate', 'deployments', 'previews', 'preview', 'rules', 'rule', 'rule-rm', 'rule-toggle', 'registry', 'loadtest'],
|
|
27
30
|
endpoints: ['apps', 'apps/[id]', 'apps/[id]/deployments', 'apps/[id]/source-upload', 'apps/[id]/logs', 'apps/[id]/http', 'apps/[id]/requests', 'apps/[id]/scale', 'apps/[id]/resources', 'apps/[id]/autoscale', 'apps/[id]/scale-out', 'apps/[id]/env', 'apps/[id]/env/verify', 'apps/[id]/domains', 'apps/[id]/domains/verify', 'apps/[id]/volumes', 'apps/[id]/volumes/[volId]', 'apps/[id]/volumes/[volId]/backups', 'apps/[id]/volumes/[volId]/backups/[backupId]/restore', 'apps/[id]/cdn', 'apps/[id]/cache', 'apps/[id]/cache/purge', 'apps/[id]/protection', 'apps/[id]/protection/evaluate', 'apps/[id]/retention', 'apps/[id]/github', 'github/repos', 'apps/[id]/deploy-hooks', 'apps/[id]/deploy-hooks/[hookId]', 'apps/[id]/rollback', 'apps/[id]/pause', 'apps/[id]/resume', 'apps/[id]/restore', 'apps/[id]/migrate', 'apps/[id]/previews', 'apps/[id]/rules', 'apps/[id]/rules/[ruleId]', 'apps/[id]/registry', 'apps/[id]/loadtest'],
|