* @internal
()
| 370 | * @internal |
| 371 | */ |
| 372 | run() { |
| 373 | if (this.runCalled) { |
| 374 | throw new Error("run already called"); |
| 375 | } |
| 376 | |
| 377 | this.runCalled = true; |
| 378 | |
| 379 | const [cmds, groups] = this.genCommandsBinding(); |
| 380 | |
| 381 | OpWrappers.scriptStarted({ |
| 382 | description: this.description, |
| 383 | commands: cmds, |
| 384 | commandGroups: groups, |
| 385 | scriptId: this.scriptId, |
| 386 | intervalTimers: this.intervalTimers.map(inner => inner.timer), |
| 387 | taskBuckets: this.taskHandlers, |
| 388 | pluginId: this.pluginId, |
| 389 | settings: this.settings.toInternalOptions() |
| 390 | }); |
| 391 | |
| 392 | EventSystem.registerEventMuxer(this.events); |
| 393 | |
| 394 | this.events.on("BOTLOADER_INTERVAL_TIMER_FIRED", this.handleIntervalEvent.bind(this)); |
| 395 | } |
| 396 | |
| 397 | private async handleIntervalEvent(evt: Internal.IntervalTimerEvent) { |
| 398 | const timer = this.intervalTimers.find( |
nothing calls this directly
no test coverage detected