MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / writeLoggedOutProfile

Function writeLoggedOutProfile

e2e/local/cli-call-logged-out.test.ts:54–78  ·  view source on GitHub ↗
(dataDir: string, origin: string)

Source from the content-addressed store, hash-verified

52 * `stored-auth` after a login has gone stale. The `profile:` key matches
53 * what `executor login` persists via upsertCliServerConnectionProfile. */
54const writeLoggedOutProfile = (dataDir: string, origin: string) => {
55 writeFileSync(
56 join(dataDir, "server-connections.json"),
57 JSON.stringify(
58 {
59 version: 1,
60 defaultProfile: "hosted",
61 profiles: [
62 {
63 name: "hosted",
64 connection: {
65 kind: "http",
66 key: "profile:hosted",
67 origin,
68 displayName: "hosted",
69 auth: { kind: "oauth", accessToken: "expired-access-token", expiresAt: 1 },
70 },
71 },
72 ],
73 },
74 null,
75 2,
76 ),
77 );
78};
79
80/** An `executor` on PATH that runs this checkout's CLI, so the recording
81 * shows the command a user actually types. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected