()
| 18 | } |
| 19 | |
| 20 | export function tryGetCurrentWorkspaceScope(): WorkspaceScope | null { |
| 21 | const context = persistence.database.getActiveContext() |
| 22 | if (!context.accountId || !context.workspacePath) { |
| 23 | return null |
| 24 | } |
| 25 | return { |
| 26 | accountId: context.accountId, |
| 27 | workspacePath: context.workspacePath |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | export function getCurrentWorkspaceScope(): WorkspaceScope { |
| 32 | const scope = tryGetCurrentWorkspaceScope() |
no test coverage detected