( auth: DevspaceAuthConfig, env: NodeJS.ProcessEnv = process.env, )
| 75 | } |
| 76 | |
| 77 | export function writeDevspaceAuth( |
| 78 | auth: DevspaceAuthConfig, |
| 79 | env: NodeJS.ProcessEnv = process.env, |
| 80 | ): string { |
| 81 | const filePath = devspaceAuthPath(env); |
| 82 | mkdirSync(devspaceConfigDir(env), { recursive: true }); |
| 83 | writeJsonFile(filePath, auth, 0o600); |
| 84 | return filePath; |
| 85 | } |
| 86 | |
| 87 | export function generateOwnerToken(): string { |
| 88 | return randomBytes(32).toString("base64url"); |
no test coverage detected