UNPKG

1.21 kBPlain TextView Raw
1// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
2// Node module: @loopback/boot
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6import {BindingKey} from '@loopback/core';
7import {Bootstrapper} from './bootstrapper';
8import {BootOptions} from './types';
9
10/**
11 * Namespace for boot related binding keys
12 */
13export namespace BootBindings {
14 /**
15 * Binding key for boot options
16 */
17 export const BOOT_OPTIONS = BindingKey.create<BootOptions>('boot.options');
18 /**
19 * Binding key for determining project root directory
20 */
21 export const PROJECT_ROOT = BindingKey.create<string>('boot.project_root');
22
23 /**
24 * Binding key for binding the BootStrapper class
25 */
26 export const BOOTSTRAPPER_KEY = BindingKey.create<Bootstrapper>(
27 'application.bootstrapper',
28 );
29
30 /**
31 * Booter binding namespace
32 */
33 export const BOOTERS = 'booters';
34 export const BOOTER_PREFIX = 'booters';
35}
36
37/**
38 * Namespace for boot related tags
39 */
40export namespace BootTags {
41 export const BOOTER = 'booter';
42 /**
43 * @deprecated Use `BootTags.BOOTER` instead.
44 */
45 export const BOOTER_TAG = BootTags.BOOTER;
46}