JSPM

  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q59311F
  • License Apache-2.0

Manage mulitple configuration versions at the same time

Package Exports

  • @platformatic/metaconfig
  • @platformatic/metaconfig/metaconfig.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@platformatic/metaconfig) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@platformatic/metaconfig

Utility module to migrate between one version of Platformatic to another.

Install

npm install @platformatic/metaconfig

Usage

import { analyze, write, upgrade } from '@platformatic/metaconfig'

const meta = await analyze({ file: 'path/to/platformatic.db.json' }))

console.log(meta.version)
console.log(meta.kind)
console.log(meta.config)
console.log(meta.path)

// Bring it to the latest version
const metaNext = upgrade(meta)

console.log(metaNext.version)
console.log(metaNext.kind)
console.log(metaNext.config)
console.log(metaNext.path)

// this will override the old config
await write(metaNext)

License

Apache 2.0