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

Method readAndFormatDataFile

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

Source from the content-addressed store, hash-verified

1272 };
1273
1274 const readAndFormatDataFile = async (dataFile: UnpublishedEntryDiff) => {
1275 const data = await this.implementation.unpublishedEntryDataFile(
1276 collection.get('name'),
1277 entryData.slug,
1278 dataFile.path,
1279 dataFile.id,
1280 );
1281 const entryWithFormat = formatData(data, dataFile.path, dataFile.newFile);
1282 return entryWithFormat;
1283 };
1284
1285 // if the unpublished entry has no diffs, return the original
1286 if (dataFiles.length <= 0) {

Callers

nothing calls this directly

Calls 2

getMethod · 0.80

Tested by

no test coverage detected