()
| 45 | const appCache: Partial<Record<string, CachedApp>> = {} |
| 46 | |
| 47 | export async function disposeApps() { |
| 48 | const apps = Object.values(appCache) |
| 49 | for (const key of Object.keys(appCache)) delete appCache[key] |
| 50 | await Promise.all(apps.flatMap((app) => (app === undefined ? [] : [app.dispose()]))) |
| 51 | } |
| 52 | |
| 53 | function app(modules: Runtime, options: CallOptions) { |
| 54 | const username = options.auth?.username |