Skip to content
API reference

cloudflare

Import
import * as api from "@fungi.computer/burrow/cloudflare";
Kind Export Description
class ArtifactsForkStuckError A repository did not finish importing or forking within the readiness window.
type alias CloudflareArtifactsRepositoryHandle Repository handle accepted by the Cloudflare Artifacts namespace.
type alias CloudflareArtifactsRepositoryMetadata Provider identity recorded at creation; used to pin later remote access.
type alias CloudflareArtifactsRepositoryMetadataStore Host-owned durable metadata and pending initial-token revocation records.
type alias CloudflareArtifactsNamespace The maintained Cloudflare namespace methods used by this private adapter.
type alias CloudflareArtifactsRepositoryPage Repository listing page used to observe fork/import readiness.
type alias CloudflareArtifactsOptions Provider, durable metadata store and optional Git protocol transports.
function exchangeCloudflareArtifactsGit() Execute Git with an already-held repo credential. The custody owner chooses metadata and credential; caller URLs and authorization headers never enter.
function createCloudflareArtifacts() Configure the Artifacts owner once; provider remotes and credentials stay private.

A repository did not finish importing or forking within the readiness window.

  • Error
Signature
new ArtifactsForkStuckError(repository, status): ArtifactsForkStuckError;
Parameter Type
repository string
status "importing" | "forking" | "missing"

ArtifactsForkStuckError

Signature
Error.constructor;
Signature
readonly name: "ArtifactsForkStuckError" = "ArtifactsForkStuckError";
Signature
Error.name;
Signature
readonly repository: string;
Signature
readonly status: "importing" | "forking" | "missing";

CloudflareArtifactsRepositoryHandletype alias

Section titled “CloudflareArtifactsRepositoryHandle”
Signature
type CloudflareArtifactsRepositoryHandle = Readonly<{
info?: () => Promise<ArtifactsRepositoryInfo>;
createToken: Promise<
Readonly<{
id: string;
plaintext: string;
expiresAt: string;
}>
>;
revokeToken: Promise<boolean>;
fork: Promise<
Readonly<{
id: string;
name: string;
remote: string;
defaultBranch: string;
token: string;
}>
>;
}>;

Repository handle accepted by the Cloudflare Artifacts namespace.


CloudflareArtifactsRepositoryMetadatatype alias

Section titled “CloudflareArtifactsRepositoryMetadata”
Signature
type CloudflareArtifactsRepositoryMetadata = Readonly<{
id: string;
name: string;
defaultBranch: string;
remote: string;
parentRepository: string | null;
}>;

Provider identity recorded at creation; used to pin later remote access.


CloudflareArtifactsRepositoryMetadataStoretype alias

Section titled “CloudflareArtifactsRepositoryMetadataStore”
Signature
type CloudflareArtifactsRepositoryMetadataStore = Readonly<{
read: Promise<Readonly<{
id: string;
name: string;
defaultBranch: string;
remote: string;
parentRepository: string | null;
}> | null>;
readPending: Promise<Readonly<{
metadata: CloudflareArtifactsRepositoryMetadata;
initialToken: string;
}> | null>;
recordPending: Promise<void>;
activate: Promise<void>;
}>;

Host-owned durable metadata and pending initial-token revocation records.


CloudflareArtifactsNamespacetype alias

Section titled “CloudflareArtifactsNamespace”
Signature
type CloudflareArtifactsNamespace = Readonly<{
get: Promise<
Readonly<{
info?: () => Promise<ArtifactsRepositoryInfo>;
createToken: Promise<
Readonly<{
id: string;
plaintext: string;
expiresAt: string;
}>
>;
revokeToken: Promise<boolean>;
fork: Promise<
Readonly<{
id: string;
name: string;
remote: string;
defaultBranch: string;
token: string;
}>
>;
}>
>;
list: Promise<
Readonly<{
repos: readonly Readonly<{
name: string;
}>[];
total: number;
cursor?: string;
}>
>;
create: Promise<
Readonly<{
id: string;
name: string;
remote: string;
defaultBranch: string;
token: string;
}>
>;
}>;

The maintained Cloudflare namespace methods used by this private adapter.


CloudflareArtifactsRepositoryPagetype alias

Section titled “CloudflareArtifactsRepositoryPage”
Signature
type CloudflareArtifactsRepositoryPage = Readonly<{
repos: readonly Readonly<{
name: string;
}>[];
total: number;
cursor?: string;
}>;

Repository listing page used to observe fork/import readiness.


CloudflareArtifactsOptionstype alias

Section titled “CloudflareArtifactsOptions”
Signature
type CloudflareArtifactsOptions = Readonly<{
namespace: CloudflareArtifactsNamespace;
repositories: CloudflareArtifactsRepositoryMetadataStore;
gitHttp?: typeof http;
gitFetch?: typeof fetch;
}>;

Provider, durable metadata store and optional Git protocol transports.

exchangeCloudflareArtifactsGit()function

Section titled “exchangeCloudflareArtifactsGit()”
Signature
function exchangeCloudflareArtifactsGit(
metadata,
input,
credential,
gitFetch,
): Promise<Response>;

Execute Git with an already-held repo credential. The custody owner chooses metadata and credential; caller URLs and authorization headers never enter.

Parameter Type
metadata CloudflareArtifactsRepositoryMetadata
input GitExchange
credential string
gitFetch { (input, init?): Promise<Response>; (input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Promise<Response>


createCloudflareArtifacts()function

Section titled “createCloudflareArtifacts()”
Signature
function createCloudflareArtifacts(options): Artifacts;

Configure the Artifacts owner once; provider remotes and credentials stay private.

Parameter Type
options CloudflareArtifactsOptions

Artifacts