import { Model } from "@anz-bank/sysl/model"; import { SemVer } from "semver"; /** The possible Sysl protobuf representations. */ export type ProtobufMode = "json" | "pb" | "textpb"; export type ImportOptions = { "app-name"?: string; output?: string; package?: string; format?: string; "import-paths"?: string[]; }; /** A wrapper around a Sysl executable to perform operations on sources. */ export declare class Sysl { /** The path to the Sysl executable to use. */ readonly path: string; /** Memoized {@link spawnBuffer}. */ private readonly memoSpawn; constructor(path: string); /** * Returns true if Sysl debugging is enabled. * * Sysl debug is enabled if the {@code SYSL_DEBUG} env var is anything other than "" or "off". */ static isDebugEnabled(): boolean; /** Returns a protobuf message representing the compiled content of source. */ protobufModuleFromSource(source: string, sourcePath: string): Promise; /** Returns a protobuf message representing the compiled content of source. */ modelFromSource(source: string, sourcePath: string): Promise; /** Returns a protobuf message representing the compiled content of the spec at modelPath. */ protobuf(modelPath: string, mode?: ProtobufMode): Promise; /** Returns a protobuf message representing the compiled content of source. */ protobufFromSource(source: string, sourcePath: string, mode?: ProtobufMode): Promise; /** Returns the output of sysl transform on a model using a script. */ transformSource(modelPath: string, scriptPath: string, syslSource: string): Promise; /** Returns the output of sysl transform on a model using a script. */ transformSourceBuffer(modelPath: string, scriptPath: string, syslSource: string): Promise; /** Imports the {@code input} file to a Sysl spec. */ import(input: string, options?: ImportOptions): Promise; /** Returns the version of Sysl, or undefined if the version cannot be determined. */ version(): Promise; /** Returns the semantic version of Sysl extracted from the version code in info output. */ semver(): Promise; /** Returns the string to pass to stdin for Sysl to process the content at path. */ private toStdin; }