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.
Implements
Section titled “Implements”Deployment
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new VercelDeployment(
client,opts?):VercelDeployment
Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:63
Parameters
Section titled “Parameters”client
Section titled “client”() => object
DeploymentOptions = {}
Returns
Section titled “Returns”VercelDeployment
Properties
Section titled “Properties”domain?
Section titled “domain?”
readonlyoptionaldomain?: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.
Implementation of
Section titled “Implementation of”Deployment.domain
readonlykey:"deployment"
Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:56
The capability key, always deployment.
Implementation of
Section titled “Implementation of”Deployment.key
providerName
Section titled “providerName”
readonlyproviderName:"vercel"="vercel"
Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:58
The provider name, vercel.
Implementation of
Section titled “Implementation of”Deployment.providerName
Methods
Section titled “Methods”deletePreviewDeployments()
Section titled “deletePreviewDeployments()”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.
Parameters
Section titled “Parameters”_projectId
Section titled “_projectId”string
deploymentIds
Section titled “deploymentIds”string[]
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”Deployment.deletePreviewDeployments
deployFunction()
Section titled “deployFunction()”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).
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
config
Section titled “config”DeployFunctionConfig
Returns
Section titled “Returns”Promise<DeployFunctionResult>
Implementation of
Section titled “Implementation of”Deployment.deployFunction
ensureCustomDomain()
Section titled “ensureCustomDomain()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
hostname
Section titled “hostname”string
Returns
Section titled “Returns”Promise<DnsRecordRequest | null>
Implementation of
Section titled “Implementation of”Deployment.ensureCustomDomain
ensureProject()
Section titled “ensureProject()”ensureProject(
input):Promise<DeploymentProject>
Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:79
Create if missing, otherwise return existing. Idempotent.
Parameters
Section titled “Parameters”framework?
Section titled “framework?”string | null
string
string
rootDirectory?
Section titled “rootDirectory?”string
Returns
Section titled “Returns”Promise<DeploymentProject>
Implementation of
Section titled “Implementation of”Deployment.ensureProject
ensureRelaySource()
Section titled “ensureRelaySource()”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.
Parameters
Section titled “Parameters”EnsureRelaySourceInput
Returns
Section titled “Returns”Promise<EnsureRelaySourceResult>
Implementation of
Section titled “Implementation of”Deployment.ensureRelaySource
expectedDomainRecord()
Section titled “expectedDomainRecord()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
hostname
Section titled “hostname”string
Returns
Section titled “Returns”Promise<DnsRecordRequest | null>
Implementation of
Section titled “Implementation of”Deployment.expectedDomainRecord
getDeployment()
Section titled “getDeployment()”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.
Parameters
Section titled “Parameters”deploymentId
Section titled “deploymentId”string
Returns
Section titled “Returns”Promise<DeploymentRecord>
Implementation of
Section titled “Implementation of”Deployment.getDeployment
inspectRelaySource()
Section titled “inspectRelaySource()”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.
Parameters
Section titled “Parameters”InspectRelaySourceInput
Returns
Section titled “Returns”Promise<RelaySourceState>
Implementation of
Section titled “Implementation of”Deployment.inspectRelaySource
latestDeployment()
Section titled “latestDeployment()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<DeploymentRecord | null>
Implementation of
Section titled “Implementation of”Deployment.latestDeployment
listDomains()
Section titled “listDomains()”listDomains(
projectId):Promise<string[]>
Defined in: plugins/holocron-plugin-vercel/src/capabilities/deployment.ts:231
The hostnames attached to the project. Reads only.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Deployment.listDomains
listEnvVars()
Section titled “listEnvVars()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
target
Section titled “target”DeploymentTarget
Returns
Section titled “Returns”Promise<string[]>
Implementation of
Section titled “Implementation of”Deployment.listEnvVars
listPreviewDeployments()
Section titled “listPreviewDeployments()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
branch
Section titled “branch”string
Returns
Section titled “Returns”Promise<DeploymentRecord[]>
Implementation of
Section titled “Implementation of”Deployment.listPreviewDeployments
listProjects()
Section titled “listProjects()”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.
Returns
Section titled “Returns”Promise<DeploymentProject[]>
Implementation of
Section titled “Implementation of”Deployment.listProjects
setEnvVar()
Section titled “setEnvVar()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
target
Section titled “target”DeploymentTarget
string
string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Deployment.setEnvVar
triggerDeployment()
Section titled “triggerDeployment()”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.
Parameters
Section titled “Parameters”branch
Section titled “branch”string
projectId
Section titled “projectId”string
target?
Section titled “target?”DeploymentTrigger
Returns
Section titled “Returns”Promise<DeploymentRecord>
Implementation of
Section titled “Implementation of”Deployment.triggerDeployment
updateProjectSettings()
Section titled “updateProjectSettings()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
settings
Section titled “settings”DeploymentProjectSettings
Returns
Section titled “Returns”Promise<DeploymentProject>
Implementation of
Section titled “Implementation of”Deployment.updateProjectSettings