UNPKG

@ethersphere/swarm-cli

Version:
35 lines (28 loc) 701 B
#!/usr/bin/env node import * as dns from 'dns' import { cli } from 'furious-commander' import { application } from './application' import { optionParameters, rootCommandClasses } from './config' import { printer } from './printer' import { errorHandler } from './utils/error' const setDefaultResultOrder = Reflect.get(dns, 'setDefaultResultOrder') if (setDefaultResultOrder) { setDefaultResultOrder('ipv4first') } cli({ rootCommandClasses, optionParameters, printer, application, errorHandler, }) process.stdout.on('error', error => { if (error.code !== 'EPIPE') { throw error } }) process.stderr.on('error', error => { if (error.code !== 'EPIPE') { throw error } })