import * as cli from "@react-native-node-api/cli-utils"; import type { program } from "../cli.js"; type InferOptionValues = ReturnType; type BaseCommand = typeof program; type ExtendedCommand = cli.Command<[ ], Opts & InferOptionValues, Record>; export type BaseOpts = Omit, "triplet">; export type TripletContext = { triplet: Triplet; /** * Spawn a command in the context of this triplet */ spawn: Spawn; }; export type Spawn = (command: string, args: string[], cwd?: string) => Promise; export type Platform, Command = ExtendedCommand, Triplet extends string = Triplets[number]> = { /** * Used to identify the platform in the CLI. */ id: string; /** * Name of the platform, used for display purposes. */ name: string; /** * All the triplets supported by this platform. */ triplets: Readonly; /** * Get the limited subset of triplets that should be built by default for this platform. */ defaultTriplets(mode: "current-development" | "all"): Triplet[] | Promise; /** * Implement this to add any platform specific options to the command. */ amendCommand(command: BaseCommand): Command; /** * Check if the platform is supported by the host system, running the build. */ isSupportedByHost(): boolean | Promise; /** * Configure all projects for this platform. */ configure(triplets: TripletContext[], options: BaseOpts & Opts, spawn: Spawn): Promise; /** * Platform specific command to build a triplet project. */ build(context: TripletContext, options: BaseOpts & Opts): Promise; /** * Called to combine multiple triplets into a single prebuilt artefact. */ postBuild( /** * Location of the final prebuilt artefact. */ outputPath: string, triplets: TripletContext[], options: BaseOpts & Opts): Promise; }; export {}; //# sourceMappingURL=types.d.ts.map