/** * @file Socket CLI environment variables. Provides typed getters for * SOCKET_CLI_* environment variables other than the shadow ones. */ /** * Whether to accept all Socket CLI risks. Alternative name for * SOCKET_ACCEPT_RISKS. * * @example * ;```typescript * import { getSocketCliAcceptRisks } from '@socketsecurity/lib/env/socket-cli' * * if (getSocketCliAcceptRisks()) { * console.log('All risks accepted') * } * ``` * * @returns Whether to accept all risks */ export declare function getSocketCliAcceptRisks(): boolean; /** * Socket CLI API base URL. Alternative name for SOCKET_API_BASE_URL. Checks * SOCKET_CLI_API_BASE_URL first, then falls back to legacy * SOCKET_SECURITY_API_BASE_URL. * * @example * ;```typescript * import { getSocketCliApiBaseUrl } from '@socketsecurity/lib/env/socket-cli' * * const baseUrl = getSocketCliApiBaseUrl() * // e.g. 'https://api.socket.dev' or undefined * ``` * * @returns API base URL or undefined */ export declare function getSocketCliApiBaseUrl(): string | undefined; /** * Proxy URL for Socket CLI API requests. Alternative name for * SOCKET_API_PROXY. Checks SOCKET_CLI_API_PROXY, SOCKET_SECURITY_API_PROXY, * then standard proxy env vars. Follows the same precedence as v1.x: * HTTPS_PROXY → https_proxy → HTTP_PROXY → http_proxy. * * @example * ;```typescript * import { getSocketCliApiProxy } from '@socketsecurity/lib/env/socket-cli' * * const proxy = getSocketCliApiProxy() * // e.g. 'http://proxy.example.com:8080' or undefined * ``` * * @returns API proxy URL or undefined */ export declare function getSocketCliApiProxy(): string | undefined; /** * Timeout in milliseconds for Socket CLI API requests. Alternative name for * SOCKET_API_TIMEOUT. * * @example * ;```typescript * import { getSocketCliApiTimeout } from '@socketsecurity/lib/env/socket-cli' * * const timeout = getSocketCliApiTimeout() * // e.g. 30000 or 0 if not set * ``` * * @returns API timeout in milliseconds */ export declare function getSocketCliApiTimeout(): number; /** * Bootstrap cache directory path. Set by bootstrap wrappers to pass dlx cache * location to CLI. * * @example * ;```typescript * import { getSocketCliBootstrapCacheDir } from '@socketsecurity/lib/env/socket-cli' * * const cacheDir = getSocketCliBootstrapCacheDir() * // e.g. '/tmp/.socket-cli-cache' or undefined * ``` * * @returns Bootstrap cache directory or undefined */ export declare function getSocketCliBootstrapCacheDir(): string | undefined; /** * Bootstrap package spec (e.g., @socketsecurity/cli@^2.0.11). Set by bootstrap * wrappers (SEA/smol/npm) to pass package spec to CLI. * * @example * ;```typescript * import { getSocketCliBootstrapSpec } from '@socketsecurity/lib/env/socket-cli' * * const spec = getSocketCliBootstrapSpec() * // e.g. '@socketsecurity/cli@^2.0.11' or undefined * ``` * * @returns Bootstrap package spec or undefined */ export declare function getSocketCliBootstrapSpec(): string | undefined; /** * Socket CLI configuration file path. Alternative name for SOCKET_CONFIG. * * @example * ;```typescript * import { getSocketCliConfig } from '@socketsecurity/lib/env/socket-cli' * * const config = getSocketCliConfig() * // e.g. '/tmp/project/socket.yml' or undefined * ``` * * @returns Config file path or undefined */ export declare function getSocketCliConfig(): string | undefined; /** * Controls Socket CLI fix mode. * * @example * ;```typescript * import { getSocketCliFix } from '@socketsecurity/lib/env/socket-cli' * * const fix = getSocketCliFix() * // e.g. 'true' or undefined * ``` * * @returns Fix mode value or undefined */ export declare function getSocketCliFix(): string | undefined; /** * Socket CLI GitHub authentication token. Checks SOCKET_CLI_GITHUB_TOKEN, then * SOCKET_SECURITY_GITHUB_PAT. It does NOT fall back to the generic GITHUB_TOKEN * — callers wanting the standard token compose `getGitHubToken()` on top (as * the CLI's own token wrapper does), keeping the CLI-specific and generic token * concerns separate. * * @example * ;```typescript * import { getSocketCliGithubToken } from '@socketsecurity/lib/env/socket-cli' * * const token = getSocketCliGithubToken() * // e.g. 'ghp_abc123...' or undefined * ``` * * @returns GitHub token or undefined */ export declare function getSocketCliGithubToken(): string | undefined; /** * Whether to skip Socket CLI API token requirement. Alternative name for * SOCKET_NO_API_TOKEN. * * @example * ;```typescript * import { getSocketCliNoApiToken } from '@socketsecurity/lib/env/socket-cli' * * if (getSocketCliNoApiToken()) { * console.log('API token requirement skipped') * } * ``` * * @returns Whether to skip API token requirement */ export declare function getSocketCliNoApiToken(): boolean; /** * Controls Socket CLI optimization mode. * * @example * ;```typescript * import { getSocketCliOptimize } from '@socketsecurity/lib/env/socket-cli' * * if (getSocketCliOptimize()) { * console.log('Optimization mode enabled') * } * ``` * * @returns Whether optimization mode is enabled */ export declare function getSocketCliOptimize(): boolean; /** * Socket CLI organization slug identifier. Alternative name for * SOCKET_ORG_SLUG. Checks SOCKET_CLI_ORG_SLUG first, then falls back to * SOCKET_ORG_SLUG. * * @example * ;```typescript * import { getSocketCliOrgSlug } from '@socketsecurity/lib/env/socket-cli' * * const slug = getSocketCliOrgSlug() * // e.g. 'my-org' or undefined * ``` * * @returns Organization slug or undefined */ export declare function getSocketCliOrgSlug(): string | undefined; /** * Whether to view all Socket CLI risks. Alternative name for * SOCKET_VIEW_ALL_RISKS. * * @example * ;```typescript * import { getSocketCliViewAllRisks } from '@socketsecurity/lib/env/socket-cli' * * if (getSocketCliViewAllRisks()) { * console.log('Viewing all risks') * } * ``` * * @returns Whether to view all risks */ export declare function getSocketCliViewAllRisks(): boolean;