export type Provided = { ecosystem: string; contentType: string; content: string; }; export type Provider = { isSupported: Function; (string: any): boolean; validateLockFile: Function; (string: any, Object: any): void; provideComponent: Function; (string: any, {}: {}): Provided | Promise; provideStack: Function; (string: any, {}: {}): Provided | Promise; readLicenseFromManifest: Function; (string: any, Object?: any): string | null; packageManagerName: Function; (): string; }; /** @typedef {{ecosystem: string, contentType: string, content: string}} Provided */ /** @typedef {{isSupported: function(string): boolean, validateLockFile: function(string, Object): void, provideComponent: function(string, {}): Provided | Promise, provideStack: function(string, {}): Provided | Promise, readLicenseFromManifest: function(string, Object=): string | null, packageManagerName: function(): string}} Provider */ /** * MUST include all providers here. * @type {[Provider]} */ export declare const availableProviders: [Provider]; /** * Match a provider by manifest type only (no lock file check). Used for license reading. * @param {string} manifestPath - path or name of the manifest * @param {[Provider]} providers - list of providers to iterate over * @returns {Provider} * @throws {Error} when the manifest is not supported and no provider was matched */ export declare function matchForLicense(manifestPath: string, providers: [Provider]): Provider; /** * Match a provider from a list or providers based on file type. * Each provider MUST export 'isSupported' taking a file name-type and returning true if supported. * Each provider MUST export 'provideComponent' taking manifest data returning a {@link Provided}. * Each provider MUST export 'provideStack' taking manifest path returning a {@link Provided}. * @param {string} manifest - the name-type or path of the manifest * @param {[Provider]} providers - list of providers to iterate over * @param {{TRUSTIFY_DA_WORKSPACE_DIR?: string}} [opts={}] - optional; TRUSTIFY_DA_WORKSPACE_DIR overrides lock file location for workspaces * @returns {Provider} * @throws {Error} when the manifest is not supported and no provider was matched */ export declare function match(manifest: string, providers: [Provider], opts?: { TRUSTIFY_DA_WORKSPACE_DIR?: string; }): Provider;