CloudflareDeployment
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:16
The Cloudflare implementation of the deployment capability, backed by Cloudflare Pages projects in one account.
Implements
Section titled “Implements”Deployment
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CloudflareDeployment(
client,accountId):CloudflareDeployment
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:22
Parameters
Section titled “Parameters”client
Section titled “client”() => object
accountId
Section titled “accountId”string
Returns
Section titled “Returns”CloudflareDeployment
Properties
Section titled “Properties”
readonlykey:"deployment"
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:18
The capability this class provides, always "deployment".
Implementation of
Section titled “Implementation of”Deployment.key
providerName
Section titled “providerName”
readonlyproviderName:"cloudflare"="cloudflare"
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:20
The provider name, "cloudflare".
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-cloudflare/src/capabilities/deployment.ts:125
Delete specific preview deployments by id. Returns the count deleted. Optional — providers that don’t support deletion omit this.
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
ensureCustomDomain()
Section titled “ensureCustomDomain()”ensureCustomDomain(
projectId,hostname):Promise<DnsRecordRequest|null>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:137
Add a custom domain (or wildcard) to the project. Idempotent — no-op when the domain is already present. Optional: providers without a custom domain API omit this.
Returns the DNS record needed to finish verification — null when
the domain is already verified, or when the provider’s API doesn’t
surface DNS-challenge details at all (e.g. Cloudflare Pages, whose
custom-domain flow doesn’t expose the same per-request verification
handshake Vercel’s does). Callers hand a non-null result straight
to dns.upsertRecord(result.zone, result.record) — the exact
pattern setup already uses for Wiki.dnsRecord().
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-cloudflare/src/capabilities/deployment.ts:35
Create if missing, otherwise return existing. Idempotent.
Parameters
Section titled “Parameters”framework?
Section titled “framework?”string
string
string
rootDirectory?
Section titled “rootDirectory?”string
Returns
Section titled “Returns”Promise<DeploymentProject>
Implementation of
Section titled “Implementation of”Deployment.ensureProject
getDeployment()
Section titled “getDeployment()”getDeployment(
deploymentId):Promise<DeploymentRecord>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:101
Fetches a deployment by an id of the form projectName:deploymentId; throws a 400 ProviderApiError for any other form.
Parameters
Section titled “Parameters”deploymentId
Section titled “deploymentId”string
Returns
Section titled “Returns”Promise<DeploymentRecord>
Implementation of
Section titled “Implementation of”Deployment.getDeployment
latestDeployment()
Section titled “latestDeployment()”latestDeployment(
projectId):Promise<DeploymentRecord|null>
Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:153
The newest production deployment of the project, 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-cloudflare/src/capabilities/deployment.ts:148
The hostnames attached to the Pages 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-cloudflare/src/capabilities/deployment.ts:63
Lists the names of the environment variables set for the production or preview 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-cloudflare/src/capabilities/deployment.ts:118
List preview deployments for a specific branch alias (e.g. “repo-pr-42”). Optional — providers that don’t support listing by branch omit this.
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-cloudflare/src/capabilities/deployment.ts:30
Lists the account’s Pages projects.
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-cloudflare/src/capabilities/deployment.ts:71
Sets a plain-text environment variable on the production or preview target, keeping the others.
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-cloudflare/src/capabilities/deployment.ts:89
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-cloudflare/src/capabilities/deployment.ts:52
Returns the project as it is now; Pages has no REST setting for the requested options, so settings is ignored.
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