MCPcopy Create free account
hub / github.com/decaporg/decap-cms / readAndFormatDataFile

Method readAndFormatDataFile

packages/decap-cms-core/src/backend.ts:1225–1234  ·  view source on GitHub ↗
(dataFile: UnpublishedEntryDiff)

Source from the content-addressed store, hash-verified

1223 };
1224
1225 const readAndFormatDataFile = async (dataFile: UnpublishedEntryDiff) => {
1226 const data = await this.implementation.unpublishedEntryDataFile(
1227 collection.get('name'),
1228 entryData.slug,
1229 dataFile.path,
1230 dataFile.id,
1231 );
1232 const entryWithFormat = formatData(data, dataFile.path, dataFile.newFile);
1233 return entryWithFormat;
1234 };
1235
1236 // if the unpublished entry has no diffs, return the original
1237 if (dataFiles.length <= 0) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.80

Tested by

no test coverage detected