MCPcopy Index your code
hub / github.com/callstack/agent-device / buildCloudClientId

Function buildCloudClientId

src/cli/connection/cloud-profile.ts:112–125  ·  view source on GitHub ↗
(options: {
  stateDir: string;
  cloudBaseUrl: string;
  daemonBaseUrl: string;
  session: string | undefined;
})

Source from the content-addressed store, hash-verified

110}
111
112function buildCloudClientId(options: {
113 stateDir: string;
114 cloudBaseUrl: string;
115 daemonBaseUrl: string;
116 session: string | undefined;
117}): string {
118 return crypto
119 .createHash('sha256')
120 .update(
121 `${options.stateDir}\0${options.cloudBaseUrl}\0${options.daemonBaseUrl}\0${options.session ?? ''}`,
122 )
123 .digest('hex')
124 .slice(0, 16);
125}

Callers 1

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected