Skip to content

VendorRegistry

PromptScript API


Defined in: resolver/src/vendor-registry.ts:22

Registry that reads from a local vendor directory (e.g. .promptscript/vendor/). Used for offline/CI builds where network access is restricted. Takes priority over network registries when placed first in a CompositeRegistry.

Implements

Constructors

Constructor

new VendorRegistry(vendorDir): VendorRegistry

Defined in: resolver/src/vendor-registry.ts:23

Parameters

vendorDir

string

Returns

VendorRegistry

Methods

exists()

exists(path): Promise<boolean>

Defined in: resolver/src/vendor-registry.ts:51

Check if a file exists in the vendor directory.

Parameters

path

string

Path relative to the vendor directory

Returns

Promise<boolean>

True if the file exists

Implementation of

Registry.exists


fetch()

fetch(path): Promise<string>

Defined in: resolver/src/vendor-registry.ts:32

Fetch the content of a vendored file.

Parameters

path

string

Path relative to the vendor directory

Returns

Promise<string>

File content as string

Throws

FileNotFoundError if the file is not in the vendor directory

Implementation of

Registry.fetch


list()

list(path): Promise<string[]>

Defined in: resolver/src/vendor-registry.ts:66

List entries in a vendor subdirectory.

Parameters

path

string

Directory path relative to the vendor directory

Returns

Promise<string[]>

Array of entry names, or empty array if directory does not exist

Implementation of

Registry.list