/** * Shape of config.server.ts exported from an MRT app. * Used to define ssrOnly, ssrShared, and ssrParameters for bundle creation. */ export interface MrtServerConfig { ssrOnly: string[]; ssrShared: string[]; ssrParameters?: Record; } export declare const DEFAULT_SSR_ONLY: string[]; export declare const DEFAULT_SSR_SHARED: string[]; /** * Default SSR parameters applied to all bundles. * These can be overridden by providing ssrParameters in CreateBundleOptions. */ export declare const DEFAULT_SSR_PARAMETERS: Record; /** * Configuration for bundle creation. */ export interface CreateBundleOptions { /** * Optional message describing the bundle. * Defaults to a git-based message or a timestamp. */ message?: string; /** * SSR parameters to include in the bundle. * These are configuration values for the SSR runtime. */ ssrParameters?: Record; /** * Glob patterns for files that should only run on the server. * If omitted, loaded from build/config.server.js if present. * @example ['ssr.js', 'ssr/*.js'] */ ssrOnly?: string[]; /** * Glob patterns for files shared between client and server. * If omitted, loaded from build/config.server.js if present. * @example ['static/**\/*', '**\/*.js'] */ ssrShared?: string[]; /** * Path to the build directory containing the application build output. * @default 'build' */ buildDirectory?: string; /** * Project slug for the MRT project. * Used to prefix files in the archive. */ projectSlug: string; } /** * A bundle ready for upload to Managed Runtime. */ export interface Bundle { /** * Message describing the bundle. */ message: string; /** * Encoding of the data field. */ encoding: 'base64'; /** * Base64-encoded tar archive of the build. */ data: string; /** * SSR parameters configuration. */ ssr_parameters: Record; /** * List of files that only run on the server. */ ssr_only: string[]; /** * List of files shared between client and server. */ ssr_shared: string[]; /** * Bundle metadata including dependencies. */ bundle_metadata?: Record; } /** * Creates a glob filter function from patterns. * * Patterns can include negations (prefixed with !). * A path matches if it matches any positive pattern * and does not match any negative pattern. * * @param patterns - Glob patterns to match against * @returns Filter function that returns true for matching paths */ export declare function createGlobFilter(patterns?: string[]): (path: string) => boolean; /** * Gets a default bundle message with timestamp. * * @returns A message like "Bundle 2025-01-15T10:30:00.000Z" */ export declare function getDefaultMessage(): string; export declare function createBundle(options: CreateBundleOptions): Promise;