Pyric
Navigate

API reference

@pyric/cli/credentials/node

2 published symbols from @pyric/cli

Generated from the TypeScript declarations shipped at this import path.

Functions

fromAdc()

function fromAdc(
   projectId: string,
   env?: ProcessEnv,
path?: string): Promise<ProjectScope>;

Build a ProjectScope from ADC, or null if no ADC file is present. The project is supplied by the caller — an ADC user credential isn’t bound to one (--project / .firebaserc).

Parameters

ParameterType
projectIdstring
env?ProcessEnv
path?string

Returns

Promise<ProjectScope>


fromServiceAccount()

function fromServiceAccount(saJsonOrPath: string): Promise<ProjectScope>;

Read the service account from a JSON file and return a ProjectScope whose resolveToken is memoized internally.

The JSON file path can be:

  • An absolute / relative filesystem path (Node only).
  • A base64-encoded JSON string (when prefixed with base64:), for environments that ship the SA in an env var.

Parameters

ParameterType
saJsonOrPathstring

Returns

Promise<ProjectScope>