Skip to content

PromptScript API


Function: findRegistryEntry()

findRegistryEntry(repoUrl, registries): RegistryAliasEntry | undefined

Defined in: resolver/src/alias-resolver.ts:259

Find the extended registry entry for a given repository URL.

Used when only the expanded repoUrl is available (from a registry marker) and the per-entry settings (e.g. timeout) are still needed.

Parameters

repoUrl

string

The primary repository URL to look up

registries

RegistriesConfig

Registry alias configuration to search

Returns

RegistryAliasEntry | undefined

The extended entry if found, or undefined (simple string entries and URL mismatches both return undefined)

Example

findRegistryEntry('https://gitlab.com/company/monorepo.git', {
  '@internal': { url: 'https://gitlab.com/company/monorepo.git', timeout: 600000 },
});
// { url: 'https://gitlab.com/company/monorepo.git', timeout: 600000 }