MCPcopy Create free account
hub / github.com/callstack/agent-device / ingestEnvLine

Function ingestEnvLine

src/replay/script.ts:160–168  ·  view source on GitHub ↗
(metadata: ReplayScriptMetadata, trimmed: string, lineNumber: number)

Source from the content-addressed store, hash-verified

158}
159
160function ingestEnvLine(metadata: ReplayScriptMetadata, trimmed: string, lineNumber: number): void {
161 const { key, value } = parseReplayEnvLine(trimmed, lineNumber);
162 const env = metadata.env ?? {};
163 if (Object.prototype.hasOwnProperty.call(env, key)) {
164 throw new AppError('INVALID_ARGS', `Duplicate env directive "${key}" on line ${lineNumber}.`);
165 }
166 env[key] = value;
167 metadata.env = env;
168}
169
170function assignReplayMetadataValue<Key extends keyof ReplayScriptMetadata>(
171 metadata: ReplayScriptMetadata,

Callers 1

readReplayScriptMetadataFunction · 0.85

Calls 1

parseReplayEnvLineFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…