fn(item$0) =>
match @definy.json-get-string(value: $0, key: "part") {
#none(_) =>
#error("each change needs part ('module.name')"),
#some(part$1) =>
let dot$2 = @std.string-index-of(text: $1, target: ".", startIndex: 0);
match @core.less-than(left: $2, right: 1) {
true =>
#error(@std.string-join(items: ["part must be in the form 'module.name': ", $1], separator: "")),
false =>
match @definy.mcp-read-visibility(text: @definy.json-get-string(value: $0, key: "visibility")) {
#error(message$5) =>
#error($5),
#ok(visibility$6) =>
#ok({
part: $1,
module_name: @core.string-slice(value: $1, start: 0, end: $2),
name: @core.string-slice(value: $1, start: @core.plus(left: $2, right: 1), end: @core.string-length(value: $1)),
delete: match @definy.json-get(value: $0, key: "delete") {
#some(value$3) =>
match $3 {
#boolean(flag$4) =>
$4,
_ =>
false
},
#none(_) =>
false
},
type_text: @definy.json-get-string(value: $0, key: "type"),
expression_text: @definy.json-get-string(value: $0, key: "expression"),
description: @definy.json-get-string(value: $0, key: "description"),
visibility: $6,
descriptions: @definy.mcp-read-descriptions(value: @definy.json-get(value: $0, key: "descriptions"))
})
}
}
}