@medable/mdctl-import-adapter

1.0.72 • Public • Published

mdctl-import-adapter

Developer Tools Import Adapter for Medable

This module will let you import Org configurations from an exported tree layout.

Usage

const ImportFileTreeAdapter = require('@medable/mdctl-import-adapter'),
      adapter = new ImportFileTreeAdapter('/documents/exported_folder'),
      iter = adapter.iterator[Symbol.asyncIterator]()
      
let item = await iter.next()
while(!item.done){      
  console.log(item.value)
  item = await iter.next()
}

// Get all blobs items

const { blobs } = adapter
if (blobs.length) {
  blobs.forEach((b) => {
    adapter.getAssetStream(b).on('data', (d) => {
      console.log(d)
    }).on('end', () => {
      console.log('end blob item')
    })
    blobs.pop()
  })
}

Readme

Keywords

none

Package Sidebar

Install

npm i @medable/mdctl-import-adapter

Weekly Downloads

1,302

Version

1.0.72

License

MIT

Unpacked Size

18.1 kB

Total Files

8

Last publish

Collaborators

  • harishva
  • myerkes-md
  • cscherer-md
  • __jacobi
  • jamessas
  • trsmith
  • grobledo
  • oferrero.medable