UNPKG

1.24 kBTypeScriptView Raw
1import { ApplicationWithRepositories } from '@loopback/repository';
2import { ArtifactOptions } from '../types';
3import { BaseArtifactBooter } from './base-artifact.booter';
4/**
5 * A class that extends BaseArtifactBooter to boot the 'Repository' artifact type.
6 * Discovered repositories are bound using `app.repository()` which must be added
7 * to an Application using the `RepositoryMixin` from `@loopback/repository`.
8 *
9 * Supported phases: configure, discover, load
10 *
11 * @param app - Application instance
12 * @param projectRoot - Root of User Project relative to which all paths are resolved
13 * @param bootConfig - Repository Artifact Options Object
14 */
15export declare class RepositoryBooter extends BaseArtifactBooter {
16 app: ApplicationWithRepositories;
17 repositoryOptions: ArtifactOptions;
18 constructor(app: ApplicationWithRepositories, projectRoot: string, repositoryOptions?: ArtifactOptions);
19 /**
20 * Uses super method to get a list of Artifact classes. Boot each class by
21 * binding it to the application using `app.repository(repository);` if present.
22 */
23 load(): Promise<void>;
24}
25/**
26 * Default ArtifactOptions for RepositoryBooter.
27 */
28export declare const RepositoryDefaults: ArtifactOptions;