Skip to content
API reference

backend

Import
import * as api from "@fungi.computer/puffball/backend";
Kind Export Description
constant durableBackendSchema This immutable descriptor is stored inside the verified Release artifact.
constant backendMediaType Content type separating executable backend artifacts from website HTML.
constant backendJsonSchema Maintained JSON codec for immutable backend bytes.
function resolveDurableBackend() Resolve through catalog eligibility and digest verification before decoding code.

durableBackendSchemaconstant

Section titled “durableBackendSchema”
Signature
const durableBackendSchema: Struct<{
runtime: Struct<{
kind: Literal<"durable-facet">;
stateSchema: Number;
}>;
compatibilityDate: String;
exportName: String;
code: String;
}>;

This immutable descriptor is stored inside the verified Release artifact.


backendMediaTypeconstant

Section titled “backendMediaType”
Signature
const backendMediaType: "application/vnd.fungi.app-backend+json";

Content type separating executable backend artifacts from website HTML.


backendJsonSchemaconstant

Section titled “backendJsonSchema”
Signature
const backendJsonSchema: fromJsonString<
Struct<{
runtime: Struct<{
kind: Literal<"durable-facet">;
stateSchema: Number;
}>;
compatibilityDate: String;
exportName: String;
code: String;
}>
>;

Maintained JSON codec for immutable backend bytes.

resolveDurableBackend()function

Section titled “resolveDurableBackend()”
Signature
function resolveDurableBackend(
catalog,
releaseId,
): Effect<
{
release: Release;
digest: Sha256Digest;
backend: Readonly<{
runtime: Readonly<{
kind: "durable-facet";
stateSchema: number;
}>;
compatibilityDate: string;
exportName: string;
code: string;
}>;
},
AppReleaseCoreFailure,
never
>;

Resolve through catalog eligibility and digest verification before decoding code.

Parameter Type
catalog Pick<AppReleaseCore, "resolveEligibleApp">
releaseId ReleaseId

Effect<{ release: Release; digest: Sha256Digest; backend: Readonly<{ runtime: Readonly<{ kind: "durable-facet"; stateSchema: number; }>; compatibilityDate: string; exportName: string; code: string; }>; }, AppReleaseCoreFailure, never>

Re-exports DurableBackend