@codefresh-io/cf-git-providers 0.13.3 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bin/commands/create/status.cmd.js +14 -12
- package/lib/bin/commands/create/status.cmd.js.map +1 -1
- package/lib/bin/commands/create/webhook.cmd.js +14 -12
- package/lib/bin/commands/create/webhook.cmd.js.map +1 -1
- package/lib/bin/commands/delete/webhook.cmd.js +10 -8
- package/lib/bin/commands/delete/webhook.cmd.js.map +1 -1
- package/lib/bin/commands/get/branch.cmd.js +10 -8
- package/lib/bin/commands/get/branch.cmd.js.map +1 -1
- package/lib/bin/commands/get/file.cmd.js +11 -9
- package/lib/bin/commands/get/file.cmd.js.map +1 -1
- package/lib/bin/commands/get/repo.cmd.js +10 -8
- package/lib/bin/commands/get/repo.cmd.js.map +1 -1
- package/lib/bin/commands/list/branches.cmd.js +16 -14
- package/lib/bin/commands/list/branches.cmd.js.map +1 -1
- package/lib/bin/commands/list/organizations.cmd.js +8 -6
- package/lib/bin/commands/list/organizations.cmd.js.map +1 -1
- package/lib/bin/commands/list/repos.cmd.js +15 -13
- package/lib/bin/commands/list/repos.cmd.js.map +1 -1
- package/lib/bin/commands/list/webhooks.cmd.js +10 -8
- package/lib/bin/commands/list/webhooks.cmd.js.map +1 -1
- package/lib/bin/commands/root/create.cmd.js +3 -2
- package/lib/bin/commands/root/create.cmd.js.map +1 -1
- package/lib/bin/commands/root/delete.cmd.js +3 -2
- package/lib/bin/commands/root/delete.cmd.js.map +1 -1
- package/lib/bin/commands/root/get.cmd.js +3 -2
- package/lib/bin/commands/root/get.cmd.js.map +1 -1
- package/lib/bin/commands/root/list.cmd.js +3 -2
- package/lib/bin/commands/root/list.cmd.js.map +1 -1
- package/lib/bin/index.js +10 -6
- package/lib/bin/index.js.map +1 -1
- package/lib/helpers/__test_helpers__/retry-test-helper.js +1 -1
- package/lib/helpers/__test_helpers__/retry-test-helper.js.map +1 -1
- package/lib/helpers/index.d.ts +1 -1
- package/lib/helpers/index.d.ts.map +1 -1
- package/lib/helpers/index.js +36 -21
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/request-retry.d.ts +2 -2
- package/lib/helpers/request-retry.d.ts.map +1 -1
- package/lib/helpers/request-retry.js +1 -1
- package/lib/helpers/request-retry.js.map +1 -1
- package/lib/index.js +8 -4
- package/lib/index.js.map +1 -1
- package/lib/providers/bitbucket-server.js +40 -40
- package/lib/providers/bitbucket-server.js.map +1 -1
- package/lib/providers/bitbucket.js +25 -25
- package/lib/providers/bitbucket.js.map +1 -1
- package/lib/providers/gerrit.d.ts +1 -1
- package/lib/providers/gerrit.d.ts.map +1 -1
- package/lib/providers/gerrit.js +38 -38
- package/lib/providers/gerrit.js.map +1 -1
- package/lib/providers/github.js +62 -65
- package/lib/providers/github.js.map +1 -1
- package/lib/providers/gitlab.js +21 -21
- package/lib/providers/gitlab.js.map +1 -1
- package/lib/providers/types.d.ts +9 -9
- package/lib/providers/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -3,57 +3,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
5
|
// tslint:disable-next-line: no-var-requires
|
|
6
|
-
const logger = helpers_1.createNewLogger('codefresh:create:status');
|
|
6
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:create:status');
|
|
7
7
|
const AllowedStatuses = ['pending', 'running', 'success', 'failure', 'error'];
|
|
8
8
|
exports.command = 'status';
|
|
9
9
|
exports.desc = 'Create a git commit status for a given SHA';
|
|
10
|
-
|
|
10
|
+
const builder = (yargs) => yargs
|
|
11
11
|
.usage('Usage: $0 create webhook [options]')
|
|
12
12
|
.option('owner', {
|
|
13
13
|
alias: 'o',
|
|
14
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
14
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
15
15
|
describe: 'The name of the owner of the git repository',
|
|
16
16
|
type: 'string',
|
|
17
17
|
})
|
|
18
18
|
.option('repo', {
|
|
19
19
|
alias: 'r',
|
|
20
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
20
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
21
21
|
describe: 'The name of the git repository',
|
|
22
22
|
type: 'string',
|
|
23
23
|
})
|
|
24
24
|
.option('sha', {
|
|
25
25
|
alias: 's',
|
|
26
|
-
demandOption: helpers_1.errormsg `must provide "sha" option`,
|
|
26
|
+
demandOption: (0, helpers_1.errormsg) `must provide "sha" option`,
|
|
27
27
|
describe: 'The SHA of the commit',
|
|
28
28
|
type: 'string',
|
|
29
29
|
})
|
|
30
30
|
.option('target-url', {
|
|
31
31
|
alias: 'u',
|
|
32
|
-
demandOption: helpers_1.errormsg `must provide "target-url" option`,
|
|
32
|
+
demandOption: (0, helpers_1.errormsg) `must provide "target-url" option`,
|
|
33
33
|
describe: 'The target URL to associate with this status',
|
|
34
34
|
type: 'string',
|
|
35
35
|
})
|
|
36
36
|
.option('state', {
|
|
37
|
-
demandOption: helpers_1.errormsg `must provide "state" option`,
|
|
37
|
+
demandOption: (0, helpers_1.errormsg) `must provide "state" option`,
|
|
38
38
|
describe: 'The state of the status',
|
|
39
39
|
choices: AllowedStatuses,
|
|
40
40
|
})
|
|
41
41
|
.option('description', {
|
|
42
42
|
alias: 'd',
|
|
43
|
-
demandOption: helpers_1.errormsg `must provide "description" option`,
|
|
43
|
+
demandOption: (0, helpers_1.errormsg) `must provide "description" option`,
|
|
44
44
|
describe: 'A short description of the status',
|
|
45
45
|
type: 'string',
|
|
46
46
|
})
|
|
47
47
|
.option('context', {
|
|
48
48
|
alias: 'c',
|
|
49
|
-
demandOption: helpers_1.errormsg `must provide "context" option`,
|
|
49
|
+
demandOption: (0, helpers_1.errormsg) `must provide "context" option`,
|
|
50
50
|
describe: 'The label to differentiate this status from the status of other systems',
|
|
51
51
|
type: 'string',
|
|
52
52
|
})
|
|
53
53
|
.example(`$0 create ${exports.command} -o some-owner -r some-repo -s 8a8f822 -u https://example.com --state running -d "build is running"` +
|
|
54
54
|
` -c "Codefresh Build"`, 'Creates a new statue for repository "some-owner/some-repo" commit with sha: 8a8f822 ' +
|
|
55
55
|
'associated with the url https://example.com, in a running state, with the description: "build is running"');
|
|
56
|
-
exports.
|
|
56
|
+
exports.builder = builder;
|
|
57
|
+
const handler = async (argv) => {
|
|
57
58
|
const owner = argv.owner;
|
|
58
59
|
const repo = argv.repo;
|
|
59
60
|
const sha = argv.sha;
|
|
@@ -69,7 +70,7 @@ exports.handler = async (argv) => {
|
|
|
69
70
|
logger.debug(`state=${state}`);
|
|
70
71
|
logger.debug(`description=${description}`);
|
|
71
72
|
logger.debug(`context=${context}`);
|
|
72
|
-
const [err] = await helpers_1.to(provider.createCommitStatus({
|
|
73
|
+
const [err] = await (0, helpers_1.to)(provider.createCommitStatus({
|
|
73
74
|
owner,
|
|
74
75
|
repo,
|
|
75
76
|
sha,
|
|
@@ -79,8 +80,9 @@ exports.handler = async (argv) => {
|
|
|
79
80
|
context,
|
|
80
81
|
}));
|
|
81
82
|
if (err) {
|
|
82
|
-
helpers_1.exitWithError(`failed to create commit status: ${err}`);
|
|
83
|
+
(0, helpers_1.exitWithError)(`failed to create commit status: ${err}`);
|
|
83
84
|
}
|
|
84
85
|
console.log(`created commit status for repo: ${owner}/${repo} sha: ${sha}`);
|
|
85
86
|
};
|
|
87
|
+
exports.handler = handler;
|
|
86
88
|
//# sourceMappingURL=status.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/create/status.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAA+E;AAG/E,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"status.cmd.js","sourceRoot":"","sources":["../../../../src/bin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;IAC1C,MAAM,CAAC,KAAK,CAAC,WAAW,OAAO,EAAE,CAAC,CAAA;IAElC,MAAM,CAAE,GAAG,CAAE,GAAG,MAAM,IAAA,YAAE,EAAC,QAAQ,CAAC,kBAAkB,CAAC;QACjD,KAAK;QACL,IAAI;QACJ,GAAG;QACH,SAAS;QACT,KAAK;QACL,WAAW;QACX,OAAO;KACV,CAAC,CAAC,CAAA;IACH,IAAI,GAAG,EAAE;QACL,IAAA,uBAAa,EAAC,mCAAmC,GAAG,EAAE,CAAC,CAAA;KAC1D;IACD,OAAO,CAAC,GAAG,CAAC,mCAAmC,KAAK,IAAI,IAAI,SAAS,GAAG,EAAE,CAAC,CAAA;AAC/E,CAAC,CAAA;AA/BY,QAAA,OAAO,WA+BnB"}
|
|
@@ -3,39 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.aliases = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
5
|
// tslint:disable-next-line: no-var-requires
|
|
6
|
-
const logger = helpers_1.createNewLogger('codefresh:create:webhook');
|
|
6
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:create:webhook');
|
|
7
7
|
exports.command = 'webhook';
|
|
8
8
|
exports.aliases = ['wh', 'hook'];
|
|
9
9
|
exports.desc = 'Create a git repository webhook';
|
|
10
|
-
|
|
10
|
+
const builder = (yargs) => yargs
|
|
11
11
|
.usage('Usage: $0 create webhook [options]')
|
|
12
12
|
.option('owner', {
|
|
13
13
|
alias: 'o',
|
|
14
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
14
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
15
15
|
describe: 'The name of the owner of the git repository',
|
|
16
16
|
type: 'string'
|
|
17
17
|
})
|
|
18
18
|
.option('repo', {
|
|
19
19
|
alias: 'r',
|
|
20
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
20
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
21
21
|
describe: 'The name of the git repository',
|
|
22
22
|
type: 'string'
|
|
23
23
|
})
|
|
24
24
|
.option('endpoint', {
|
|
25
25
|
alias: 'e',
|
|
26
|
-
demandOption: helpers_1.errormsg `must provide "endpoint" option`,
|
|
26
|
+
demandOption: (0, helpers_1.errormsg) `must provide "endpoint" option`,
|
|
27
27
|
describe: 'The endpoint to which webhook payloads will be delivered',
|
|
28
28
|
type: 'string'
|
|
29
29
|
})
|
|
30
30
|
.option('secret', {
|
|
31
31
|
alias: 't',
|
|
32
|
-
demandOption: helpers_1.errormsg `must provide "secret" option`,
|
|
32
|
+
demandOption: (0, helpers_1.errormsg) `must provide "secret" option`,
|
|
33
33
|
describe: 'The secret that will be used later to verify the webhook',
|
|
34
34
|
type: 'string'
|
|
35
35
|
})
|
|
36
36
|
.example(`$0 create ${exports.command} -o some-owner -r some-repo -e http://some-endpoint/webhooks -s secret`, 'Creates a new webhook for repo: "some-owner/some-repo" and payloads will be delivered to: ' +
|
|
37
37
|
'"http://some-endpoint/webhooks" with the secret: "secret"');
|
|
38
|
-
exports.
|
|
38
|
+
exports.builder = builder;
|
|
39
|
+
const handler = async (argv) => {
|
|
39
40
|
const owner = argv.owner;
|
|
40
41
|
const repo = argv.repo;
|
|
41
42
|
const endpoint = argv.endpoint;
|
|
@@ -46,12 +47,12 @@ exports.handler = async (argv) => {
|
|
|
46
47
|
logger.debug(`repo=${repo}`);
|
|
47
48
|
logger.debug(`endpoint=${endpoint}`);
|
|
48
49
|
logger.debug(`secret=${secret}`);
|
|
49
|
-
const [listWebhooksErr, webhooks] = await helpers_1.to(provider.listWebhooks({
|
|
50
|
+
const [listWebhooksErr, webhooks] = await (0, helpers_1.to)(provider.listWebhooks({
|
|
50
51
|
owner,
|
|
51
52
|
repo,
|
|
52
53
|
}));
|
|
53
54
|
if (listWebhooksErr) {
|
|
54
|
-
helpers_1.exitWithError(`failed to list webhooks for repository: "${owner}/${repo}", ${listWebhooksErr}`);
|
|
55
|
+
(0, helpers_1.exitWithError)(`failed to list webhooks for repository: "${owner}/${repo}", ${listWebhooksErr}`);
|
|
55
56
|
}
|
|
56
57
|
let webhook;
|
|
57
58
|
for (const wh of webhooks) {
|
|
@@ -62,22 +63,23 @@ exports.handler = async (argv) => {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
if (!webhook) {
|
|
65
|
-
const [err, res] = await helpers_1.to(provider.createRepositoryWebhook({
|
|
66
|
+
const [err, res] = await (0, helpers_1.to)(provider.createRepositoryWebhook({
|
|
66
67
|
owner,
|
|
67
68
|
repo,
|
|
68
69
|
endpoint,
|
|
69
70
|
secret,
|
|
70
71
|
}));
|
|
71
72
|
if (err) {
|
|
72
|
-
helpers_1.exitWithError(`failed to create webhook for repository: "${owner}/${repo}", ${err}`);
|
|
73
|
+
(0, helpers_1.exitWithError)(`failed to create webhook for repository: "${owner}/${repo}", ${err}`);
|
|
73
74
|
}
|
|
74
75
|
webhook = res;
|
|
75
76
|
}
|
|
76
77
|
if (output) {
|
|
77
|
-
await helpers_1.writeResultsToFile(output, JSON.stringify(webhook));
|
|
78
|
+
await (0, helpers_1.writeResultsToFile)(output, JSON.stringify(webhook));
|
|
78
79
|
}
|
|
79
80
|
else {
|
|
80
81
|
console.log(JSON.stringify(webhook));
|
|
81
82
|
}
|
|
82
83
|
};
|
|
84
|
+
exports.handler = handler;
|
|
83
85
|
//# sourceMappingURL=webhook.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/create/webhook.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"webhook.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/create/webhook.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;A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AG,EAAE,CAAC,CAAA;SACvF;QACD,OAAO,GAAG,GAAG,CAAA;KAChB;IAED,IAAI,MAAM,EAAE;QACR,MAAM,IAAA,4BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;KAC5D;SAAM;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;KACvC;AACL,CAAC,CAAA;AAhDY,QAAA,OAAO,WAgDnB"}
|
|
@@ -3,32 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.aliases = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
5
|
// tslint:disable-next-line: no-var-requires
|
|
6
|
-
const logger = helpers_1.createNewLogger('codefresh:delete:webhook');
|
|
6
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:delete:webhook');
|
|
7
7
|
exports.command = 'webhook';
|
|
8
8
|
exports.aliases = ['wh', 'hook'];
|
|
9
9
|
exports.desc = 'Delete a git repository webhook';
|
|
10
|
-
|
|
10
|
+
const builder = (yargs) => yargs
|
|
11
11
|
.usage('Usage: $0 delete webhook [options]')
|
|
12
12
|
.option('owner', {
|
|
13
13
|
alias: 'o',
|
|
14
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
14
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
15
15
|
describe: 'The name of the owner of the git repository',
|
|
16
16
|
type: 'string'
|
|
17
17
|
})
|
|
18
18
|
.option('repo', {
|
|
19
19
|
alias: 'r',
|
|
20
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
20
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
21
21
|
describe: 'The name of the git repository',
|
|
22
22
|
type: 'string'
|
|
23
23
|
})
|
|
24
24
|
.option('hook-id', {
|
|
25
25
|
alias: ['id'],
|
|
26
|
-
demandOption: helpers_1.errormsg `must provide "hook-id" option`,
|
|
26
|
+
demandOption: (0, helpers_1.errormsg) `must provide "hook-id" option`,
|
|
27
27
|
describe: 'The git webhook id (returned when creating the webhook)',
|
|
28
28
|
type: 'number'
|
|
29
29
|
})
|
|
30
30
|
.example(`$0 delete ${exports.command} -o some-owner -r some-repo --id someid`, 'Will delete a webhook for repo: "some-owner/some-repo with the id: "someid"');
|
|
31
|
-
exports.
|
|
31
|
+
exports.builder = builder;
|
|
32
|
+
const handler = async (argv) => {
|
|
32
33
|
const owner = argv.owner;
|
|
33
34
|
const repo = argv.repo;
|
|
34
35
|
const hookId = argv.hookId;
|
|
@@ -36,10 +37,11 @@ exports.handler = async (argv) => {
|
|
|
36
37
|
logger.debug(`owner=${owner}`);
|
|
37
38
|
logger.debug(`repo=${repo}`);
|
|
38
39
|
logger.debug(`id=${hookId}`);
|
|
39
|
-
const [err] = await helpers_1.to(provider.deleteRepositoryWebhook({ owner, repo, hookId }));
|
|
40
|
+
const [err] = await (0, helpers_1.to)(provider.deleteRepositoryWebhook({ owner, repo, hookId }));
|
|
40
41
|
if (err) {
|
|
41
|
-
helpers_1.exitWithError(`failed to delete webhook "${hookId}" for repository: "${owner}/${repo}", ${err}`);
|
|
42
|
+
(0, helpers_1.exitWithError)(`failed to delete webhook "${hookId}" for repository: "${owner}/${repo}", ${err}`);
|
|
42
43
|
}
|
|
43
44
|
console.log(`successfully delete webhook "${hookId}" from repository: "${owner}/${repo}"`);
|
|
44
45
|
};
|
|
46
|
+
exports.handler = handler;
|
|
45
47
|
//# sourceMappingURL=webhook.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/delete/webhook.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAA+E;AAG/E,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"webhook.cmd.js","sourceRoot":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1C,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,CAAA;IAC9B,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,MAAM,EAAE,CAAC,CAAA;IAE5B,MAAM,CAAE,GAAG,CAAE,GAAG,MAAM,IAAA,YAAE,EAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACnF,IAAI,GAAG,EAAE;QACL,IAAA,uBAAa,EAAC,6BAA6B,MAAM,sBAAsB,KAAK,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC,CAAA;KACnG;IACD,OAAO,CAAC,GAAG,CAAC,gCAAgC,MAAM,uBAAuB,KAAK,IAAI,IAAI,GAAG,CAAC,CAAA;AAC9F,CAAC,CAAA;AAfY,QAAA,OAAO,WAenB"}
|
|
@@ -3,21 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.aliases = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
5
|
// tslint:disable-next-line: no-var-requires
|
|
6
|
-
const logger = helpers_1.createNewLogger('codefresh:get:branch');
|
|
6
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:get:branch');
|
|
7
7
|
exports.command = 'branch';
|
|
8
8
|
exports.aliases = ['br'];
|
|
9
9
|
exports.desc = 'Get branch details from a git repository';
|
|
10
|
-
|
|
10
|
+
const builder = (yargs) => yargs
|
|
11
11
|
.usage('Usage: $0 get branch [options]')
|
|
12
12
|
.option('owner', {
|
|
13
13
|
alias: 'o',
|
|
14
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
14
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
15
15
|
describe: 'The name of the owner of the git repository',
|
|
16
16
|
type: 'string'
|
|
17
17
|
})
|
|
18
18
|
.option('repo', {
|
|
19
19
|
alias: 'r',
|
|
20
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
20
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
21
21
|
describe: 'The name of the git repository',
|
|
22
22
|
type: 'string'
|
|
23
23
|
})
|
|
@@ -28,7 +28,8 @@ exports.builder = (yargs) => yargs
|
|
|
28
28
|
default: 'master'
|
|
29
29
|
})
|
|
30
30
|
.example(`$0 get ${exports.command} -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"');
|
|
31
|
-
exports.
|
|
31
|
+
exports.builder = builder;
|
|
32
|
+
const handler = async (argv) => {
|
|
32
33
|
const owner = argv.owner;
|
|
33
34
|
const repo = argv.repo;
|
|
34
35
|
const branch = argv.branch;
|
|
@@ -38,15 +39,16 @@ exports.handler = async (argv) => {
|
|
|
38
39
|
logger.debug(`repo=${repo}`);
|
|
39
40
|
logger.debug(`branch=${branch}`);
|
|
40
41
|
logger.debug(`output=${output}`);
|
|
41
|
-
const [getBranchErr, branchRes] = await helpers_1.to(provider.getBranch({ owner, repo, branch }));
|
|
42
|
+
const [getBranchErr, branchRes] = await (0, helpers_1.to)(provider.getBranch({ owner, repo, branch }));
|
|
42
43
|
if (getBranchErr) {
|
|
43
|
-
helpers_1.exitWithError(`failed to get branch "${branch}", ${getBranchErr}`);
|
|
44
|
+
(0, helpers_1.exitWithError)(`failed to get branch "${branch}", ${getBranchErr}`);
|
|
44
45
|
}
|
|
45
46
|
if (output) {
|
|
46
|
-
await helpers_1.writeResultsToFile(output, branchRes);
|
|
47
|
+
await (0, helpers_1.writeResultsToFile)(output, branchRes);
|
|
47
48
|
}
|
|
48
49
|
else {
|
|
49
50
|
console.log(JSON.stringify(branchRes));
|
|
50
51
|
}
|
|
51
52
|
};
|
|
53
|
+
exports.handler = handler;
|
|
52
54
|
//# sourceMappingURL=branch.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/branch.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"branch.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/branch.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,sBAAsB,CAAC,CAAA;AAEzC,QAAA,OAAO,GAAG,QAAQ,CAAA;AAClB,QAAA,OAAO,GAAa,CAAE,IAAI,CAAE,CAAA;AAC5B,QAAA,IAAI,GAAG,0CAA0C,CAAA;AAEvD,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CAAC,KAAK;KACxC,KAAK,CAAC,gCAAgC,CAAC;KACvC,MAAM,CAAC,OAAO,EAAE;IACb,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,IAAA,kBAAQ,EAAA,6BAA6B;IACnD,QAAQ,EAAE,6CAA6C;IACvD,IAAI,EAAE,QAAQ;CACjB,CAAC;KACD,MAAM,CAAC,MAAM,EAAE;IACZ,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,IAAA,kBAAQ,EAAA,4BAA4B;IAClD,QAAQ,EAAE,gCAAgC;IAC1C,IAAI,EAAE,QAAQ;CACjB,CAAC;KACD,MAAM,CAAC,QAAQ,EAAE;IACd,KAAK,EAAE,CAAE,GAAG,CAAE;IACd,QAAQ,EAAE,wBAAwB;IAClC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;CACpB,CAAC;KACD,OAAO,CACJ,UAAU,eAAO,4CAA4C,EAC7D,2FAA2F,CAC9F,CAAA;AAvBQ,QAAA,OAAO,WAuBf;AAEE,MAAM,OAAO,GAAG,KAAK,EAAE,IAAe,EAAE,EAAE;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAA;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;IACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAoB,CAAA;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;IAEpC,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,CAAA;IAC9B,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAA;IAChC,MAAM,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAA;IAEhC,MAAM,CAAE,YAAY,EAAE,SAAS,CAAE,GAAG,MAAM,IAAA,YAAE,EAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IACzF,IAAI,YAAY,EAAE;QACd,IAAA,uBAAa,EAAC,yBAAyB,MAAM,MAAM,YAAY,EAAE,CAAC,CAAA;KACrE;IAED,IAAI,MAAM,EAAE;QACR,MAAM,IAAA,4BAAkB,EAAC,MAAM,EAAE,SAAS,CAAC,CAAA;KAC9C;SAAM;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAA;KACzC;AACL,CAAC,CAAA;AAtBY,QAAA,OAAO,WAsBnB"}
|
|
@@ -3,20 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
5
|
// tslint:disable-next-line: no-var-requires
|
|
6
|
-
const logger = helpers_1.createNewLogger('codefresh:get:file');
|
|
6
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:get:file');
|
|
7
7
|
exports.command = 'file';
|
|
8
8
|
exports.desc = 'Fetch a raw file from a git repository';
|
|
9
|
-
|
|
9
|
+
const builder = (yargs) => yargs
|
|
10
10
|
.usage('Usage: $0 get file [options]')
|
|
11
11
|
.option('owner', {
|
|
12
12
|
alias: 'o',
|
|
13
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
13
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
14
14
|
describe: 'The name of the owner of the git repository',
|
|
15
15
|
type: 'string'
|
|
16
16
|
})
|
|
17
17
|
.option('repo', {
|
|
18
18
|
alias: 'r',
|
|
19
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
19
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
20
20
|
describe: 'The name of the git repository',
|
|
21
21
|
type: 'string'
|
|
22
22
|
})
|
|
@@ -28,14 +28,15 @@ exports.builder = (yargs) => yargs
|
|
|
28
28
|
})
|
|
29
29
|
.option('path', {
|
|
30
30
|
alias: 'p',
|
|
31
|
-
demandOption: helpers_1.errormsg `must provide "path" option`,
|
|
31
|
+
demandOption: (0, helpers_1.errormsg) `must provide "path" option`,
|
|
32
32
|
describe: 'The path to the file that needs to be fetched',
|
|
33
33
|
type: 'string'
|
|
34
34
|
})
|
|
35
35
|
.example(`$0 get ${exports.command} -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")')
|
|
36
36
|
.example(`$0 get ${exports.command} -o some-owner -r some-repo -p ./path/to/file -v some-rev `, 'Will fetch the file located at path/to/file from the root of repo: "some-owner/some-repo" revision "some-rev"')
|
|
37
37
|
.example(`$0 get ${exports.command} -o some-owner -r some-repo -p ./path/to/file -s output.txt`, 'Will fetch the file located at path/to/file from the root of repo: "some-owner/some-repo" and save the contents to "output.txt"');
|
|
38
|
-
exports.
|
|
38
|
+
exports.builder = builder;
|
|
39
|
+
const handler = async (argv) => {
|
|
39
40
|
const owner = argv.owner;
|
|
40
41
|
const repo = argv.repo;
|
|
41
42
|
const path = argv.path;
|
|
@@ -47,15 +48,16 @@ exports.handler = async (argv) => {
|
|
|
47
48
|
logger.debug(`path=${path}`);
|
|
48
49
|
logger.debug(`revision=${revision}`);
|
|
49
50
|
logger.debug(`output=${output}`);
|
|
50
|
-
const [fetchFileErr, file] = await helpers_1.to(provider.fetchRawFile({ owner, repo, ref: revision, path }));
|
|
51
|
+
const [fetchFileErr, file] = await (0, helpers_1.to)(provider.fetchRawFile({ owner, repo, ref: revision, path }));
|
|
51
52
|
if (fetchFileErr) {
|
|
52
|
-
helpers_1.exitWithError(`failed to fetch file "${path}", ${fetchFileErr}`);
|
|
53
|
+
(0, helpers_1.exitWithError)(`failed to fetch file "${path}", ${fetchFileErr}`);
|
|
53
54
|
}
|
|
54
55
|
if (output) {
|
|
55
|
-
await helpers_1.writeResultsToFile(output, file);
|
|
56
|
+
await (0, helpers_1.writeResultsToFile)(output, file);
|
|
56
57
|
}
|
|
57
58
|
else {
|
|
58
59
|
console.log(file);
|
|
59
60
|
}
|
|
60
61
|
};
|
|
62
|
+
exports.handler = handler;
|
|
61
63
|
//# sourceMappingURL=file.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/file.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"file.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/file.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,oBAAoB,CAAC,CAAA;AAEvC,QAAA,OAAO,GAAG,MAAM,CAAA;AAChB,QAAA,IAAI,GAAG,wCAAwC,CAAA;AAErD,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CAA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,IAAI,CAAC,MAAgB,CAAA;IAEpC,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,CAAA;IAC9B,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAA;IACpC,MAAM,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAA;IAEhC,MAAM,CAAE,YAAY,EAAE,IAAI,CAAE,GAAG,MAAM,IAAA,YAAE,EAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACpG,IAAI,YAAY,EAAE;QACd,IAAA,uBAAa,EAAC,yBAAyB,IAAI,MAAM,YAAY,EAAE,CAAC,CAAA;KACnE;IAED,IAAI,MAAM,EAAE;QACR,MAAM,IAAA,4BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KACzC;SAAM;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;KACpB;AACL,CAAC,CAAA;AAxBY,QAAA,OAAO,WAwBnB"}
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handler = exports.builder = exports.desc = exports.aliases = exports.command = void 0;
|
|
4
4
|
const helpers_1 = require("../../../helpers");
|
|
5
|
-
const logger = helpers_1.createNewLogger('codefresh:get:repo');
|
|
5
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:get:repo');
|
|
6
6
|
exports.command = 'repository';
|
|
7
7
|
exports.aliases = ['repo'];
|
|
8
8
|
exports.desc = 'Get git repository details';
|
|
9
|
-
|
|
9
|
+
const builder = (yargs) => yargs
|
|
10
10
|
.usage('Usage: $0 get repository [options]')
|
|
11
11
|
.option('owner', {
|
|
12
12
|
alias: 'o',
|
|
13
|
-
demandOption: helpers_1.errormsg `must provide "owner" option`,
|
|
13
|
+
demandOption: (0, helpers_1.errormsg) `must provide "owner" option`,
|
|
14
14
|
describe: 'The name of the owner of the git repository',
|
|
15
15
|
type: 'string'
|
|
16
16
|
})
|
|
17
17
|
.option('repo', {
|
|
18
18
|
alias: 'r',
|
|
19
|
-
demandOption: helpers_1.errormsg `must provide "repo" option`,
|
|
19
|
+
demandOption: (0, helpers_1.errormsg) `must provide "repo" option`,
|
|
20
20
|
describe: 'The name of the git repository',
|
|
21
21
|
type: 'string'
|
|
22
22
|
})
|
|
23
23
|
.example(`$0 get ${exports.command} -o some-owner -r some-repo`, 'Will return the details of a repository named "some-repo" owned by: "some-owner"');
|
|
24
|
-
exports.
|
|
24
|
+
exports.builder = builder;
|
|
25
|
+
const handler = async (argv) => {
|
|
25
26
|
const owner = argv.owner;
|
|
26
27
|
const repo = argv.repo;
|
|
27
28
|
const provider = argv.provider;
|
|
@@ -29,15 +30,16 @@ exports.handler = async (argv) => {
|
|
|
29
30
|
logger.debug(`owner=${owner}`);
|
|
30
31
|
logger.debug(`repo=${repo}`);
|
|
31
32
|
logger.debug(`output=${output}`);
|
|
32
|
-
const [getRepoErr, repoRes] = await helpers_1.to(provider.getRepository({ owner, repo }));
|
|
33
|
+
const [getRepoErr, repoRes] = await (0, helpers_1.to)(provider.getRepository({ owner, repo }));
|
|
33
34
|
if (getRepoErr) {
|
|
34
|
-
helpers_1.exitWithError(`failed to get repository "${owner}/${repo}", ${getRepoErr}`);
|
|
35
|
+
(0, helpers_1.exitWithError)(`failed to get repository "${owner}/${repo}", ${getRepoErr}`);
|
|
35
36
|
}
|
|
36
37
|
if (output) {
|
|
37
|
-
await helpers_1.writeResultsToFile(output, repoRes);
|
|
38
|
+
await (0, helpers_1.writeResultsToFile)(output, repoRes);
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
40
41
|
console.log(JSON.stringify(repoRes));
|
|
41
42
|
}
|
|
42
43
|
};
|
|
44
|
+
exports.handler = handler;
|
|
43
45
|
//# sourceMappingURL=repo.cmd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/repo.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"repo.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/get/repo.cmd.ts"],"names":[],"mappings":";;;AAEA,8CAAmG;AAGnG,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,oBAAoB,CAAC,CAAA;AAEvC,QAAA,OAAO,GAAG,YAAY,CAAA;AACtB,QAAA,OAAO,GAAa,CAAE,MAAM,CAAE,CAAA;AAC9B,QAAA,IAAI,GAAG,4BAA4B,CAAA;AAEzC,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CAAC,KAAK;KACxC,KAAK,CAAC,oCAAoC,CAAC;KAC3C,MAAM,CAAC,OAAO,EAAE;IACb,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,IAAA,kBAAQ,EAAA,6BAA6B;IACnD,QAAQ,EAAE,6CAA6C;IACvD,IAAI,EAAE,QAAQ;CACjB,CAAC;KACD,MAAM,CAAC,MAAM,EAAE;IACZ,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,IAAA,kBAAQ,EAAA,4BAA4B;IAClD,QAAQ,EAAE,gCAAgC;IAC1C,IAAI,EAAE,QAAQ;CACjB,CAAC;KACD,OAAO,CACJ,UAAU,eAAO,6BAA6B,EAC9C,kFAAkF,CACrF,CAAA;AAjBQ,QAAA,OAAO,WAiBf;AAEE,MAAM,OAAO,GAAG,KAAK,EAAE,IAAe,EAAE,EAAE;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAe,CAAA;IAClC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAA;IAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAoB,CAAA;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAgB,CAAA;IAEpC,MAAM,CAAC,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,CAAA;IAC9B,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAA;IAC5B,MAAM,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,CAAC,CAAA;IAEhC,MAAM,CAAE,UAAU,EAAE,OAAO,CAAE,GAAG,MAAM,IAAA,YAAE,EAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACjF,IAAI,UAAU,EAAE;QACZ,IAAA,uBAAa,EAAC,6BAA6B,KAAK,IAAI,IAAI,MAAM,UAAU,EAAE,CAAC,CAAA;KAC9E;IAED,IAAI,MAAM,EAAE;QACR,MAAM,IAAA,4BAAkB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC5C;SAAM;QACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;KACvC;AACL,CAAC,CAAA;AApBY,QAAA,OAAO,WAoBnB"}
|
|
@@ -9,12 +9,12 @@ const fs_1 = require("fs");
|
|
|
9
9
|
const readline_1 = require("readline");
|
|
10
10
|
const helpers_1 = require("../../../helpers");
|
|
11
11
|
// tslint:disable-next-line: no-var-requires
|
|
12
|
-
const logger = helpers_1.createNewLogger('codefresh:list:branches');
|
|
12
|
+
const logger = (0, helpers_1.createNewLogger)('codefresh:list:branches');
|
|
13
13
|
const MAX_REPOS_FETCHED_CONCURRENTLY = 4;
|
|
14
14
|
exports.command = 'branches';
|
|
15
15
|
exports.aliases = ['br'];
|
|
16
16
|
exports.desc = 'Get a list of branches from a git repository';
|
|
17
|
-
|
|
17
|
+
const builder = (yargs) => yargs
|
|
18
18
|
.usage('Usage: $0 list branches [options]')
|
|
19
19
|
.option('owner', {
|
|
20
20
|
alias: 'o',
|
|
@@ -43,13 +43,13 @@ exports.builder = (yargs) => yargs
|
|
|
43
43
|
}])
|
|
44
44
|
.check((argv) => {
|
|
45
45
|
if (!(argv.owner && argv.repo) && !argv.repos) {
|
|
46
|
-
helpers_1.exitWithError(`must provide either "repo" and "owner" options, or "repos" option`);
|
|
46
|
+
(0, helpers_1.exitWithError)(`must provide either "repo" and "owner" options, or "repos" option`);
|
|
47
47
|
}
|
|
48
48
|
else if (argv.owner && !argv.repo) {
|
|
49
|
-
helpers_1.exitWithError(`must provide "repo" option when using "owner" option`);
|
|
49
|
+
(0, helpers_1.exitWithError)(`must provide "repo" option when using "owner" option`);
|
|
50
50
|
}
|
|
51
51
|
else if (!argv.owner && argv.repo) {
|
|
52
|
-
helpers_1.exitWithError(`must provide "owner" option when using "repo" option`);
|
|
52
|
+
(0, helpers_1.exitWithError)(`must provide "owner" option when using "repo" option`);
|
|
53
53
|
}
|
|
54
54
|
return true;
|
|
55
55
|
})
|
|
@@ -58,7 +58,8 @@ exports.builder = (yargs) => yargs
|
|
|
58
58
|
.example(`$0 list ${exports.command} --repos owner1/some-repo1,owner2/some-repo2`, 'Will list all the branches of repo owner1/some-repo1 and all the branches of repo owner2/some-repo2')
|
|
59
59
|
.example(`$0 list ${exports.command} --repos ./repos_file`, 'The file should contain a list or repository names, one repository per line')
|
|
60
60
|
.example(`$0 list ${exports.command} --repos=-`, 'Will read the list of repos, line by line, from stdin');
|
|
61
|
-
exports.
|
|
61
|
+
exports.builder = builder;
|
|
62
|
+
const handler = async (argv) => {
|
|
62
63
|
const owner = argv.owner;
|
|
63
64
|
const repo = argv.repo;
|
|
64
65
|
const repos = (argv.repos || []);
|
|
@@ -84,17 +85,18 @@ exports.handler = async (argv) => {
|
|
|
84
85
|
result = JSON.stringify(reposAndBranches);
|
|
85
86
|
}
|
|
86
87
|
if (output) {
|
|
87
|
-
await helpers_1.writeResultsToFile(output, result);
|
|
88
|
+
await (0, helpers_1.writeResultsToFile)(output, result);
|
|
88
89
|
}
|
|
89
90
|
else {
|
|
90
91
|
console.log(result);
|
|
91
92
|
}
|
|
92
93
|
};
|
|
94
|
+
exports.handler = handler;
|
|
93
95
|
const _getBranchesForMultipleRepos = async (provider, args) => {
|
|
94
96
|
const { repos, limit, page, full } = args;
|
|
95
|
-
const progress = helpers_1.createProgress('repositories branches', repos.length);
|
|
97
|
+
const progress = (0, helpers_1.createProgress)('repositories branches', repos.length);
|
|
96
98
|
// control how many repos we're fetching the branches of concurrently
|
|
97
|
-
const limiter = p_limit_1.default(MAX_REPOS_FETCHED_CONCURRENTLY);
|
|
99
|
+
const limiter = (0, p_limit_1.default)(MAX_REPOS_FETCHED_CONCURRENTLY);
|
|
98
100
|
return repos.reduce(async (acc, curRepo) => {
|
|
99
101
|
const { owner, repo } = curRepo;
|
|
100
102
|
const branches = await limiter(async () => _getBranchesForRepo(provider, { limit, page, owner, repo }));
|
|
@@ -107,9 +109,9 @@ const _getBranchesForMultipleRepos = async (provider, args) => {
|
|
|
107
109
|
};
|
|
108
110
|
const _getBranchesForRepo = async (provider, args) => {
|
|
109
111
|
const { owner, repo, limit, page } = args;
|
|
110
|
-
const [listBranchesErr, branches] = await helpers_1.to(provider.listBranches({ owner, repo, limit, page }));
|
|
112
|
+
const [listBranchesErr, branches] = await (0, helpers_1.to)(provider.listBranches({ owner, repo, limit, page }));
|
|
111
113
|
if (listBranchesErr) {
|
|
112
|
-
helpers_1.exitWithError(`failed to get the list of branches from ${owner}/${repo}, ${listBranchesErr}`);
|
|
114
|
+
(0, helpers_1.exitWithError)(`failed to get the list of branches from ${owner}/${repo}, ${listBranchesErr}`);
|
|
113
115
|
}
|
|
114
116
|
return branches;
|
|
115
117
|
};
|
|
@@ -117,8 +119,8 @@ const _coerceListOfRepos = async (reposArg) => {
|
|
|
117
119
|
if (reposArg === '-') { // need to read list from stdin
|
|
118
120
|
return _getListFromStream(process.stdin);
|
|
119
121
|
}
|
|
120
|
-
else if (fs_1.existsSync(reposArg)) {
|
|
121
|
-
return _getListFromStream(fs_1.createReadStream(reposArg));
|
|
122
|
+
else if ((0, fs_1.existsSync)(reposArg)) {
|
|
123
|
+
return _getListFromStream((0, fs_1.createReadStream)(reposArg));
|
|
122
124
|
}
|
|
123
125
|
return _getListFromString(reposArg);
|
|
124
126
|
};
|
|
@@ -130,7 +132,7 @@ const _getListFromString = (reposArg) => {
|
|
|
130
132
|
});
|
|
131
133
|
};
|
|
132
134
|
const _getListFromStream = async (stream) => {
|
|
133
|
-
const lineReader = readline_1.createInterface({
|
|
135
|
+
const lineReader = (0, readline_1.createInterface)({
|
|
134
136
|
input: stream,
|
|
135
137
|
crlfDelay: Number.POSITIVE_INFINITY,
|
|
136
138
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branches.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/list/branches.cmd.ts"],"names":[],"mappings":";;;;;;AACA,sDAA4B;AAE5B,2BAAiD;AACjD,uCAA0C;AAC1C,8CAAyG;AAGzG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,yBAAe,
|
|
1
|
+
{"version":3,"file":"branches.cmd.js","sourceRoot":"","sources":["../../../../src/bin/commands/list/branches.cmd.ts"],"names":[],"mappings":";;;;;;AACA,sDAA4B;AAE5B,2BAAiD;AACjD,uCAA0C;AAC1C,8CAAyG;AAGzG,4CAA4C;AAC5C,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,yBAAyB,CAAC,CAAA;AAEzD,MAAM,8BAA8B,GAAG,CAAC,CAAA;AAE3B,QAAA,OAAO,GAAG,UAAU,CAAA;AACpB,QAAA,OAAO,GAAa,CAAE,IAAI,CAAE,CAAA;AAC5B,QAAA,IAAI,GAAG,8CAA8C,CAAA;AAE3D,MAAM,OAAO,GAAG,CAAC,KAAW,EAAE,EAAE,CAAC,KAAK;KACxC,KAAK,CAAC,mCAAmC,CAAC;KAC1C,MAAM,CAAC,OAAO,EAAE;IACb,KAAK,EAAE,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