(realConfig: Config, config: Config)
| 195 | } |
| 196 | |
| 197 | async function copyPersistentConfig(realConfig: Config, config: Config): Promise<void> { |
| 198 | const existingProviders = realConfig.loadProvidersConfig(); |
| 199 | if (existingProviders != null && hasAnyConfiguredProvider(existingProviders)) { |
| 200 | config.saveProvidersConfig(existingProviders); |
| 201 | } |
| 202 | const existingSecrets = realConfig.loadSecretsConfig(); |
| 203 | if (Object.keys(existingSecrets).length > 0) { |
| 204 | await config.saveSecretsConfig(existingSecrets); |
| 205 | } |
| 206 | |
| 207 | const existingConfig = realConfig.loadConfigOrDefault(); |
| 208 | const trustOnlyProjects = new Map<string, ProjectConfig>(); |
| 209 | for (const [projectPath, projectConfig] of existingConfig.projects) { |
| 210 | if (projectConfig.trusted !== undefined) { |
| 211 | trustOnlyProjects.set(projectPath, { workspaces: [], trusted: projectConfig.trusted }); |
| 212 | } |
| 213 | } |
| 214 | if (trustOnlyProjects.size > 0) { |
| 215 | await config.saveConfig({ ...config.loadConfigOrDefault(), projects: trustOnlyProjects }); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | function buildExperimentsObject(experimentIds: readonly string[]) { |
| 220 | return { |
no test coverage detected