(workspaceKey: string)
| 12 | let runtimeInstance: RuntimeInstance | null = null; |
| 13 | |
| 14 | export function configureRuntimeWorkspaceKey(workspaceKey: string): void { |
| 15 | const normalized = workspaceKey.trim(); |
| 16 | if (!normalized) { |
| 17 | throw new Error('Workspace key cannot be empty'); |
| 18 | } |
| 19 | configuredWorkspaceKey = normalized; |
| 20 | if (runtimeInstance) { |
| 21 | runtimeInstance = { ...runtimeInstance, workspaceKey: normalized }; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | export function getRuntimeInstance(): RuntimeInstance { |
| 26 | const workspaceKey = configuredWorkspaceKey; |