Skip to content

HttpRegistry

PromptScript API


Defined in: resolver/src/registry.ts:130

Registry implementation backed by HTTP.

Implements

Constructors

Constructor

new HttpRegistry(options): HttpRegistry

Defined in: resolver/src/registry.ts:140

Parameters

options

HttpRegistryOptions

Returns

HttpRegistry

Methods

clearCache()

clearCache(): void

Defined in: resolver/src/registry.ts:344

Clear the cache.

Returns

void


exists()

exists(path): Promise<boolean>

Defined in: resolver/src/registry.ts:306

Check if a file exists in the registry.

Parameters

path

string

Path to check

Returns

Promise<boolean>

True if the file exists

Implementation of

Registry.exists


fetch()

fetch(path): Promise<string>

Defined in: resolver/src/registry.ts:273

Fetch the content of a file from the registry.

Parameters

path

string

Path to the file (relative to registry root)

Returns

Promise<string>

File content as string

Throws

FileNotFoundError if the file doesn’t exist

Implementation of

Registry.fetch


list()

list(path): Promise<string[]>

Defined in: resolver/src/registry.ts:319

List files in a directory.

Parameters

path

string

Directory path

Returns

Promise<string[]>

Array of file/directory names

Implementation of

Registry.list