╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────╮ │src/test/net.zig│ ╰────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │782 { │ │783 var admin = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = admin_path }); │ │784 defer admin.deinit(io, allocator); │ │785 - try evt.remove(.admin, .xit, evt.admin_repo_opts, io, allocator, &admin, &repo_id, .repo, .{ .name = "admin", .email = "admin@example.test" }); │ │785 + try evt.remove(.server, .admin, .xit, evt.admin_repo_opts, io, allocator, &admin, &repo_id, .repo, .{ .name = "admin", .email = "admin@example.test" });│ │786 } │ │787 const clone_path = try std.fs.path.join(allocator, &.{ temp_path, "fork-clone" }); │ │788 defer allocator.free(clone_path); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │801 { │ │802 var admin = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = admin_path }); │ │803 defer admin.deinit(io, allocator); │ │804 - try evt.consume(.admin, .xit, evt.admin_repo_opts, io, allocator, &admin, evt.events_ref, &.{ │ │804 + try evt.consume(.server, .admin, .xit, evt.admin_repo_opts, io, allocator, &admin, evt.events_ref, &.{│ │805 .{ │ │806 .id = std.fmt.bytesToHex(repo_id, .lower), │ │807 .timestamp = 2, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │978 }; │ │979 │ │980 // commit the issue on the client and push it to the server │ │981 - try evt.consume(.repo, repo_kind, .{ .hash = hash_kind, .is_test = true }, io, allocator, &client_repo, evt.events_ref, &events_to_push); │ │981 + try evt.consume(.local, .repo, repo_kind, .{ .hash = hash_kind, .is_test = true }, io, allocator, &client_repo, evt.events_ref, &events_to_push);│ │982 try client_repo.push( │ │983 io, │ │984 allocator, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1022 }; │ │1023 │ │1024 // commit the edit on the client and push it to the server │ │1025 - try evt.consume(.repo, repo_kind, .{ .hash = hash_kind, .is_test = true }, io, allocator, &client_repo, evt.events_ref, &events_to_push2); │ │1025 + try evt.consume(.local, .repo, repo_kind, .{ .hash = hash_kind, .is_test = true }, io, allocator, &client_repo, evt.events_ref, &events_to_push2);│ │1026 try client_repo.push( │ │1027 io, │ │1028 allocator, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1621 var password_hash_buf: [evt.User.password_hash_max_len]u8 = undefined; │ │1622 const password_hash = try evt.User.hashPassword("password", &password_hash_buf, io); │ │1623 │ │1624 - try evt.consume(.admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &[_]evt.EventWithId{.{ │ │1624 + try evt.consume(.server, .admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &[_]evt.EventWithId{.{│ │1625 .id = std.fmt.bytesToHex(user_id, .lower), │ │1626 .author = .{ .name = "admin", .email = "admin@example.test" }, │ │1627 .event = .{ .user = .{ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/test/ui.zig│ ╰───────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │173 try local.addRemote(io, allocator, .{ .name = "origin", .value = remote_path }); │ │174 │ │175 const id = [_]u8{1} ** evt.event_id_size; │ │176 - try evt.consume(.repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{.{ │ │176 + try evt.consume(.local, .repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{.{│ │177 .id = std.fmt.bytesToHex(id, .lower), │ │178 .author = .{ .name = "haxy", .email = "user@haxy" }, │ │179 .event = .{ .issue = .{ .title = "sync", .description = "", .tags = "" } }, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │185 var local = try Repo.open(io, allocator, .{ .path = local_path }); │ │186 defer local.deinit(io, allocator); │ │187 const id = [_]u8{2} ** evt.event_id_size; │ │188 - try evt.consume(.repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{.{ │ │188 + try evt.consume(.local, .repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{.{│ │189 .id = std.fmt.bytesToHex(id, .lower), │ │190 .author = .{ .name = "haxy", .email = "user@haxy" }, │ │191 .event = .{ .issue = .{ .title = "local", .description = "", .tags = "" } }, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │195 var remote = try RemoteRepo.open(io, allocator, .{ .path = remote_path }); │ │196 defer remote.deinit(io, allocator); │ │197 const id = [_]u8{3} ** evt.event_id_size; │ │198 - try evt.consume(.repo, .git, .{}, io, allocator, &remote, evt.events_ref, &.{.{ │ │198 + try evt.consume(.local, .repo, .git, .{}, io, allocator, &remote, evt.events_ref, &.{.{│ │199 .id = std.fmt.bytesToHex(id, .lower), │ │200 .author = .{ .name = "haxy", .email = "user@haxy" }, │ │201 .event = .{ .issue = .{ .title = "remote", .description = "", .tags = "" } }, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │206 var local = try Repo.open(io, allocator, .{ .path = local_path }); │ │207 defer local.deinit(io, allocator); │ │208 try local.removeBranch(io, .{ .name = evt.events_ref.name }); │ │209 - try evt.consume(.repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{}); │ │209 + try evt.consume(.local, .repo, .git, .{}, io, allocator, &local, evt.events_ref, &.{}); │ │210 } │ │211 try std.testing.expectEqual(null, try Events.sync(io, allocator, .{ .path = local_path, .repo_kind = .git }));│ │212 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──╮ │src/try.zig│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │243 } │ │244 │ │245 // commit the seed events and consume them into the database │ │246 - try evt.consume(.admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &events_to_consume); │ │246 + try evt.consume(.server, .admin, .xit, evt.admin_repo_opts, io, allocator, &repo, evt.events_ref, &events_to_consume);│ │247 │ │248 // every repo gets the same generated history, so build it once into a │ │249 // template repo and copy that to each repo's location below rather than │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯