MCPcopy Create free account
hub / github.com/angular/dev-infra / checkServiceStatuses

Function checkServiceStatuses

ng-dev/caretaker/check/check.ts:23–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22/** Check the status of services which Angular caretakers need to monitor. */
23export async function checkServiceStatuses() {
24 /** The configuration for the caretaker commands. */
25 const config = await getConfig();
26 assertValidCaretakerConfig(config);
27 assertValidGithubConfig(config);
28
29 /** An authenticated git client instance. */
30 const git = await AuthenticatedGitClient.get();
31
32 /** List of instances of Caretaker Check modules */
33 const caretakerCheckModules = moduleList.map((module) => new module(git, config));
34
35 // Module's `data` is casted as Promise<unknown> because the data types of the `module`'s `data`
36 // promises do not match typings, however our usage here is only to determine when the promise
37 // resolves.
38 await Promise.all(caretakerCheckModules.map((module) => module.data as Promise<unknown>));
39
40 for (const module of caretakerCheckModules) {
41 await module.printToTerminal();
42 }
43}

Callers 1

handlerFunction · 0.85

Calls 5

getConfigFunction · 0.85
assertValidGithubConfigFunction · 0.85
getMethod · 0.45
printToTerminalMethod · 0.45

Tested by

no test coverage detected