@contentstack/cli-cm-bulk-publish
Advanced tools
Comparing version 1.3.15 to 1.4.0
{ | ||
"name": "@contentstack/cli-cm-bulk-publish", | ||
"description": "Contentstack CLI plugin for bulk publish actions", | ||
"version": "1.3.15", | ||
"version": "1.4.0", | ||
"author": "Contentstack", | ||
@@ -9,3 +9,3 @@ "bugs": "https://github.com/contentstack/cli/issues", | ||
"@contentstack/cli-command": "~1.2.16", | ||
"@contentstack/cli-utilities": "~1.5.7", | ||
"@contentstack/cli-utilities": "~1.5.10", | ||
"bluebird": "^3.7.2", | ||
@@ -103,2 +103,2 @@ "chalk": "^4.1.2", | ||
} | ||
} | ||
} |
@@ -6,2 +6,3 @@ /* eslint-disable no-console */ | ||
/* eslint-disable max-params */ | ||
const { configHandler } = require('@contentstack/cli-utilities'); | ||
const { getQueue } = require('../util/queue'); | ||
@@ -66,3 +67,3 @@ const defaults = require('../config/defaults.json'); | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -79,3 +80,3 @@ bulkPublishAssetSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -92,3 +93,3 @@ bulkPublishSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -105,3 +106,3 @@ bulkPublishAssetSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -164,3 +165,3 @@ bulkPublishSet = []; | ||
const Stack = new command.deliveryAPIClient.Stack({ | ||
const deliveryAPIOptions = { | ||
api_key: tokenDetails.apiKey, | ||
@@ -170,5 +171,13 @@ delivery_token: deliveryToken, | ||
branch: config.branch, | ||
}); | ||
Stack.setHost(config.cda) | ||
}; | ||
const earlyAccessHeaders = configHandler.get(`earlyAccessHeaders`); | ||
if (earlyAccessHeaders && Object.keys(earlyAccessHeaders).length > 0) { | ||
deliveryAPIOptions.early_access = Object.values(earlyAccessHeaders); | ||
} | ||
const Stack = new command.deliveryAPIClient.Stack(deliveryAPIOptions); | ||
Stack.setHost(config.cda); | ||
const syncData = {}; | ||
@@ -246,3 +255,3 @@ | ||
f_types, | ||
apiVersion | ||
apiVersion, | ||
}, | ||
@@ -249,0 +258,0 @@ stack, |
@@ -6,2 +6,3 @@ /* eslint-disable max-params */ | ||
/* eslint-disable camelcase */ | ||
const { configHandler } = require('@contentstack/cli-utilities'); | ||
const { getQueue } = require('../util/queue'); | ||
@@ -83,3 +84,3 @@ const defaults = require('../config/defaults.json'); | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -96,3 +97,3 @@ bulkUnPulishAssetSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -108,3 +109,3 @@ bulkUnPublishSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -121,3 +122,3 @@ bulkUnPulishAssetSet = []; | ||
stack: stack, | ||
apiVersion | ||
apiVersion, | ||
}); | ||
@@ -179,3 +180,3 @@ bulkUnPublishSet = []; | ||
const Stack = new command.deliveryAPIClient.Stack({ | ||
const deliveryAPIOptions = { | ||
api_key: tokenDetails.apiKey, | ||
@@ -185,5 +186,13 @@ delivery_token: deliveryToken, | ||
branch: config.branch, | ||
}); | ||
Stack.setHost(config.cda) | ||
}; | ||
const earlyAccessHeaders = configHandler.get(`earlyAccessHeaders`); | ||
if (earlyAccessHeaders && Object.keys(earlyAccessHeaders).length > 0) { | ||
deliveryAPIOptions.early_access = Object.values(earlyAccessHeaders); | ||
} | ||
const Stack = new command.deliveryAPIClient.Stack(deliveryAPIOptions); | ||
Stack.setHost(config.cda); | ||
const syncData = {}; | ||
@@ -213,3 +222,13 @@ | ||
setTimeout(async () => { | ||
await getSyncEntries(stack, config, locale, queryParams, bulkUnpublish, environment, deliveryToken, apiVersion, null); | ||
await getSyncEntries( | ||
stack, | ||
config, | ||
locale, | ||
queryParams, | ||
bulkUnpublish, | ||
environment, | ||
deliveryToken, | ||
apiVersion, | ||
null, | ||
); | ||
}, 3000); | ||
@@ -223,3 +242,14 @@ } catch (error) { | ||
async function start( | ||
{ retryFailed, bulkUnpublish, contentType, locale, environment, deliveryToken, onlyAssets, onlyEntries, f_types, apiVersion }, | ||
{ | ||
retryFailed, | ||
bulkUnpublish, | ||
contentType, | ||
locale, | ||
environment, | ||
deliveryToken, | ||
onlyAssets, | ||
onlyEntries, | ||
f_types, | ||
apiVersion, | ||
}, | ||
stack, | ||
@@ -226,0 +256,0 @@ config, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
301216
6102