Releases: commercetools/sphere-node-cli
Releases · commercetools/sphere-node-cli
v0.7.0
<a name"v0.7.0">
v0.7.0 (2016-12-7)
Features
- CLI: allow to pass accessToken in the CLI flags
Chores
- Migrate code to commercetools set standard for coding
v0.6.0
<a name"v0.6.0">
v0.6.0 (2016-07-18)
Features
- import: allow to pass a custom plugin when running the
importcommand
Sometimes the default importers do not meet specific customer requirements and you end up writing your own importer from scratch.
In such cases, you can write a custom plugin to process and let the cli do the dirty work (streaming). When running the command, simply provide the path to your custom plugin script.
# using the `custom-stock.js` example in the plugins folder
$ sphere import --plugin $(pwd)/plugins/custom-stock.js -f stocks.jsonThe plugin must export a function which returns specific objects:
export default function myCustomPlugin (options) {
// `options` are the command options
return [
options,
// This is the parsing path used by the JSON stream, following the schema
// https://github.com/sphereio/sphere-node-cli#sphere-import
'stocks.*',
// The function to process the stream (see below)
processFn,
// The function called when the import is finished
finishFn
]
}
// `data` is an array of the parsed chunks
// `next` is the function that should be called to get the next array of chunks
function processFn (data, next) {
// return a Promise
return new Promise(function (/* resolve, reject */) {
setTimeout(function () {
console.log(data)
next()
}, 500)
})
}v0.5.6
<a name"v0.5.6">
v0.5.6 (2016-06-27)
Changes
- sphere-node-sdk: extend version range to include feature releases
- sphere-customer-import: upgrade version to fix setting default shipping and billing addresses
v0.5.5
<a name"v0.5.5">
v0.5.5 (2016-06-14)
Changes
- dependencies: upgrade product-import and SDK to support product state transition when syncing
v0.5.4
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.0
- new import command type
categoryhttps://github.com/sphereio/sphere-category-sync#json-format