UNPKG

plantuml-pipe

Version:

Generate multiple PlantUML diagrams with one JAVA process

60 lines (59 loc) 2.08 kB
/** * Options for a PlantUmlPipe. */ export type PlantUmlPipeOptions = { /** * Possible path to the plantuml.jar file to be used to generate diagrams. * @default "../vendor/plantuml.jar" */ jarPath?: string; /** * Output format for the generated diagrams. * @default "svg" */ outputFormat?: "latex" | "latex:nopreamble" | "pdf" | "png" | "svg" | "txt" | "utxt" | "vdx"; /** * Delimiter used in the output stream to separate diagrams. * @default "___PLANTUML_DIAGRAM_DELIMITER___" */ delimiter?: string; /** * If true, the output streams sends each diagram in its own chunk of buffer. * @default true */ split?: boolean; /** * The PlantUML include path where include files are looked for. * @default "." */ includePath?: string; /** * Sets the PLANTUML_LIMIT_SIZE variable specifying the maximum width and height of pixel graphic output. */ pixelCutOffValue?: number; /** * If true, in case of an error the data event is not going to contain an error image but only an error message. * @default false */ noErrorImages?: boolean; /** * A collection of options that are passed to the JAVA process. */ javaOptions?: ReadonlyArray<string>; /** * A collection of arguments that are passed to the PlantUML process. */ plantUmlArgs?: ReadonlyArray<string>; }; /** * Adds default values for missing option properties. * @param options The options whos missing properties are extended with default values. * @returns The options object in which every property has a value. */ export declare function addDefaultsToOptions(options: Readonly<PlantUmlPipeOptions>): Required<PlantUmlPipeOptions>; /** * Creates an array with command line arguments for the PlantUML JAVA process. * @param options The options from which the arguments are created. * @returns The command line arguments. */ export declare function createArgsFromOptions(options: Readonly<Required<PlantUmlPipeOptions>>): string[];