This moves the loader code into `core/base-service`, leaving behind in `services/index.js` only the convenience imports. Ref #2832
14 lines
369 B
JavaScript
14 lines
369 B
JavaScript
'use strict'
|
|
|
|
const yaml = require('js-yaml')
|
|
|
|
const { collectDefinitions } = require('../core/base-service/loader')
|
|
|
|
const definitions = collectDefinitions()
|
|
|
|
// Omit undefined
|
|
// https://github.com/nodeca/js-yaml/issues/356#issuecomment-312430599
|
|
const cleaned = JSON.parse(JSON.stringify(definitions))
|
|
|
|
process.stdout.write(yaml.safeDump(cleaned, { flowLevel: 5 }))
|