MCPcopy Create free account
hub / github.com/chhoumann/quickadd / run

Method run

src/engine/StartupMacroEngine.ts:18–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 ) {}
17
18 async run(): Promise<void> {
19 const macroChoices = flattenChoices(this.choices)
20 .filter((c): c is IMacroChoice => c.type === "Macro" && (c as IMacroChoice).runOnStartup);
21
22 for (const choice of macroChoices) {
23 // Isolate each startup macro: one that throws (a script bug, missing
24 // dependency, etc.) must not stop the rest from running. Report the
25 // failure naming the macro and continue to the next one.
26 try {
27 await new MacroChoiceEngine(
28 this.app,
29 this.plugin,
30 choice,
31 this.choiceExecutor,
32 new Map()
33 ).run();
34 } catch (error) {
35 reportError(
36 error,
37 `Startup macro '${choice.name}' failed`
38 );
39 }
40 }
41 }
42}

Callers

nothing calls this directly

Calls 2

flattenChoicesFunction · 0.90
reportErrorFunction · 0.90

Tested by

no test coverage detected