UNPKG

3.68 kBJavaScriptView Raw
1"use strict";
2// Copyright IBM Corp. and LoopBack contributors 2017,2020. All Rights Reserved.
3// Node module: @loopback/core
4// This file is licensed under the MIT License.
5// License text available at https://opensource.org/licenses/MIT
6Object.defineProperty(exports, "__esModule", { value: true });
7exports.CoreTags = exports.CoreBindings = void 0;
8const context_1 = require("@loopback/context");
9/**
10 * Namespace for core binding keys
11 */
12var CoreBindings;
13(function (CoreBindings) {
14 // application
15 /**
16 * Binding key for application instance itself
17 */
18 CoreBindings.APPLICATION_INSTANCE = context_1.BindingKey.create('application.instance');
19 /**
20 * Binding key for application configuration
21 */
22 CoreBindings.APPLICATION_CONFIG = context_1.BindingKey.create('application.config');
23 /**
24 * Binding key for the content of `package.json`
25 */
26 CoreBindings.APPLICATION_METADATA = context_1.BindingKey.create('application.metadata');
27 // server
28 /**
29 * Binding key for servers
30 */
31 CoreBindings.SERVERS = 'servers';
32 // component
33 /**
34 * Binding key for components
35 */
36 CoreBindings.COMPONENTS = 'components';
37 // controller
38 CoreBindings.CONTROLLERS = 'controllers';
39 /**
40 * Binding key for the controller class resolved in the current request
41 * context
42 */
43 CoreBindings.CONTROLLER_CLASS = context_1.BindingKey.create('controller.current.ctor');
44 /**
45 * Binding key for the controller method resolved in the current request
46 * context
47 */
48 CoreBindings.CONTROLLER_METHOD_NAME = context_1.BindingKey.create('controller.current.operation');
49 /**
50 * Binding key for the controller method metadata resolved in the current
51 * request context
52 */
53 CoreBindings.CONTROLLER_METHOD_META = 'controller.method.meta';
54 /**
55 * Binding key for the controller instance resolved in the current request
56 * context
57 */
58 CoreBindings.CONTROLLER_CURRENT = context_1.BindingKey.create('controller.current');
59 CoreBindings.LIFE_CYCLE_OBSERVERS = 'lifeCycleObservers';
60 /**
61 * Binding key for life cycle observer options
62 */
63 CoreBindings.LIFE_CYCLE_OBSERVER_REGISTRY = context_1.BindingKey.create('lifeCycleObserver.registry');
64 /**
65 * Binding key for life cycle observer options
66 */
67 CoreBindings.LIFE_CYCLE_OBSERVER_OPTIONS = context_1.BindingKey.create('lifeCycleObserver.options');
68})(CoreBindings || (exports.CoreBindings = CoreBindings = {}));
69var CoreTags;
70(function (CoreTags) {
71 /**
72 * Binding tag for components
73 */
74 CoreTags.COMPONENT = 'component';
75 /**
76 * Binding tag for servers
77 */
78 CoreTags.SERVER = 'server';
79 /**
80 * Binding tag for controllers
81 */
82 CoreTags.CONTROLLER = 'controller';
83 /**
84 * Binding tag for services
85 */
86 CoreTags.SERVICE = 'service';
87 /**
88 * Binding tag for the service interface
89 */
90 CoreTags.SERVICE_INTERFACE = 'serviceInterface';
91 /**
92 * Binding tag for life cycle observers
93 */
94 CoreTags.LIFE_CYCLE_OBSERVER = 'lifeCycleObserver';
95 /**
96 * Binding tag for group name of life cycle observers
97 */
98 CoreTags.LIFE_CYCLE_OBSERVER_GROUP = 'lifeCycleObserverGroup';
99 /**
100 * Binding tag for extensions to specify name of the extension point that an
101 * extension contributes to.
102 */
103 CoreTags.EXTENSION_FOR = 'extensionFor';
104 /**
105 * Binding tag for an extension point to specify name of the extension point
106 */
107 CoreTags.EXTENSION_POINT = 'extensionPoint';
108})(CoreTags || (exports.CoreTags = CoreTags = {}));
109//# sourceMappingURL=keys.js.map
\No newline at end of file