-
Notifications
You must be signed in to change notification settings - Fork 2
/
cli.mjs
executable file
·42 lines (42 loc) · 6.28 KB
/
cli.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env node
/**
* @license
* Copyright Google LLC
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { runParserWithCompletedFunctions } from './utils/yargs.js';
import { buildCaretakerParser } from './caretaker/cli.js';
import { buildCommitMessageParser } from './commit-message/cli.js';
import { buildFormatParser } from './format/cli.js';
import { buildMiscParser } from './misc/cli.js';
import { buildNgbotParser } from './ngbot/cli.js';
import { buildPrParser } from './pr/cli.js';
import { buildPullapproveParser } from './pullapprove/cli.js';
import { buildReleaseParser } from './release/cli.js';
import { tsCircularDependenciesBuilder } from './ts-circular-dependencies/index.js';
import { captureLogOutputForCommand } from './utils/logging.js';
import { buildAuthParser } from './auth/cli.js';
import { buildPerfParser } from './perf/cli.js';
runParserWithCompletedFunctions((yargs) => {
return yargs
.scriptName('ng-dev')
.middleware(captureLogOutputForCommand, true)
.demandCommand()
.recommendCommands()
.command('auth <command>', false, buildAuthParser)
.command('commit-message <command>', '', buildCommitMessageParser)
.command('format <command>', '', buildFormatParser)
.command('pr <command>', '', buildPrParser)
.command('pullapprove <command>', '', buildPullapproveParser)
.command('release <command>', '', buildReleaseParser)
.command('ts-circular-deps <command>', '', tsCircularDependenciesBuilder)
.command('caretaker <command>', '', buildCaretakerParser)
.command('misc <command>', '', buildMiscParser)
.command('ngbot <command>', false, buildNgbotParser)
.command('perf <command>', '', buildPerfParser)
.wrap(120)
.strict();
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbmctZGV2L2NsaS50cyJdLCJuYW1lcyI6W10sI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