MCPcopy Index your code
hub / github.com/Waishnav/devspace / parseRequiredSecret

Function parseRequiredSecret

src/config.ts:163–172  ·  view source on GitHub ↗
(value: string | undefined, name: string)

Source from the content-addressed store, hash-verified

161}
162
163function parseRequiredSecret(value: string | undefined, name: string): string {
164 const secret = value?.trim();
165 if (!secret) {
166 throw new Error(`${name} is required for DevSpace OAuth. Run: devspace init`);
167 }
168 if (secret.length < 16) {
169 throw new Error(`${name} must be at least 16 characters long.`);
170 }
171 return secret;
172}
173
174function parseOAuthConfig(env: NodeJS.ProcessEnv, ownerToken: string | undefined): OAuthConfig {
175 return {

Callers 1

parseOAuthConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected