Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides some utility functions.

Hierarchy

  • Utils

Index

Constructors

Methods

  • convertStreamToString(stream: Readable): Promise<string>
  • Converts a stream to a string.

    Parameters

    • stream: Readable

      The stream to be converted.

    Returns Promise<string>

    The converted stream as a string.

  • exec(command: (() => Promise<string | void>)): Promise<void>
  • Executes a command and suppresses errors if they are thrown.

    Parameters

    • command: (() => Promise<string | void>)

      Command to be executed.

        • (): Promise<string | void>
        • Returns Promise<string | void>

    Returns Promise<void>

  • getCurrDate(): string
  • Gets the current date formatted as yyyy-mm-dd.

    Returns string

    date in fomat yyyy-mm-dd.

  • parseConventionalCommits(commitMessages: string[], conventionalCommitConfig?: Options): Promise<GitLog[]>
  • Parses conventional commit messages to a GitLog array.

    Parameters

    • commitMessages: string[]

      The commit messages.

    • Optional conventionalCommitConfig: Options

      The configuration of the conventional commit parser.

    Returns Promise<GitLog[]>

    The parsed conventional commit messages as an array of [[GitLogs]].

  • parseConventionalCommitsViaPipe(conventionalCommitConfig?: Options): Transform
  • Parses conventional commit messages via a stream.Transform pipe.

    Parameters

    • Optional conventionalCommitConfig: Options

      The configuration of the conventional commit parser.

    Returns Transform

    The parsed conventional commit messages as transformed stream.

  • pipe(src: Readable, dest: Writable, destroy?: boolean): Promise<void>
  • Pipes a readable stream asynchrounously to a writable stream with error handling.

    Parameters

    • src: Readable

      The readable source stream.

    • dest: Writable

      The writable destination stream.

    • destroy: boolean = true

      Specifies if the streams should be destroyed on finish.

    Returns Promise<void>

    Promise on copying stream properly.

  • Prints the branches or tags to the console.

    Parameters

    • gitFlowEntity: GitFlowEntity<unknown>

      The git flow entity to be printed.

    Returns Promise<void>

  • printConfig(gitFlow: GFlow): Promise<void>
  • Prints the config to the console.

    Parameters

    • gitFlow: GFlow

      The git flow instance the config should be printed.

    Returns Promise<void>