/**
 * Assemble the remote deploy script for a Forge-style PHP/Laravel site: a
 * git-clone-on-server, zero-downtime atomic-release deploy.
 *
 * The deploy script is a list of steps run in order on the box. Three Forge
 * macros expand to the release machinery:
 *   $CREATE_RELEASE   — clone the repo into a new release dir, link shared
 *                       paths, and `cd` into it (subsequent steps run there).
 *   $ACTIVATE_RELEASE — flip the `current` symlink atomically, prune old
 *                       releases, and reload php-fpm so opcache sees new code.
 *   $RESTART_QUEUES   — gracefully restart Laravel queue workers / Horizon.
 *
 * Everything between $CREATE_RELEASE and $ACTIVATE_RELEASE runs inside the new
 * (not-yet-live) release, so a failure leaves the previous release serving —
 * the Envoyer zero-downtime guarantee.
 */
import type { SiteConfig, SiteCredentialsConfig } from '@ts-cloud/core';
export declare const MACRO_CREATE_RELEASE = "$CREATE_RELEASE";
export declare const MACRO_ACTIVATE_RELEASE = "$ACTIVATE_RELEASE";
export declare const MACRO_RESTART_QUEUES = "$RESTART_QUEUES";
/**
 * Default deploy script (with macros) for a site type. Overridden by
 * {@link SiteConfig.deployScript}.
 */
export declare function defaultDeployScriptFor(type: NonNullable<SiteConfig['type']>): string[];
export interface LaravelDeployOptions {
    siteName: string;
    site: SiteConfig;
    /** Unique release identifier (timestamp or sha) → `releases/<id>`. */
    releaseId: string;
    /** Site base dir. @default `/var/www/<siteName>` */
    appBase?: string;
    /** Exact commit to deploy (else the branch tip). */
    commit?: string;
    /** PHP version selecting the `phpX.Y` binary. @default `site.phpVersion` ?? '8.3' */
    defaultPhpVersion?: string;
}
/**
 * Write private-registry credential files into the release before build:
 * Composer `auth.json` and/or `.npmrc`. Quoted heredocs keep tokens literal.
 */
export declare function buildCredentialFiles(releaseDir: string, creds?: SiteCredentialsConfig): string[];
/**
 * Post-deploy health check (Forge-style): once the release is live, hit the
 * site through nginx on localhost (with the site's `Host` header) and fail the
 * deploy if it doesn't return 2xx/3xx within a few retries. A redirect (e.g.
 * the certbot HTTP→HTTPS 301) counts as healthy — nginx is up and routing.
 * Returns `[]` when no `healthCheck.path` (or domain) is configured.
 */
export declare function buildHealthCheckScript(site: SiteConfig): string[];
/**
 * Build the full remote shell script for a PHP/Laravel git deploy, expanding the
 * release macros. Requires `site.repository` to be set.
 */
export declare function buildLaravelDeployScript(options: LaravelDeployOptions): string[];
