Skip to main content

Class: LocalModuleSource

Module source that that originates from a path locally relative to an arbitrary directory.

Extends

  • BaseClient

Constructors

new LocalModuleSource()

new LocalModuleSource(parent?, _id?, _relHostPath?, _rootSubpath?): LocalModuleSource

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

Parameters

parent?

parent.ctx?: Context

parent.queryTree?: QueryTree[]

_id?: LocalModuleSourceID

_relHostPath?: string

_rootSubpath?: string

Returns

LocalModuleSource

Overrides

BaseClient.constructor

Methods

contextDirectory()

contextDirectory(): Directory

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

Returns

Directory


id()

id(): Promise<LocalModuleSourceID>

A unique identifier for this LocalModuleSource.

Returns

Promise<LocalModuleSourceID>


relHostPath()

relHostPath(): Promise<string>

The relative path to the module root from the host directory

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>