import { BasePluginArgs, BuildPlugin, BuildPluginConfig } from "@hot-updater/plugin-core"; //#region src/bare.d.ts interface BarePluginConfig extends BuildPluginConfig { /** * @default "index.js" * The entry file to bundle. */ entryFile?: string; /** * @default false * Whether to generate sourcemap for the bundle. */ sourcemap?: boolean; /** * Whether to use Hermes to compile the bundle * Since React Native v0.70+, Hermes is enabled by default, so it's recommended to enable it. * @link https://reactnative.dev/docs/hermes * @recommended true */ enableHermes: boolean; /** * @default true * Whether to reset the Metro cache before bundling. */ resetCache?: boolean; } declare const bare: (config: BarePluginConfig) => ({ cwd }: BasePluginArgs) => BuildPlugin; //#endregion //#region src/hermes.d.ts /** * Finds the Hermes command. * If Hermes is bundled with react-native, returns the hermesc path. * Otherwise, returns the path from node_modules/hermes-engine or hermesvm. * * @returns Full path to the Hermes executable */ declare function getHermesCommand(cwd: string): Promise; /** * Compiles a JS bundle into an HBC file using the Hermes compiler, * and merges the source maps if enabled. * * @param cwd - The current working directory * @param inputJsFile - Path to the input JS file * @param sourcemap - (Optional) Final sourcemap file path * @returns The full path to the compiled HBC file */ declare function compileHermes({ cwd, sourcemap, inputJsFile }: { cwd: string; sourcemap?: boolean; inputJsFile: string; }): Promise<{ hermesVersion: string; }>; //#endregion export { BarePluginConfig, bare, compileHermes, getHermesCommand };