import { CapabilityExport } from "../../lib/types"; import { BuildOptions, BuildContext } from "esbuild"; import { Assets } from "../../lib/assets/assets"; import { Reloader } from "../types"; /** * Check if a file exists at a given path. * * @param filePath - Path to the file (relative or absolute). * @returns true if the file exists, false otherwise. */ export declare function fileExists(entryPoint?: string): string; /** * Determine the module format based on package.json "type" field. * * @param packageJsonPath - Path to the package.json file for auto-detection * @returns "cjs" or "esm" */ export declare function determineModuleFormat(packageJsonPath: string): "cjs" | "esm"; interface ImageOptions { customImage?: string; registryInfo?: string; peprVersion?: string; registry?: string; } /** * Assign image string * @param imageOptions CLI options for image * @returns image string */ export declare function assignImage(imageOptions: ImageOptions): string; /** * Determine the RBAC mode based on the CLI options and the module's config * @param opts CLI options * @param cfg Module's config * @returns The determined RBAC mode * @example * const opts = { rbacMode: "admin" }; * const cfg = { pepr: { rbacMode: "scoped" } }; * const result = determineRbacMode(opts, cfg); * console.log(result); // "admin" */ export declare function determineRbacMode(opts: { rbacMode?: string; }, cfg: { pepr: { rbacMode?: string; }; }): string; /** * Handle the custom output directory * @param outputDir the desired output directory * @returns The desired output directory or the default one */ export declare function createOutputDirectory(outputDir: string): Promise; /** * Check if the image is from Iron Bank and return the correct image * @param registry The registry of the image * @param image The image to check * @param peprVersion The version of the Pepr controller * @returns The image string * @example */ export declare function checkIronBankImage(registry: string, image: string, peprVersion: string): string; /** * Check if the image pull secret is a valid Kubernetes name * @param imagePullSecret * @returns boolean */ export declare function validImagePullSecret(imagePullSecretName: string): boolean; /** * Creates and pushes a custom image for WASM or any other included files * @param includedFiles * @param peprVersion * @param description * @param image */ export declare function handleCustomImageBuild(includedFiles: string[], peprVersion: string, description: string, image: string): Promise; /** * Check if the capability names are valid * @param capabilities The capabilities to check */ export declare function handleValidCapabilityNames(capabilities: CapabilityExport[]): void; /** * Watch for changes in the module * @param ctxCfg The build options * @param reloader The reloader function * @returns The build context */ export declare function watchForChanges(ctxCfg: BuildOptions, reloader: Reloader | undefined): Promise>; export declare function generateYamlAndWriteToDisk(obj: { uuid: string; imagePullSecret: string; outputDir: string; assets: Assets; zarf: string; }): Promise; export {}; //# sourceMappingURL=build.helpers.d.ts.map