fn(signed_event_bytes$0) =>
match @std.base64-to-bytes(text: $0) {
#none(_) =>
#none,
#some(bytes$1) =>
match @definy.decode-signed-event(bytes: $1) {
#decoded(decoded$2) =>
match $2.content {
#project_commit(commit$3) =>
#some({
account_id: @core.bytes-to-base64url(bytes: $2.account_id_bytes),
project_name: $3.project_name,
branch: $3.branch,
time_ms: $2.time_ms,
message: $3.message,
parent_commit_hash: $3.parent_commit_hash,
merged_commit_hash: $3.merged_commit_hash,
modules: @core.list-map(
T: @core.project-snapshot-module,
U: @definy.stored-snapshot-module,
f: fn(item$4) =>
@definy.stored-snapshot-module-of(module: $4),
xs: $3.modules
)
}),
_ =>
#none
},
#invalid(_) =>
#none
}
}