UNPKG

contentful-migration

Version:
18 lines 658 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FieldUpdateAction = void 0; const field_action_1 = require("../action/field-action"); class FieldUpdateAction extends field_action_1.FieldAction { constructor(contentTypeId, fieldId, props) { super(contentTypeId, fieldId); this.props = props; } async applyTo(ct) { const fields = ct.fields; const field = fields.getField(this.getFieldId()); Object.assign(field, this.props); fields.setField(this.getFieldId(), field); } } exports.FieldUpdateAction = FieldUpdateAction; //# sourceMappingURL=field-update.js.map