╭ changed ────╮ │src/serve.zig│ ╰─────────────╯ ╭───────────────────────────────────────────────────────────────────╮ │ 7 const serve_ssh_protocol = @import("./serve_ssh_protocol.zig");│ │ 8 const serve_ssh = @import("./serve_ssh.zig"); │ │ 9 const serve_http = @import("./serve_http.zig"); │ │10 +const evt = @import("./event.zig"); │ │11 │ │12 pub const Options = struct { │ │13 http_listen: ?[]const u8 = "127.0.0.1:8080", │ ╰───────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │72 │ │73 const admin_repo_path = try std.fs.path.resolve(allocator, &.{ data_dir_path, "admin" }); │ │74 defer allocator.free(admin_repo_path); │ │75 + │ │76 + // create the admin repo on first run │ │77 + { │ │78 + var admin_repo = rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = admin_repo_path }) catch |open_err| switch (open_err) {│ │79 + error.RepoNotFound, error.FileNotFound => try evt.initAdminRepo(io, allocator, admin_repo_path), │ │80 + else => |e| return e, │ │81 + }; │ │82 + defer admin_repo.deinit(io, allocator); │ │83 + } │ │84 │ │85 // create http listener │ │86 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯