Skip to content

VercelDeployment

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:54

The deployment capability for Vercel: projects, environment variables, deployments, functions and custom domains.

  • Deployment

new VercelDeployment(client, opts?): VercelDeployment

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:63

() => object

DeploymentOptions = {}

VercelDeployment

readonly optional domain?: string

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:59

Custom domain declared in the deployment provider’s configuration. holocron setup attaches it to the configured project and hands any returned verification record to the dns capability.

Deployment.domain


readonly key: "deployment"

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:56

The capability key, always deployment.

Deployment.key


readonly providerName: "vercel" = "vercel"

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:58

The provider name, vercel.

Deployment.providerName

deletePreviewDeployments(_projectId, deploymentIds): Promise<number>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:236

Deletes the deployments by id; one already gone (404) is not counted and is not an error.

string

string[]

Promise<number>

Deployment.deletePreviewDeployments


deployFunction(projectId, config): Promise<DeployFunctionResult>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:175

Deploy (or update) a project directly from source files, bypassing Git entirely — the non-git counterpart to triggerDeployment, for a consumer with no repo to link (a webhook receiver shipped as an npm package, for instance, rather than deployed from its own Git history). projectId may be a project name for providers that accept either. Optional — providers without a files-based deploy API omit this (e.g. Cloudflare Pages, git-source only today).

string

DeployFunctionConfig

Promise<DeployFunctionResult>

Deployment.deployFunction


ensureCustomDomain(projectId, hostname): Promise<DnsRecordRequest | null>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:270

Idempotent — matches Deployment.ensureCustomDomain’s contract (never break on re-runs, per CLAUDE.md’s probe-then-act standard).

Ownership (domains.add’s verified) and DNS routing are separate concerns: once a team already owns the domain’s apex (true for any org with more than one project on the same domain), every new subdomain auto-verifies immediately with no verification challenge — re-adding an already-attached domain returns 409, not a fresh one. So attachment alone can’t tell us whether traffic is actually routed to Vercel yet. domains.config() (Vercel’s DNS configuration check) answers that regardless of ownership state: misconfigured + a recommendedCNAME, per-project, never a fixed well-known host — always read it from this response, never hardcode it. Returned as a DnsRecordRequest — the caller (e.g. holocron setup’s custom-domain step) hands it straight to dns.upsertRecord(), same as Wiki.dnsRecord() already does for the wiki’s own domain.

string

string

Promise<DnsRecordRequest | null>

Deployment.ensureCustomDomain


ensureProject(input): Promise<DeploymentProject>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:79

Create if missing, otherwise return existing. Idempotent.

string | null

string

string

string

Promise<DeploymentProject>

Deployment.ensureProject


ensureRelaySource(input): Promise<EnsureRelaySourceResult>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:122

Makes (or adopts) the team webhook for a Comlink relay source, found by its URL; returns the secret only when made now.

EnsureRelaySourceInput

Promise<EnsureRelaySourceResult>

Deployment.ensureRelaySource


expectedDomainRecord(projectId, hostname): Promise<DnsRecordRequest | null>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:297

Read-only: the CNAME Vercel recommends for hostname, whether or not the domain already resolves. Unlike ensureCustomDomain it never attaches the domain, and it keeps the answer when misconfigured is false, so holocron doctor dns can compare it with the zone. The record is DNS-only: a proxied record breaks Vercel’s certificate issuance.

string

string

Promise<DnsRecordRequest | null>

Deployment.expectedDomainRecord


getDeployment(deploymentId): Promise<DeploymentRecord>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:170

Fetches a deployment by id; the record’s branch is the deployment’s Git commit ref, or null when it has none.

string

Promise<DeploymentRecord>

Deployment.getDeployment


inspectRelaySource(input): Promise<RelaySourceState>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:127

Reads the relay source’s webhook back without changing it.

InspectRelaySourceInput

Promise<RelaySourceState>

Deployment.inspectRelaySource


latestDeployment(projectId): Promise<DeploymentRecord | null>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:220

The newest production deployment of the project in its latest page of deployments, or null. Reads only.

string

Promise<DeploymentRecord | null>

Deployment.latestDeployment


listDomains(projectId): Promise<string[]>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:231

The hostnames attached to the project. Reads only.

string

Promise<string[]>

Deployment.listDomains


listEnvVars(projectId, target): Promise<string[]>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:134

Lists the names of the project’s environment variables that apply to target.

string

DeploymentTarget

Promise<string[]>

Deployment.listEnvVars


listPreviewDeployments(projectId, branch): Promise<DeploymentRecord[]>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:197

The project’s preview deployments tagged for branch (the <repo>-pr-<number> alias a file deploy puts in its meta.holocronPreview), found by reading the project’s deployments page by page and matching the tag here, so only this project’s deployments are ever candidates. A production or staging deployment is never one.

string

string

Promise<DeploymentRecord[]>

Deployment.listPreviewDeployments


listProjects(): Promise<DeploymentProject[]>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:74

Lists the projects the token can see, mapped to the provider-neutral shape.

Promise<DeploymentProject[]>

Deployment.listProjects


setEnvVar(projectId, target, name, value): Promise<void>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:140

Creates or updates (upsert) an environment variable on the project for target.

string

DeploymentTarget

string

string

Promise<void>

Deployment.setEnvVar


triggerDeployment(input): Promise<DeploymentRecord>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:146

Kick off a deployment of the given branch. Omit target for a branch preview; pass 'production' / 'staging' to deploy into a named environment.

string

string

DeploymentTrigger

Promise<DeploymentRecord>

Deployment.triggerDeployment


updateProjectSettings(projectId, settings): Promise<DeploymentProject>

Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:107

Updates a project’s preview-deployment and Git-provider deployment settings and returns the updated project.

string

DeploymentProjectSettings

Promise<DeploymentProject>

Deployment.updateProjectSettings