/** * Release Asset Manifest — production CSS compiler. * * Provides the `compileProjectCss` implementation injected into the build * executor's client. It compiles project CSS directly through the * provider-neutral compiler (`generateCSS`) against the candidates the executor * extracted from the materialized release file set, using the project * stylesheet the executor resolved from that same file set. * * Why this is safe to run inside the project runtime: * - It uses `generateCSS`, NOT `getProjectCSS`. `getProjectCSS` pulls in * the distributed/project-CSS cache (`initializeProjectCSSCache`, * prepared-project-css, style-artifact resolution) — the very machinery whose * per-route candidate contract and distributed-cache init motivated deferring * CSS from the builder. `generateCSS` is the pure compile primitive: * it resolves the explicitly composed `CSSProcessor` extension and calls * `compiler.build(candidates)` with no cross-request/distributed state. * - Work is bounded: one compile over the candidate set the executor already * gathered, no background tasks. * - Configuration and compile failures propagate; a release must not publish * a silent CSS gap. * * Minification is requested, not required. `CSSOptimizationEngine` ships only * in `@veryfront/ext-css-lightning`, which `first-party-defaults.ts` marks * `selection: "explicit"`. A scaffolded project has no optimiser, so a * release that asks for minification and gets none is the normal case, not an * outage. `acquireCSSGenerationSession` degrades to unminified output and * records that in `cacheIdentity`, which travels into the manifest as * `cssPipelineIdentity`; nothing downstream assumes minified bytes, and no * cache can serve a stale minified entry in its place. A *missing optional * capability* is a skip; a *failing* one still fails the release. * * @module release-assets/css-compile */ import type { VeryfrontConfig } from "../config/index.js"; /** Successful bounded CSS compilation output. */ export interface CompileProjectCssResult { readonly css: string; readonly styleProfileHash: string; readonly cssPipelineIdentity: string; } /** Configuration captured by a release-scoped CSS compiler. */ export interface CompileProjectCssOptions { /** Project scope (slug or id) — isolates the compiler cache per project. */ projectScope: string; } /** Per-build configuration resolved from the materialized release. */ export interface CompileProjectCssRuntimeOptions { /** Validated project config resolved from the exact materialized release. */ config: VeryfrontConfig; } /** * Build a `compileProjectCss` function bound to a specific release build. * * The returned function matches the build executor's injected client signature: * `(candidates, stylesheet, options) => Promise<{ css, styleProfileHash, * cssPipelineIdentity } | null>`. * The factory rejects invalid configuration synchronously. The returned * function returns `null` only when there is no stylesheet and no candidate; * malformed input and compile failures reject. */ export declare function createCompileProjectCss(options: CompileProjectCssOptions): (candidates: Set, stylesheet: string | undefined, runtimeOptions: CompileProjectCssRuntimeOptions) => Promise; //# sourceMappingURL=css-compile.d.ts.map