()
| 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 | } |
nothing calls this directly
no test coverage detected