/** * Resolve first-party extension implementations without making the root npm * package statically depend on every extension dependency. * * Source and compiled-binary builds can load the workspace extension sources. * npm builds should load the separate @veryfront/ext-* packages installed by * the consuming service or app. */ /** Optional non-root entry point for a first-party extension import. */ export interface FirstPartyExtensionImportOptions { /** * Workspace source entry below the extension's `src/` directory, without * an extension. Supply it together with `packageSubpath`; both values must * name the same relative entry. When both are omitted, the workspace * `index` entry and npm package root are used. */ readonly sourceEntry?: string; /** * Published npm package subpath, without a leading `./` or `/`. * Supply it together with `sourceEntry` using the same value. When both are * omitted, the package root is used. */ readonly packageSubpath?: string; } export declare function firstPartyExtensionSourceSpecifiers(sourceDirectory: string, sourceEntry?: string): string[]; export declare function importFirstPartyExtensionModule(sourceDirectory: string, packageName: string, options?: FirstPartyExtensionImportOptions): Promise; /** * Classify a dynamic-import failure as "the extension module itself is not * installed" as opposed to a real load failure inside an installed extension. * * Checks the stable `error.code` first and falls back to message patterns, * walking the `cause` chain so wrapped errors classify like their root cause. * * When `expectedSpecifierFragments` is provided, package specifiers and * absolute/file paths match exactly. Safe relative multi-segment path * fragments match only as complete path suffixes, with an optional emitted * `.ts` or `.js` extension. Every recognized missing-module error in the * cause chain must agree. This keeps a broken transitive dependency (e.g. * `Cannot find package 'jose'` thrown while loading an installed * @veryfront/ext-auth-jwt) from being misread as "extension not installed". */ export declare function isMissingFirstPartyExtensionModule(error: unknown, expectedSpecifierFragments?: string[]): boolean; //# sourceMappingURL=first-party-import.d.ts.map