@suluk/deploy - v0.1.4
    Preparing search index...

    Interface DeployInput

    @suluk/deploy — ship a Suluk app behind a SWAPPABLE target interface. A DeployProvider turns the app into the files + ordered steps that deploy it; the host (the vscode extension) runs the steps in a terminal after the user authenticates. Cloudflare is the first provider (Workers + D1 + static assets) — an adapter, since the stack is already Cloudflare-native (Hono=Workers, sqlite-core=D1, frontend=assets). CANDIDATE.

    interface DeployInput {
        name: string;
        entities: DeployEntity[];
        appModule?: string;
        assetsDir?: string;
        compatibilityDate?: string;
        preview?: boolean;
        previewRoles?: string[];
        durableObjects?: DurableObjectBinding[];
        prevDurableObjects?: DurableObjectBinding[];
        durableObjectMigrationTag?: string;
        prevDurableObjectMigrationTag?: string;
    }
    Index

    Properties

    name: string

    App name (slugified by the provider for resource names).

    entities: DeployEntity[]

    The data entities (for the database schema).

    appModule?: string

    Path, in the user's project, to the module exporting the Hono app (default "./src/app").

    assetsDir?: string

    Built frontend assets directory served as static files (default "./dist/client").

    compatibilityDate?: string

    Worker runtime compatibility date (default DEFAULT_COMPAT_DATE). Pass today's date in production.

    preview?: boolean

    Emit a PREVIEW deployment variant (charter-bounded role-preview): a ${slug}-preview Worker with the two fail-closed locks — a SULUK_PREVIEW="1" var + a PREVIEW_DB D1 binding on an isolated ${slug}-preview-db — plus a seed.sql with one throwaway demo user per role. Prod plans never set these.

    previewRoles?: string[]

    The roles to seed for a preview deployment (from the contract's User.role enum; cockpit threads them in).

    durableObjects?: DurableObjectBinding[]

    Durable Object classes to bind + migrate (the Cloudflare Agents SDK runtime surface). When present, the generated wrangler.jsonc gains a durable_objects.bindings block and an additive migrations entry that creates the SQLite-backed classes. Same-script classes only are migrated; a cross-script class (with scriptName) is bound but migrated by its OWNING script. Empty/absent ⇒ no DO output (unchanged plan).

    prevDurableObjects?: DurableObjectBinding[]

    The previously-deployed DO class set. When given, the generated migrations become an ADDITIVE 2-step history (recreate prev under prevDurableObjectMigrationTag, then create only the classes added since under the new tag) instead of a from-scratch first-deploy entry; a removed class is flagged in notes (never auto-dropped), and a class that changed storage backend (sqlite↔legacy) throws. Omit on a first deploy. NB this reconstructs at most a 2-step history — beyond one evolution the user owns the append-only migrations array.

    durableObjectMigrationTag?: string

    the migration tag for the DO classes above. Default "v1" on first deploy, "v2" when prevDurableObjects is given.

    prevDurableObjectMigrationTag?: string

    the tag the prevDurableObjects set was created under (default "v1") — the first step of the reconstructed history.