/** * Resolve a VAT "asset reference" to an absolute filesystem path. * * An asset reference is either: * - A filesystem path (relative to baseDir, or absolute), OR * - An npm bare specifier (`@scope/pkg/subpath` or `pkg/subpath`), * resolved via Node module resolution from baseDir, honoring the * target package's `exports` map. * * Bare specifiers let VAT consumers reference schemas (and future * config-supplied files) published as npm packages without hardcoding * the package's internal layout. The publisher's `exports` field owns * the layout; consumers stay portable. * * NOTE: this is a VAT-internal abstraction for locating files. It is NOT * an RFC 3986 URI reference and is intentionally NOT used by markdown link * walkers (including the `format: "uri-reference"` frontmatter checker) — * bare specifiers are not valid URIs and would not resolve in a renderer. * * @example * resolveAssetReference('@scope/pkg/schemas/foo.json', '/proj') * // -> '/proj/node_modules/@scope/pkg/dist/schemas/foo.json' (per the * // package's exports map) * resolveAssetReference('./schemas/foo.json', '/proj') * // -> '/proj/schemas/foo.json' * resolveAssetReference('/abs/foo.json', '/proj') * // -> '/abs/foo.json' * * @param specifier - The asset reference (path or bare npm specifier) * @param baseDir - Absolute directory used as the resolution anchor * @returns Absolute filesystem path to the asset * @throws Error with actionable message and `cause` on resolution failure */ export declare function resolveAssetReference(specifier: string, baseDir: string): string; //# sourceMappingURL=asset-reference.d.ts.map