Pyric
Navigate

API reference

pyric-admin/app

13 published symbols from pyric-admin

Generated from the TypeScript declarations shipped at this import path.

Interfaces

SandboxAdminApp

Properties

PropertyModifierType
[ADMIN_APP_TARGET]readonly"sandbox"
namereadonlystring
sandboxreadonlySandbox

Type Aliases

InitializeAdminAppConfig

type InitializeAdminAppConfig = {
  sandbox: Sandbox;
};

Properties

PropertyType
sandboxSandbox

PyricAdminApp

type PyricAdminApp = SandboxAdminApp;

PyricAdminAppTarget

type PyricAdminAppTarget = "sandbox";

Variables

ADMIN_APP_TARGET

const ADMIN_APP_TARGET: unique symbol;

Brand carried by every sandbox admin app.


DEFAULT_APP_NAME

const DEFAULT_APP_NAME: "[DEFAULT]" = "[DEFAULT]";

firebase-admin’s default app name.

Functions

applicationDefault()

function applicationDefault(): never;

Firebase Functions’ ESM runtime statically imports this credential factory while linking its database provider. Pyric initializes the sandbox app before that provider executes, so the factory is not used by supported Functions flows. Keep the named export link-compatible, but fail clearly if application code asks the development sandbox for production credentials.

Returns

never


cert()

function cert(serviceAccountPathOrObject: unknown): object;

Link-compatible mirror of firebase-admin/app’s cert(serviceAccountPathOrObject). Returns an inert sandbox credential token so unchanged application setup code can assign appOptions.credential = cert(...) under @pyric/cli/register.

Parameters

ParameterType
serviceAccountPathOrObjectunknown

Returns

object


deleteApp()

function deleteApp(app: SandboxAdminApp): Promise<void>;

Remove a sandbox app from the registry.

Parameters

ParameterType
appSandboxAdminApp

Returns

Promise<void>


getApp()

function getApp(name?: string): SandboxAdminApp;

Return the registered app for name.

Parameters

ParameterType
name?string

Returns

SandboxAdminApp


getApps()

function getApps(): SandboxAdminApp[];

Return a copy of the app registry.

Returns

SandboxAdminApp[]


initializeApp()

function initializeApp(config?:
  | Record<string, unknown>
  | InitializeAdminAppConfig, name?: string): SandboxAdminApp;

Initialize a sandbox admin app.

An explicit { sandbox } config binds an in-process or remote sandbox. A bare call resolves the remote sandbox factory installed by @pyric/cli/register. Production callers must import firebase-admin/app without Pyric activation instead of passing production options here.

Parameters

ParameterType
config?| Record<string, unknown> | InitializeAdminAppConfig
name?string

Returns

SandboxAdminApp


isSandboxAdminApp()

function isSandboxAdminApp(app: SandboxAdminApp): app is SandboxAdminApp;

Parameters

ParameterType
appSandboxAdminApp

Returns

app is SandboxAdminApp