vag_tools - v0.1.1
    Preparing search index...

    Class Vag

    A class that contains a list of configured repositories, a list of discovered repositories and methods that use those two lists.

    Index

    Constructors

    • The constructor of the Vag class. listD is initialized to an empty list. listC is initialized to an empty object.

      Parameters

      • discoverDir: string = '.'
      • deepSearch: boolean = true
      • importYaml: string = ''
      • importDir: string = ''

      Returns Vag

    Properties

    deepSearch: boolean

    When a repository is encountered, should it be inspected for searching sub-repositories?

    discoverDir: string

    The top directory from where to search repositories.

    importDir: string

    The base directory where the directories listed in the yaml-file should be cloned.

    importYaml: string

    The path to the yaml-file that provides the repositories to be cloned.

    listC: tListC

    An object with the content of the yaml-file. It is populated by the init() method.

    listD: string[]

    The list of the path of the discovered repositories. It is populated by the init() method.

    Methods

    • Clone the repositories of listC.

      Returns Promise<number>

    • List the wished repositories (a.k.a. configured repositories).

      Returns string[]

    • Checkout the repositories listed in listC and listD.

      Returns Promise<number>

    • List the git-repos which are in the D-list and in the C-list. I.e. Intersection of D and C.

      Returns string[]

    • For the repositories listed in listC and listD, verify if they fit with the configuration of Yaml-file.

      Returns Promise<number>

    • List the git-repos which are in the C-list but not in the D-list. I.e. C not D.

      Returns string[]

    • Show the current branch of the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-clean -dxf on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Run a custom git-command on the discoverd repositories (listD).

      Parameters

      • git_command: string
      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-diff on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Export in a Yaml-file the list of discoverd repositories (listD).

      Parameters

      • yamlPath: string
      • commit_version: boolean = false

      Returns Promise<number>

    • Git-fetch on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • List the discovered repositories.

      Returns string[]

    • Git-log -n 3 on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-pull on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-push on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-remote -vv on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-stash list on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Git-status on the discoverd repositories (listD).

      Parameters

      • only_configured_repo: boolean = false

      Returns Promise<number>

    • Parameters

      • discoverDir: string = ...
      • deepSearch: boolean = ...

      Returns Promise<number>

    • List the git-repos which are in the D-list but not in the C-list. I.e. D not C.

      Returns string[]

    • Parameters

      • importYaml: string = ...
      • importDir: string = ...

      Returns Promise<number>

    • The init method populate populate listD and listC. It must be called just after instanciating Vag. The configuration properties discoverDir, deepSearch, importYaml and importDir can be reassinged by init.

      Parameters

      • discoverDir: string = ...
      • deepSearch: boolean = ...
      • importYaml: string = ...
      • importDir: string = ...

      Returns Promise<number>

    • Validate a yaml-file that could be imported later on.

      Parameters

      • yamlPath: string

        the path to the yaml-file to be checked/validated.

      Returns Promise<number>

      an integer-code. 0 if the validation is successful, negative otherwise.

    • Return a string with the three numbers (major, minor, patch) written in the package.json.

      Returns string

      the string Major.Minor.Patch