Skip to content

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.

  • Deployment

new CloudflareDeployment(client, accountId): CloudflareDeployment

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:22

() => object

string

CloudflareDeployment

readonly key: "deployment"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:18

The capability this class provides, always "deployment".

Deployment.key


readonly providerName: "cloudflare" = "cloudflare"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:20

The provider name, "cloudflare".

Deployment.providerName

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.

string

string[]

Promise<number>

Deployment.deletePreviewDeployments


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().

string

string

Promise<DnsRecordRequest | null>

Deployment.ensureCustomDomain


ensureProject(input): Promise<DeploymentProject>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:35

Create if missing, otherwise return existing. Idempotent.

string

string

string

string

Promise<DeploymentProject>

Deployment.ensureProject


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.

string

Promise<DeploymentRecord>

Deployment.getDeployment


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.

string

Promise<DeploymentRecord | null>

Deployment.latestDeployment


listDomains(projectId): Promise<string[]>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:148

The hostnames attached to the Pages project. Reads only.

string

Promise<string[]>

Deployment.listDomains


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.

string

DeploymentTarget

Promise<string[]>

Deployment.listEnvVars


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.

string

string

Promise<DeploymentRecord[]>

Deployment.listPreviewDeployments


listProjects(): Promise<DeploymentProject[]>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/deployment.ts:30

Lists the account’s Pages projects.

Promise<DeploymentProject[]>

Deployment.listProjects


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.

string

DeploymentTarget

string

string

Promise<void>

Deployment.setEnvVar


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.

string

string

DeploymentTrigger

Promise<DeploymentRecord>

Deployment.triggerDeployment


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.

string

DeploymentProjectSettings

Promise<DeploymentProject>

Deployment.updateProjectSettings