@gmetrixr/rjson
Version:
(R)ecursive Json
29 lines (28 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const r_1 = require("../../../r");
/**
* Converts projectJson prop chat_scene to a RecordOrderedMap of chat RecordNodes
* @deprecated
* This is no longer needed as we don't have a chat property anymore
*/
class Migration {
execute(projectJson) {
const pJson = projectJson;
const projectF = r_1.r.record(pJson);
const chat_scenes = pJson.props["chat_scenes"];
if (chat_scenes !== undefined) {
delete pJson.props["chat_scenes"];
// for(const sceneId of chat_scenes) {
// //Need the id to be deterministic for test cases
// const chatRecord = R.createRecord(RT.chat, sceneId + 200001);
// chatRecord.props.chat_scene_id = sceneId;
// chatRecord.props.chat_show = true;
// projectF.addRecord(chatRecord);
// }
}
projectF.set(r_1.rtp.project.version, 114);
}
}
const migration = new Migration();
exports.default = migration;