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

Function normalizeDeployResult

src/client/client-normalizers.ts:41–56  ·  view source on GitHub ↗
(
  data: Record<string, unknown>,
  session?: string,
)

Source from the content-addressed store, hash-verified

39const DEFAULT_SESSION_NAME = 'default';
40
41export function normalizeDeployResult(
42 data: Record<string, unknown>,
43 session?: string,
44): AppDeployResult {
45 const bundleId = readOptionalString(data, 'bundleId');
46 const pkg = readOptionalString(data, 'package');
47 return {
48 app: readRequiredString(data, 'app'),
49 appPath: readRequiredString(data, 'appPath'),
50 platform: readRequiredPlatform(data, 'platform'),
51 appId: bundleId ?? pkg,
52 bundleId,
53 package: pkg,
54 identifiers: buildAppIdentifiers({ session, bundleId, packageName: pkg }),
55 };
56}
57
58export function normalizeInstallFromSourceResult(
59 data: Record<string, unknown>,

Callers 1

createAgentDeviceClientFunction · 0.90

Calls 4

readOptionalStringFunction · 0.90
readRequiredStringFunction · 0.90
readRequiredPlatformFunction · 0.90
buildAppIdentifiersFunction · 0.90

Tested by

no test coverage detected