contentful-migration
Version:
Migration tooling for contentful
45 lines • 1.49 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_1 = require("../action/entry-transform");
const chalk_1 = __importDefault(require("chalk"));
class EntryTransformIntent extends base_intent_1.default {
isContentTransform() {
return true;
}
endsGroup() {
return true;
}
groupsWith() {
return false;
}
requiresAllTags() {
return true;
}
toActions() {
return [
new entry_transform_1.EntryTransformAction(this.getContentTypeId(), this.payload.transformation.from, this.payload.transformation.transformEntryForLocale, this.payload.transformation.shouldPublish, this.payload.transformation.useLocaleBasedPublishing)
];
}
toPlanMessage() {
return {
heading: (0, chalk_1.default) `Transform entries for {bold.yellow ${this.getContentTypeId()}}`,
details: [
`from: ${this.payload.transformation.from}`,
`to: ${this.payload.transformation.to}`
],
sections: []
};
}
shouldSave() {
return false;
}
shouldPublish() {
return false;
}
}
exports.default = EntryTransformIntent;
//# sourceMappingURL=entry-transform.js.map