(name: string, profile?: ProviderSettings, activate: boolean = true)
| 515 | } |
| 516 | |
| 517 | public async createProfile(name: string, profile?: ProviderSettings, activate: boolean = true) { |
| 518 | const entry = this.getProfileEntry(name) |
| 519 | |
| 520 | if (entry) { |
| 521 | throw new Error(`Profile with name "${name}" already exists`) |
| 522 | } |
| 523 | |
| 524 | const id = await this.sidebarProvider.upsertProviderProfile(name, profile ?? {}, activate) |
| 525 | |
| 526 | if (!id) { |
| 527 | throw new Error(`Failed to create profile with name "${name}"`) |
| 528 | } |
| 529 | |
| 530 | return id |
| 531 | } |
| 532 | |
| 533 | public async updateProfile( |
| 534 | name: string, |
nothing calls this directly
no test coverage detected