Parse DCR configuration from CLI arguments and environment variables.
CLI Arguments:
Required environment variables:
Optional environment variables:
CLI arguments array (typically process.argv)
Environment variables object (typically process.env)
OAuth scopes to request (space-separated)
Parsed DCR configuration
Error if required environment variables are missing or validation fails
const config = parseDcrConfig( ['--dcr-mode=self-hosted', '--dcr-store-uri=file:///path/to/store.json'], process.env, 'https://www.googleapis.com/auth/drive.readonly'); Copy
const config = parseDcrConfig( ['--dcr-mode=self-hosted', '--dcr-store-uri=file:///path/to/store.json'], process.env, 'https://www.googleapis.com/auth/drive.readonly');
const config = parseDcrConfig( ['--dcr-mode=external', '--dcr-verify-url=https://auth0.example.com/verify'], process.env, 'https://www.googleapis.com/auth/drive.readonly'); Copy
const config = parseDcrConfig( ['--dcr-mode=external', '--dcr-verify-url=https://auth0.example.com/verify'], process.env, 'https://www.googleapis.com/auth/drive.readonly');
Parse DCR configuration from CLI arguments and environment variables.
CLI Arguments:
Required environment variables:
Optional environment variables: