import { LoadProductConfigOptions, LoadedProductConfig } from './config-load.js'; import { ProductConfig } from './types.js'; /** * Frontloaded product-manifest preflight. * * The deploy CLI historically loaded + validated the product config only in * the post-deploy manifest-publish step — so an invalid config (bad `domain`, * oversized text record, missing icon/executable file) surfaced *after* * preflight and a full merkleize/upload (see paritytech/polkadot-app-deploy#125). * * This runs all the pure/local manifest checks up front, before any storage or * chain work, so config errors fail fast with one aggregated message: * 1. discover + load the config (schema validation, incl. `domain` ending * in `.dot`, via `loadProductConfig`), * 2. byte-budget preflight for every text record (`pessimisticSizePreflight`), * 3. the referenced icon file + every executable path exist on disk. * * Returns the loaded+validated config so the caller can reuse it (no double * load), or `null` when no config is applicable (opt-in manifest mode). */ /** * Check that every file a product config references exists on disk, resolved * relative to the config's own directory. Returns a list of human-readable * error strings (empty when everything is present). The icon must be a regular * file; an executable path may be a file or a directory (a build dir). */ declare function checkProductConfigFilesExist(config: ProductConfig, configDir: string): Promise; /** * Materialize each App v2 manifest inside its executable directory before the * directory is content-addressed. The config object is the single source of * truth; the same JSON.stringify bytes are later written to DotNS. */ declare function writeEmbeddedAppManifests(config: ProductConfig, configDir: string): Promise; /** Fail closed if an App v2 artifact no longer contains the configured bytes. */ declare function verifyEmbeddedAppManifests(config: ProductConfig, configDir: string): Promise; /** * Run the full local manifest preflight. Throws a single aggregated * `NonRetryableError` on any schema / byte-budget / missing-file problem. * Returns the loaded config (reusable by the publish step) or `null` when no * product config is present. */ declare function preflightProductConfig(options?: LoadProductConfigOptions): Promise; export { checkProductConfigFilesExist, preflightProductConfig, verifyEmbeddedAppManifests, writeEmbeddedAppManifests };