-
Notifications
You must be signed in to change notification settings - Fork 49
/
cli.ts
45 lines (42 loc) · 1.81 KB
/
cli.ts
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
43
44
45
#!/usr/bin/env node
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* 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 {buildCiParser} from './ci/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 {Argv} from 'yargs';
runParserWithCompletedFunctions((yargs: Argv) => {
return yargs
.scriptName('ng-dev')
.middleware(captureLogOutputForCommand)
.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('ci <command>', false, buildCiParser)
.wrap(120)
.strict();
});