src/node/plugin.ts/PluginAPI/dispose
class PluginAPI:  public async dispose(): Promise<void> {
    await Promise.all(
      Array.from(this.plugins.values()).map(async (p) => {
        if (!p.deinit) {
          return
        }
        try {
          await p.deinit()
        } catch (error: any) {
          this.logger.error("plugin failed to deinit", field("name", p.name), field("error", error.message))
        }
      }),
    )
  }