Skip to content

Releases: commercetools/sphere-node-cli

v0.7.0

07 Dec 16:52

Choose a tag to compare

<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

18 Jul 14:47
d33ace1

Choose a tag to compare

<a name"v0.6.0">

v0.6.0 (2016-07-18)

Features

  • import: allow to pass a custom plugin when running the import command

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.json

The 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

27 Jun 15:22

Choose a tag to compare

<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

14 Jun 08:58

Choose a tag to compare

<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

10 May 08:31

Choose a tag to compare

<a name"0.5.4">

0.5.4 (2016-05-10)

Bugfixes

  • customer-import: upgrade to version that fixes simultaneous creation of customers with a new customer group cd13a83

v0.5.3

09 May 15:14

Choose a tag to compare

<a name"0.5.3">

0.5.3 (2016-05-09)

Bugfixes

  • customer import: upgrade customer import to version where importing and creating customer groups on the fly is fixed 498e257

v0.5.2

04 May 09:36

Choose a tag to compare

<a name"0.5.2">

0.5.2 (2016-05-04)

Bugfixes

  • customer-import: use correct module name 908fc73

v0.5.1

04 May 09:13

Choose a tag to compare

<a name"0.5.1">

0.5.1 (2016-05-04)

Bugfixes

  • customer-import: upgrade to version that fixes loading of customer groups e029c7e

v0.5.0

25 Apr 16:21

Choose a tag to compare

<a name"0.5.0">

0.5.0 (2016-04-25)

Features

  • commands: add support for customer import 8c3748b
  • commands: add support for product-type import 0ac8fcb

v0.4.0

14 Sep 12:40

Choose a tag to compare