@codefresh-io/cf-git-providers
Version:
An NPM module/CLI for interacting with various git providers
22 lines • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.builder = exports.usage = exports.desc = exports.command = void 0;
const helpers_1 = require("../../../helpers");
exports.command = 'get';
exports.desc = 'get a resouce from a git provider';
exports.usage = 'Usage: $0 get <resource> [options]';
const builder = (yargs) => yargs
.commandDir('../get', {
extensions: ['cmd.js', 'cmd.ts'],
})
.demandCommand(2, (0, helpers_1.errormsg) `must specify the resource type`)
.option('output', {
alias: 's',
describe: 'Where to save the command output to',
defaultDescription: 'prints stdout',
type: 'string'
})
.example(`$0 ${exports.command} file -o some-owner -r some-repo -p ./path/to/file`, 'Will fetch the file located at path/to/file from the root of repo: "some-owner/some-repo" (revision "master")')
.example(`$0 ${exports.command} branch -o some-owner -r some-repo -n some-branch`, 'Will return the details of the branch named "some-branch" of repo: "some-owner/some-repo"');
exports.builder = builder;
//# sourceMappingURL=get.cmd.js.map