@zerct/zerct 0.1.7 → 0.1.9
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/README.md +4 -3
- package/bin/zerct.js +29 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,9 +20,10 @@ on `0.0.0.0:$PORT` and expose the configured health endpoint.
|
|
|
20
20
|
From a full-stack repo root, the same deploy command discovers nested
|
|
21
21
|
`zerct.toml` files and deploys the whole workspace in one command.
|
|
22
22
|
|
|
23
|
-
Agents can also inspect API capabilities, account identity, usage,
|
|
24
|
-
deploys, builds, app/deploy/build logs,
|
|
25
|
-
|
|
23
|
+
Agents can also inspect API capabilities, account identity, usage, account
|
|
24
|
+
activity, apps, complete app overviews, deploys, builds, app/deploy/build logs,
|
|
25
|
+
env metadata, custom domains, domain verification, and billing portal links
|
|
26
|
+
through the same CLI.
|
|
26
27
|
|
|
27
28
|
On first deploy, the CLI opens browser login, waits for GitHub or Google, stores
|
|
28
29
|
the Zerct session in the OS credential store when available, and continues the
|
package/bin/zerct.js
CHANGED
|
@@ -4,7 +4,7 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSy
|
|
|
4
4
|
import { homedir } from 'node:os'
|
|
5
5
|
import path from 'node:path'
|
|
6
6
|
|
|
7
|
-
const VERSION = '0.1.
|
|
7
|
+
const VERSION = '0.1.9'
|
|
8
8
|
const DEFAULT_API_URL = 'https://api.zerct.com'
|
|
9
9
|
const ARCHIVE_LIMIT_BYTES = 48 * 1024 * 1024
|
|
10
10
|
const SESSION_DIR = '.zerct'
|
|
@@ -68,7 +68,9 @@ Usage:
|
|
|
68
68
|
zerct capabilities [--api <url>] [--json]
|
|
69
69
|
zerct me [--api <url>] [--json]
|
|
70
70
|
zerct usage [--api <url>] [--json]
|
|
71
|
+
zerct activity [--limit <n>] [--cursor <cursor>] [--api <url>] [--json]
|
|
71
72
|
zerct apps [--api <url>] [--json]
|
|
73
|
+
zerct overview --app <app_id> [--limit <n>] [--cursor <cursor>] [--api <url>] [--json]
|
|
72
74
|
zerct deploys [--app <app_id>] [--limit <n>] [--cursor <cursor>] [--api <url>] [--json]
|
|
73
75
|
zerct builds [--app <app_id>] [--limit <n>] [--cursor <cursor>] [--api <url>] [--json]
|
|
74
76
|
zerct logs --app <app_id> [--deploy <deploy_id>] [--build <build_id>] [--limit <n>] [--cursor <cursor>] [--api <url>] [--json]
|
|
@@ -80,6 +82,7 @@ Usage:
|
|
|
80
82
|
zerct env delete --app <app_id> KEY [--api <url>] [--json]
|
|
81
83
|
zerct domains list --app <app_id> [--api <url>] [--json]
|
|
82
84
|
zerct domains add --app <app_id> <domain> [--api <url>] [--json]
|
|
85
|
+
zerct domains verify --app <app_id> <domain> [--api <url>] [--json]
|
|
83
86
|
zerct domains delete --app <app_id> <domain> [--api <url>] [--json]
|
|
84
87
|
zerct billing [portal] [--api <url>] [--json]
|
|
85
88
|
|
|
@@ -128,9 +131,15 @@ async function main() {
|
|
|
128
131
|
case 'usage':
|
|
129
132
|
await usage(cli)
|
|
130
133
|
break
|
|
134
|
+
case 'activity':
|
|
135
|
+
await activity(cli)
|
|
136
|
+
break
|
|
131
137
|
case 'apps':
|
|
132
138
|
await apps(cli)
|
|
133
139
|
break
|
|
140
|
+
case 'overview':
|
|
141
|
+
await overview(cli)
|
|
142
|
+
break
|
|
134
143
|
case 'deploys':
|
|
135
144
|
await deploys(cli)
|
|
136
145
|
break
|
|
@@ -570,6 +579,19 @@ async function usage(cli) {
|
|
|
570
579
|
printJsonOrPretty(cli, response)
|
|
571
580
|
}
|
|
572
581
|
|
|
582
|
+
async function activity(cli) {
|
|
583
|
+
const token = await readOrLoginToken(process.cwd(), cli)
|
|
584
|
+
const response = await apiRequest(cli, 'GET', `/v1/activity${pageQuery(cli)}`, token, null)
|
|
585
|
+
printJsonOrPretty(cli, response)
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
async function overview(cli) {
|
|
589
|
+
const token = await readOrLoginToken(process.cwd(), cli)
|
|
590
|
+
const app = requireApp(cli)
|
|
591
|
+
const response = await apiRequest(cli, 'GET', `/v1/apps/${encodeURIComponent(app)}/overview${pageQuery(cli)}`, token, null)
|
|
592
|
+
printJsonOrPretty(cli, response)
|
|
593
|
+
}
|
|
594
|
+
|
|
573
595
|
async function deploys(cli) {
|
|
574
596
|
const token = await readOrLoginToken(process.cwd(), cli)
|
|
575
597
|
const route = cli.app
|
|
@@ -660,13 +682,18 @@ async function domainsCommand(cli) {
|
|
|
660
682
|
printJsonOrPretty(cli, response)
|
|
661
683
|
return
|
|
662
684
|
}
|
|
685
|
+
if (action === 'verify') {
|
|
686
|
+
const response = await apiRequest(cli, 'POST', `/v1/apps/${encodeURIComponent(app)}/domains/${encodeURIComponent(domain)}/verify`, token, null)
|
|
687
|
+
printJsonOrPretty(cli, response)
|
|
688
|
+
return
|
|
689
|
+
}
|
|
663
690
|
if (action === 'delete') {
|
|
664
691
|
const response = await apiRequest(cli, 'DELETE', `/v1/apps/${encodeURIComponent(app)}/domains/${encodeURIComponent(domain)}`, token, null)
|
|
665
692
|
printJsonOrPretty(cli, response)
|
|
666
693
|
return
|
|
667
694
|
}
|
|
668
695
|
|
|
669
|
-
throw agentError('unknown_command', 'Unknown domains command.', 'Use `domains list`, `domains add`, or `domains delete`.', cli.json)
|
|
696
|
+
throw agentError('unknown_command', 'Unknown domains command.', 'Use `domains list`, `domains add`, `domains verify`, or `domains delete`.', cli.json)
|
|
670
697
|
}
|
|
671
698
|
|
|
672
699
|
async function billing(cli) {
|