forked from NativeScript/nativescript-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoctor.ts
62 lines (51 loc) · 1.65 KB
/
doctor.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { injector } from "../yok";
import { ICommand, ICommandParameter } from "../definitions/commands";
import { IDoctorService, IProjectHelper } from "../declarations";
import { PlatformTypes } from "../../constants";
export class DoctorCommand implements ICommand {
constructor(
private $doctorService: IDoctorService,
private $projectHelper: IProjectHelper
) {}
public allowedParameters: ICommandParameter[] = [];
public execute(args: string[]): Promise<void> {
return this.$doctorService.printWarnings({
trackResult: false,
projectDir: this.$projectHelper.projectDir,
forceCheck: true,
});
}
}
injector.registerCommand("doctor|*all", DoctorCommand);
export class DoctorIosCommand implements ICommand {
constructor(
private $doctorService: IDoctorService,
private $projectHelper: IProjectHelper
) {}
public allowedParameters: ICommandParameter[] = [];
public execute(args: string[]): Promise<void> {
return this.$doctorService.printWarnings({
trackResult: false,
projectDir: this.$projectHelper.projectDir,
forceCheck: true,
platform: PlatformTypes.ios,
});
}
}
injector.registerCommand("doctor|ios", DoctorIosCommand);
export class DoctorAndroidCommand implements ICommand {
constructor(
private $doctorService: IDoctorService,
private $projectHelper: IProjectHelper
) {}
public allowedParameters: ICommandParameter[] = [];
public execute(args: string[]): Promise<void> {
return this.$doctorService.printWarnings({
trackResult: false,
projectDir: this.$projectHelper.projectDir,
forceCheck: true,
platform: PlatformTypes.android,
});
}
}
injector.registerCommand("doctor|android", DoctorAndroidCommand);