contentful-migration
Version:
Migration tooling for contentful
47 lines • 1.48 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_derive_1 = require("../action/entry-derive");
const chalk_1 = __importDefault(require("chalk"));
class EntryDeriveIntent extends base_intent_1.default {
getRelatedContentTypeIds() {
return [this.getContentTypeId(), this.payload.derivation.derivedContentType];
}
isEntryDerive() {
return true;
}
endsGroup() {
return true;
}
groupsWith() {
return false;
}
requiresAllTags() {
return true;
}
toActions() {
return [new entry_derive_1.EntryDeriveAction(this.getContentTypeId(), this.payload.derivation)];
}
toPlanMessage() {
return {
heading: (0, chalk_1.default) `Derive entries from {bold.yellow ${this.getContentTypeId()}}`,
details: [
`from: ${this.payload.derivation.from}`,
`to: ${this.payload.derivation.derivedFields}`,
`via: ${this.payload.derivation.toReferenceField}`
],
sections: []
};
}
shouldSave() {
return false;
}
shouldPublish() {
return false;
}
}
exports.default = EntryDeriveIntent;
//# sourceMappingURL=entry-derive.js.map