#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var commander = require("commander");
var diff_1 = require("./cli/commands/diff");
var validate_1 = require("./cli/commands/validate");
var similar_1 = require("./cli/commands/similar");
var serve_1 = require("./cli/commands/serve");
var coverage_1 = require("./cli/commands/coverage");
commander
    .command('diff <old> <new>')
    .description('Diff two GraphQL schemas')
    .action(diff_1.diff);
commander
    .command('validate <documents> <schema>')
    .description('Validate documents against a schema')
    .action(validate_1.validate);
commander
    .command('similar <schema>')
    .option('-n, --type <s>', 'Name of a type')
    .option('-t, --threshold <n>', 'Threshold of similarity ratio', parseFloat)
    .description('Find similar types in a schema')
    .action(function (schema, cmd) {
    similar_1.similar(schema, cmd.type, cmd.threshold);
});
commander
    .command('serve <schema>')
    .description('Serves a GraphQL API with GraphQL Playground')
    .action(serve_1.serve);
commander
    .command('coverage <documents> <schema>')
    .option('-s, --silent', 'Do not render any stats in the terminal')
    .option('-w, --write <s>', 'Write a file with coverage stats')
    .description('Schema coverage based on documents')
    .action(coverage_1.coverage);
commander.parse(process.argv);
//# sourceMappingURL=cli.js.map