MCPcopy Create free account
hub / github.com/Noumena-Network/code / createApiKeyHelperScript

Function createApiKeyHelperScript

src/auth/runtime/LeaseManager.test.ts:121–130  ·  view source on GitHub ↗
(contents: string)

Source from the content-addressed store, hash-verified

119})
120
121async function createApiKeyHelperScript(contents: string): Promise<string> {
122 const helperPath = join(tempConfigDir, 'api-key-helper.sh')
123 await writeFile(
124 helperPath,
125 `#!/bin/sh\nprintf '%s\\n' '${contents.replaceAll("'", "'\"'\"'")}'\n`,
126 'utf8',
127 )
128 await chmod(helperPath, 0o700)
129 return helperPath
130}
131
132describe('LeaseManager', () => {
133 it('resolves and caches a local first-party lease for managed auth sessions', async () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected