Skip to main content

Class: GitModuleSource

Module source originating from a git repo.

Extends

  • BaseClient

Constructors

new GitModuleSource()

new GitModuleSource(parent?, _id?, _cloneRef?, _commit?, _htmlRepoURL?, _htmlURL?, _root?, _rootSubpath?, _version?): GitModuleSource

Constructor is used for internal usage only, do not create object from it.

Parameters

parent?

parent.ctx?: Context

parent.queryTree?: QueryTree[]

_id?: GitModuleSourceID

_cloneRef?: string

_commit?: string

_htmlRepoURL?: string

_htmlURL?: string

_root?: string

_rootSubpath?: string

_version?: string

Returns

GitModuleSource

Overrides

BaseClient.constructor

Methods

cloneRef()

cloneRef(): Promise<string>

The ref to clone the root of the git repo from

Returns

Promise<string>


commit()

commit(): Promise<string>

The resolved commit of the git repo this source points to.

Returns

Promise<string>


contextDirectory()

contextDirectory(): Directory

The directory containing everything needed to load load and use the module.

Returns

Directory


htmlRepoURL()

htmlRepoURL(): Promise<string>

The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket)

Returns

Promise<string>


htmlURL()

htmlURL(): Promise<string>

The URL to the source's git repo in a web browser

Returns

Promise<string>


id()

id(): Promise<GitModuleSourceID>

A unique identifier for this GitModuleSource.

Returns

Promise<GitModuleSourceID>


root()

root(): Promise<string>

The clean module name of the root of the module

Returns

Promise<string>


rootSubpath()

rootSubpath(): Promise<string>

The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory).

Returns

Promise<string>


version()

version(): Promise<string>

The specified version of the git repo this source points to.

Returns

Promise<string>