import { parsePlatform } from "@rnx-kit/tools-react-native/platform"; import { asBoolean, asNumber, asTransformProfile } from "../helpers/parsers.ts"; export const commonBundleCommandOptions = [ { name: "--id ", description: "Target bundle definition; only needed when the rnx-kit configuration has multiple bundle definitions", }, { name: "--entry-file ", description: "Path to the root JavaScript or TypeScript file, either absolute or relative to the package", }, { name: "--platform ", description: "Target platform; when unspecified, all platforms in the rnx-kit configuration are bundled", parse: parsePlatform, }, { name: "--dev [boolean]", description: "If false, warnings are disabled and the bundle is minified", default: true, parse: asBoolean, }, { name: "--minify [boolean]", description: "Controls whether or not the bundle is minified (useful for test builds)", parse: asBoolean, }, { name: "--bundle-output ", description: "Path to the output bundle file, either absolute or relative to the package", }, { name: "--bundle-encoding ", description: "Character encoding to use when writing the bundle file", default: "utf8", }, { name: "--max-workers ", description: "Specifies the maximum number of parallel worker threads to use for transforming files; defaults to the number of cores available on your machine", parse: asNumber, }, { name: "--sourcemap-output ", description: "Path where the bundle source map is written, either absolute or relative to the package", }, { name: "--sourcemap-sources-root ", description: "Path to use when relativizing file entries in the bundle source map", }, { name: "--sourcemap-use-absolute-path", description: "Report SourceMapURL using its full path", }, { name: "--assets-dest ", description: "Path where bundle assets like images are written, either absolute or relative to the package; if unspecified, assets are ignored", }, { name: "--unstable-transform-profile ", description: "[Experimental] Transform JS for a specific JS engine; currently supported: hermes, hermes-canary, default", parse: asTransformProfile, }, { name: "--reset-cache", description: "Reset the Metro cache", }, { name: "--config ", description: "Path to the Metro configuration file", }, ];