import type { Command } from '../types/index.js';
interface PackOptions {
    path?: string;
    'pack-destination'?: string;
    json?: boolean;
    'dry-run'?: boolean;
    'ignore-scripts'?: boolean;
}
interface PackResult {
    filename: string;
    name: string;
    version: string;
    size: number;
    unpackedSize: number;
    shasum: string;
    integrity: string;
    entryCount: number;
    files: {
        path: string;
        size: number;
        mode: number;
    }[];
    /** Absolute path of the written .tgz, or null on --dry-run. */
    absolutePath: string | null;
}
export declare const packCommand: Command<unknown, PackOptions>;
export interface PackWorkspaceOptions {
    /** Directory to write the .tgz into. Defaults to the workspace itself. */
    destination?: string;
    /** Skip writing the .tgz; metadata is still computed (for npm-compat callers). */
    dryRun?: boolean;
    /** Skip the workspace:^ rewrite step (rare — useful for testing the raw layout). */
    skipWorkspaceRewrite?: boolean;
    /**
     * Lifecycle scripts to run from `pkg.scripts` BEFORE the file collection
     * pass. Order matters — entries are executed sequentially, stopping on
     * the first failure.
     *
     * Defaults:
     *   - `['prepack']` from the `gjsify pack` CLI handler
     *   - `['prepublishOnly', 'prepack']` from `gjsify publish`
     *   - `[]` from programmatic callers that have already run scripts
     *
     * Mirrors `npm pack` / `npm publish` semantics. Pass `[]` (or set
     * `--ignore-scripts` on the CLI) to skip — useful when an outer
     * workflow has already produced the build artifacts.
     */
    lifecycleScripts?: readonly string[];
    /**
     * Stdio mode for lifecycle scripts. Default `'inherit'` — child output
     * appears in the parent's terminal. Pass `'inherit-stderr'` to redirect
     * the child's stdout → parent's stderr; used by `gjsify pack --json`
     * and `gjsify publish` so the parent's stdout stays a clean
     * machine-readable JSON stream.
     */
    lifecycleStdio?: 'inherit' | 'inherit-stderr' | 'pipe' | 'ignore';
}
/**
 * Programmatic equivalent of the `pack` command — used by `gjsify publish`
 * to avoid spawning a subprocess. Caller is responsible for resolving
 * `wsDir` to an absolute path.
 */
export declare function packWorkspace(wsDir: string, opts?: PackWorkspaceOptions): Promise<PackResult>;
export {};
