-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathverify.ts
More file actions
61 lines (49 loc) · 2.24 KB
/
verify.ts
File metadata and controls
61 lines (49 loc) · 2.24 KB
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
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { checkBinaries, checkCompiled, checkDTS, checkPrep, checkProposals, error, green } from './common';
const quiet = process.argv.includes('--quiet');
export async function main() {
let failing = await checkPrep() && (quiet || error(`Files are not up to date. Run ${green('yarn prep')} to fix it.`));
failing = (await checkCompiled() && (quiet || error(`Compiled files are not present. Run ${green('yarn compile')} to fix it.`))) || failing;
failing = (await checkBinaries() && (quiet || error(`The native binary files are not present. You should either build or install the native binaries\n\n.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function compiled() {
let failing = false;
failing = (await checkCompiled() && (quiet || error(`Compiled files are not present. Run ${green('yarn compile')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function binaries() {
let failing = false;
failing = (await checkBinaries() && (quiet || error(`The native binary files are not present. You should either build or install the native binaries\n\n.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function prep() {
let failing = false;
failing = (await checkPrep() && (quiet || error(`Files are not up to date. Run ${green('yarn prep')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function dts() {
let failing = false;
failing = (await checkDTS() && (quiet || error(`VSCode import files are not present. Run ${green('yarn prep')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}
export async function proposals() {
let failing = false;
failing = (await checkProposals() && (quiet || error(`Issue with VSCode proposals. Run ${green('yarn prep')} to fix it.`))) || failing;
if (failing) {
process.exit(1);
}
}