( ...profiles: Array<RemoteConfigProfile | null | undefined> )
| 90 | } |
| 91 | |
| 92 | function mergeRemoteConfigProfile( |
| 93 | ...profiles: Array<RemoteConfigProfile | null | undefined> |
| 94 | ): RemoteConfigProfile { |
| 95 | const merged: RemoteConfigProfile = {}; |
| 96 | for (const profile of profiles) { |
| 97 | if (!profile) continue; |
| 98 | for (const spec of REMOTE_CONFIG_PROFILE_FIELD_SPECS) { |
| 99 | const value = profile[spec.key]; |
| 100 | if (value !== undefined) { |
| 101 | (merged as Record<string, unknown>)[spec.key] = value; |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | return merged; |
| 106 | } |
| 107 | |
| 108 | export function resolveRemoteConfigPath(options: RemoteConfigProfileOptions): string { |
| 109 | const env = options.env ?? process.env; |
no outgoing calls
no test coverage detected