UNPKG

2.62 kBJavaScriptView Raw
1"use strict";
2// Copyright IBM Corp. and LoopBack contributors 2018,2020. All Rights Reserved.
3// Node module: @loopback/context
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.ContextBindings = exports.LOCAL_INTERCEPTOR_NAMESPACE = exports.GLOBAL_INTERCEPTOR_NAMESPACE = exports.ContextTags = void 0;
8const binding_key_1 = require("./binding-key");
9/**
10 * Namespace for context tags
11 */
12var ContextTags;
13(function (ContextTags) {
14 ContextTags.CLASS = 'class';
15 ContextTags.PROVIDER = 'provider';
16 ContextTags.DYNAMIC_VALUE_PROVIDER = 'dynamicValueProvider';
17 /**
18 * Type of the artifact
19 */
20 ContextTags.TYPE = 'type';
21 /**
22 * Namespace of the artifact
23 */
24 ContextTags.NAMESPACE = 'namespace';
25 /**
26 * Name of the artifact
27 */
28 ContextTags.NAME = 'name';
29 /**
30 * Binding key for the artifact
31 */
32 ContextTags.KEY = 'key';
33 /**
34 * Binding tag to associate a configuration binding with the target binding key
35 */
36 ContextTags.CONFIGURATION_FOR = 'configurationFor';
37 /**
38 * Binding tag for global interceptors
39 */
40 ContextTags.GLOBAL_INTERCEPTOR = 'globalInterceptor';
41 /**
42 * Binding tag for global interceptors to specify sources of invocations that
43 * the interceptor should apply. The tag value can be a string or string[], such
44 * as `'route'` or `['route', 'proxy']`.
45 */
46 ContextTags.GLOBAL_INTERCEPTOR_SOURCE = 'globalInterceptorSource';
47 /**
48 * Binding tag for group name of global interceptors
49 */
50 ContextTags.GLOBAL_INTERCEPTOR_GROUP = 'globalInterceptorGroup';
51})(ContextTags || (exports.ContextTags = ContextTags = {}));
52/**
53 * Default namespace for global interceptors
54 */
55exports.GLOBAL_INTERCEPTOR_NAMESPACE = 'globalInterceptors';
56/**
57 * Default namespace for local interceptors
58 */
59exports.LOCAL_INTERCEPTOR_NAMESPACE = 'interceptors';
60/**
61 * Namespace for context bindings
62 */
63var ContextBindings;
64(function (ContextBindings) {
65 /**
66 * Binding key for ConfigurationResolver
67 */
68 ContextBindings.CONFIGURATION_RESOLVER = binding_key_1.BindingKey.create(`${binding_key_1.BindingKey.CONFIG_NAMESPACE}.resolver`);
69 /**
70 * Binding key for ordered groups of global interceptors
71 */
72 ContextBindings.GLOBAL_INTERCEPTOR_ORDERED_GROUPS = binding_key_1.BindingKey.create('globalInterceptor.orderedGroups');
73})(ContextBindings || (exports.ContextBindings = ContextBindings = {}));
74//# sourceMappingURL=keys.js.map
\No newline at end of file