| 62 | } |
| 63 | |
| 64 | export function loadConfig(configPath: string, secrets: Record<string, string | undefined>) { |
| 65 | const rawConfig = readConfig(configPath); |
| 66 | const parsedConfigRes = parseConfigWithSecrets(rawConfig, secrets); |
| 67 | if (!parsedConfigRes.success) { |
| 68 | throw new Error(`Invalid Airnode configuration file: ${parsedConfigRes.error}`); |
| 69 | } |
| 70 | |
| 71 | const config = parsedConfigRes.data; |
| 72 | return config; |
| 73 | } |
| 74 | |
| 75 | export function loadTrustedConfig(configPath: string, secrets: Record<string, string | undefined>): configTypes.Config { |
| 76 | const rawConfig = readConfig(configPath); |