Skip to content

NeonStorage

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:29

storage capability for Neon, bound to the single project named by the projectId option.

  • Storage

new NeonStorage(client, opts): NeonStorage

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:35

() => object

StorageOptions

NeonStorage

readonly key: "storage"

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:31

Capability key; always "storage".

Storage.key


readonly providerName: "neon" = "neon"

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:33

Provider name; always "neon".

Storage.providerName

createBranch(input): Promise<StorageBranch>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:66

Creates a branch (optionally from the from parent branch id) with a read-write endpoint, so its connection string works at once.

string

string

Promise<StorageBranch>

Storage.createBranch


destroyBranch(branch): Promise<void>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:78

Deletes the branch with the given id from the bound project.

string

Promise<void>

Storage.destroyBranch


enableExtension(input): Promise<void>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:88

Provider-specific feature toggle. For Postgres providers this is CREATE EXTENSION IF NOT EXISTS ... per branch.

string

string

Promise<void>

Storage.enableExtension


getConnectionString(scope, options?): Promise<string>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:46

Connection string for the given scope. Scope is provider-specific:

  • branch-based providers (Neon, PlanetScale): scope = branch name or id
  • flat providers (single Postgres instance): scope is ignored

Callers (or the orchestrator) decide how a deploy target maps to a scope; the storage plugin doesn’t own that mapping.

string

ConnectionStringOptions = {}

Promise<string>

Storage.getConnectionString


listBranches(): Promise<StorageBranch[]>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:60

Lists every branch of the bound project, mapped to StorageBranch.

Promise<StorageBranch[]>

Storage.listBranches


resetBranch(input): Promise<void>

Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:82

Restore one branch to match another (e.g., reset preview → main).

string

string

Promise<void>

Storage.resetBranch