MCPcopy
hub / github.com/callstack/agent-device / mergeRemoteConfigProfile

Function mergeRemoteConfigProfile

src/remote/remote-config-core.ts:92–106  ·  view source on GitHub ↗
(
  ...profiles: Array<RemoteConfigProfile | null | undefined>
)

Source from the content-addressed store, hash-verified

90}
91
92function 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
108export function resolveRemoteConfigPath(options: RemoteConfigProfileOptions): string {
109 const env = options.env ?? process.env;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected