UNPKG

1.13 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 'DataSource' artifact type.
6 * Discovered DataSources are bound using `app.dataSource()`.
7 *
8 * Supported phases: configure, discover, load
9 *
10 * @param app - Application instance
11 * @param projectRoot - Root of User Project relative to which all paths are resolved
12 * @param bootConfig - DataSource Artifact Options Object
13 */
14export declare class DataSourceBooter extends BaseArtifactBooter {
15 app: ApplicationWithRepositories;
16 datasourceConfig: ArtifactOptions;
17 constructor(app: ApplicationWithRepositories, projectRoot: string, datasourceConfig?: ArtifactOptions);
18 /**
19 * Uses super method to get a list of Artifact classes. Boot each file by
20 * creating a DataSourceConstructor and binding it to the application class.
21 */
22 load(): Promise<void>;
23}
24/**
25 * Default ArtifactOptions for DataSourceBooter.
26 */
27export declare const DataSourceDefaults: ArtifactOptions;