#!/usr/bin/env node
'use strict';

// foreign modules

const meow = require('meow');

// local modules

const error = require('../lib/error.js');
const logger = require('../lib/utils/logger.js');
const main = require('../index.js');

// this module

const cli = meow({
  help: main.help,
  version: true
}, {
  boolean: [
    'only',
    'prune',
    'remote'
  ],
  defaults: {
    only: false,
    prune: false,
    remote: false
  },
  type: [ 'type' ]
});

main(cli.input, cli.flags)
  .catch((err) => {
    error.handle404(err);
    error.handleOnlyNoMatches(err);
    error.handleScopeContentMismatch(err);
    error.handleScopeInvalid(err);
    error.handleScopeNotSet(err);

    logger.error(err);
    process.exit(1);
  });

@@ -308,91 +308,60 @@
 %7B%0A  
-boolean: %5B
+flags: %7B
 %0A    
-'
 only
-',%0A    'prune',%0A    'remote'%0A  %5D,%0A  defaults: %7B%0A    only
+: %7Btype: 'boolean', default
 : false
+%7D
 ,%0A  
@@ -368,22 +368,50 @@
   prune:
+ %7Btype: 'boolean', default:
  false
+%7D
 ,%0A    re
@@ -419,28 +419,54 @@
 ote:
+ %7Btype: 'boolean', default:
  false
-%0A  
 %7D,%0A
+  
   type: 
 %5B 't
@@ -465,18 +465,45 @@
 pe: 
-%5B 'type' %5D
+%7Btype: 'string', default: 'madl'%7D%0A  %7D
 %0A%7D);

Update meow options to be in line with v4.0.0