contentful-migration
Version:
Migration tooling for contentful
49 lines • 1.63 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const base_intent_1 = __importDefault(require("./base-intent"));
const entry_transform_to_type_1 = require("../action/entry-transform-to-type");
const chalk_1 = __importDefault(require("chalk"));
class EntryTransformToTypeIntent extends base_intent_1.default {
getRelatedContentTypeIds() {
return [this.payload.entryTransformationToType.sourceContentType];
}
isEntryTransformToType() {
return true;
}
endsGroup() {
return true;
}
groupsWith() {
return false;
}
requiresAllTags() {
return true;
}
toActions() {
return [new entry_transform_to_type_1.EntryTransformToTypeAction(this.payload.entryTransformationToType)];
}
toPlanMessage() {
return {
heading: (0, chalk_1.default) `Migrate entries from {bold.yellow ${this.getContentTypeId()}}`,
details: [
`from: ${this.payload.entryTransformationToType.sourceContentType}`,
`to: ${this.payload.entryTransformationToType.targetContentType}`
],
sections: []
};
}
shouldSave() {
return false;
}
shouldPublish() {
return false;
}
requiresAllEntries() {
return this.payload.entryTransformationToType.updateReferences;
}
}
exports.default = EntryTransformToTypeIntent;
//# sourceMappingURL=entry-transform-to-type.js.map