diff --git a/lib/get-transformed-destination-response.js b/lib/get-transformed-destination-response.js index 48c211d..32f38bf 100644 --- a/lib/get-transformed-destination-response.js +++ b/lib/get-transformed-destination-response.js @@ -1,5 +1,5 @@ import log from 'npmlog' -import {map} from 'lodash/collection' +import { map } from 'lodash/collection' import getOutdatedDestinationContent from 'contentful-batch-libs/get/get-outdated-destination-content' /** @@ -7,12 +7,7 @@ import getOutdatedDestinationContent from 'contentful-batch-libs/get/get-outdate * to be updated. If it's the initial sync, and content exists, we abort * and tell the user why. */ -export default function getTransformedDestinationResponse ({ - managementClient, - spaceId, - sourceResponse, - skipContentModel -}) { +export default function getTransformedDestinationResponse ({managementClient, spaceId, sourceResponse, skipContentModel}) { return getOutdatedDestinationContent({ managementClient: managementClient, spaceId: spaceId, @@ -21,13 +16,13 @@ export default function getTransformedDestinationResponse ({ assetIds: map(sourceResponse.assets, 'sys.id') }) .then((destinationResponse) => { - if (skipContentModel) { - destinationResponse.contentTypes = [] - destinationResponse.locales = [] - } + if (skipContentModel) { + destinationResponse.contentTypes = [] + destinationResponse.locales = [] + } - if (sourceResponse.isInitialSync && (destinationResponse.contentTypes.length > 0 || destinationResponse.assets.length > 0)) { - log.error(` + if (sourceResponse.isInitialSync && (destinationResponse.contentTypes.length > 0 || destinationResponse.assets.length > 0)) { + log.error(` Your destination space already has some content. If you have a token file, please place it on the same directory which you are currently in. @@ -37,8 +32,8 @@ Otherwise, please run this tool on an empty space. If you'd like more information, please consult the README at: https://github.com/contentful/contentful-space-sync `) - process.exit(1) - } - return destinationResponse - }) + process.exit(1) + } + return destinationResponse + }) }