@gmetrixr/rjson
Version:
(R)ecursive Json
28 lines (27 loc) • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const r_1 = require("../../../r");
/**
* Item prop names and option prop names need to be unique.
* They cannot have any overlap with elements.
*/
class Migration {
execute(projectJson) {
const pJson = projectJson;
const projectF = r_1.r.record(pJson);
for (const item of projectF.getAllDeepChildren(r_1.RT.item)) {
r_1.r.record(item).changePropertyName("text", "item_text");
r_1.r.record(item).changePropertyName("source", "item_source");
r_1.r.record(item).changePropertyName("source_type", "item_source_type");
r_1.r.record(item).changePropertyName("description", "item_description");
r_1.r.record(item).changePropertyName("embed_string", "item_embed_string");
r_1.r.record(item).changePropertyName("start", "item_start");
r_1.r.record(item).changePropertyName("end", "item_end");
r_1.r.record(item).changePropertyName("url", "item_url");
r_1.r.record(item).changePropertyName("instruction", "item_instruction");
}
projectF.set(r_1.rtp.project.version, 105);
}
}
const migration = new Migration();
exports.default = migration;