Skip to content

backend

@fungi.computer/app-release


@fungi.computer/app-release / backend

const durableBackendSchema: Struct<{ runtime: Struct<{ kind: Literal<["durable-facet"]>; stateSchema: filter<filter<typeof Number$>>>>; }>; compatibilityDate: filter<typeof String$>>; exportName: filter<typeof String$>>; code: filter<typeof String$>>; }>

This immutable descriptor is stored inside the verified Release artifact.


const backendMediaType: "application/vnd.fungi.app-backend+json"

Content type separating executable backend artifacts from website HTML.


const backendJsonSchema: transform<SchemaClass<unknown, string, never>>, Struct<{ runtime: Struct<{ kind: Literal<["durable-facet"]>; stateSchema: filter<filter<typeof Number$>>>>; }>; compatibilityDate: filter<typeof String$>>; exportName: filter<typeof String$>>; code: filter<typeof String$>>; }>>

Maintained JSON codec for immutable backend bytes.

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.

Pick<AppReleaseCore, "resolveEligibleApp">

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