feat: zag CLI with all commands, human/JSON/XML output and e2e smoke test (M5)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
35106d405b
commit
9d08e4d3fd
13 files changed
+2147
-68
No files matched your search
+3
-3
@@ -24,7 +24,7 @@ pub fn upperState(s: state_mod.State) []const u8 {
|
||||
}
|
||||
|
||||
pub fn writeInstant(w: *jsonpretty.Writer, t: ?Instant) !void {
|
||||
const v = t orelse return w.@"null"();
|
||||
const v = t orelse return w.null();
|
||||
var buf: [timestamp.max_len]u8 = undefined;
|
||||
try w.string(timestamp.format(&buf, v));
|
||||
}
|
||||
@@ -50,11 +50,11 @@ pub fn writeJob(w: *jsonpretty.Writer, job: Job) !void {
|
||||
if (job.exit_code) |c| switch (c) {
|
||||
.code => |n| try w.int(n),
|
||||
.symbol => |s| try w.string(s),
|
||||
} else try w.@"null"();
|
||||
} else try w.null();
|
||||
try w.key("error");
|
||||
try w.optString(job.err);
|
||||
try w.key("pid");
|
||||
if (job.pid) |p| try w.int(p) else try w.@"null"();
|
||||
if (job.pid) |p| try w.int(p) else try w.null();
|
||||
try w.key("heartbeat");
|
||||
try writeInstant(w, job.heartbeat);
|
||||
try w.field("retryCount", .int, job.retry_count);
|
||||
|
||||
Reference in new issue
Block a user