/** * Decide where compression runs (and whether it runs at all). * * - `"cloud"`: a Needle Cloud access token is available AND the user did not opt into * local compression. This is the default whenever authenticated. * - `"local"`: the user set `buildPipeline.compression: "local"` (forces local even * when a token is set — the token is still used to authenticate the license), OR * there is no token and we're not in a CI context that requires one. * - `"skip-no-token"`: a build pipeline is configured but there's no token, the user * did NOT explicitly choose local, and we're in CI — caller should warn and skip * (cloud was the implied intent and can't run without a token). * * @param {import('../types').userSettings | undefined | null} opts * @param {{ isCI?: boolean, cloudToken?: string }} [env] `cloudToken` is the NEEDLE_CLOUD_TOKEN * env var fallback, used when `buildPipeline.accessToken` isn't set in the vite config. * @returns {"cloud" | "local" | "skip-no-token"} */ export function resolveCompressionTarget(opts: import("../types").userSettings | undefined | null, env?: { isCI?: boolean; cloudToken?: string; }): "cloud" | "local" | "skip-no-token"; /** * This function can be used by other plugins to wait for the build pipeline to finish before doing some work in the closeBundle hook. * This event is triggered *after* the build pipeline has finished all its work AND the results have been copied to their final output directory. */ export function waitForBuildPipelineToFinish(): Promise; export function waitForBuildPipelineCopyToFinish(): Promise; /** * Delete the source files the build pipeline reported as replaced. Only paths inside * `outputDir` are ever removed — the pipeline reports the sources it read from there, * but a containment check keeps this safe against unexpected layouts. * @param {string} outputDir * @param {Iterable} absolutePaths */ export function removeReportedReplacedSources(outputDir: string, absolutePaths: Iterable): void; /** Runs the needle build pipeline as part of the vite build process. * @param {"build" | "serve"} command * @param {import('../types/needleConfig').needleMeta | null | undefined} config * @param {import('../types').userSettings} userSettings * @returns {import('vite').Plugin} */ export function needleBuildPipeline(command: "build" | "serve", config: import("../types/needleConfig").needleMeta | null | undefined, userSettings: import("../types").userSettings): import("vite").Plugin; export type BuildPipelinePayload = { event?: string; phase?: string; target?: string; replacement?: string; message?: string; level?: string; };