UNPKG

wgc

Version:

The official CLI tool to manage the GraphQL Federation Platform Cosmo

15 lines 566 B
import { Command } from 'commander'; import { checkAuth } from '../auth/utils.js'; import CreateContract from './commands/create.js'; import UpdateContract from './commands/update.js'; export default (opts) => { const command = new Command('contract'); command.description('Provides commands for creating and updating contracts'); command.addCommand(CreateContract(opts)); command.addCommand(UpdateContract(opts)); command.hook('preAction', async () => { await checkAuth(); }); return command; }; //# sourceMappingURL=index.js.map