@chainlink/external-adapter-framework 0.0.8 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.c8rc.json +3 -0
- package/.eslintignore +9 -0
- package/.eslintrc.js +96 -0
- package/.github/README.MD +17 -0
- package/.github/actions/setup/action.yaml +13 -0
- package/.github/workflows/main.yaml +39 -0
- package/.github/workflows/publish.yaml +20 -0
- package/.prettierignore +13 -0
- package/.yarnrc +0 -0
- package/README.md +103 -0
- package/dist/src/adapter.d.ts +135 -0
- package/dist/src/adapter.js +145 -0
- package/{package → dist/src}/background-executor.d.ts +2 -2
- package/{background-executor.js → dist/src/background-executor.js} +0 -0
- package/{cache → dist/src/cache}/factory.d.ts +0 -0
- package/{package → dist/src}/cache/factory.js +0 -2
- package/{package → dist/src}/cache/index.d.ts +10 -6
- package/{package → dist/src}/cache/index.js +13 -9
- package/{cache → dist/src/cache}/local.d.ts +0 -0
- package/{cache → dist/src/cache}/local.js +0 -0
- package/{cache → dist/src/cache}/metrics.d.ts +0 -0
- package/{cache → dist/src/cache}/metrics.js +0 -0
- package/{cache → dist/src/cache}/redis.d.ts +0 -0
- package/{package → dist/src}/cache/redis.js +5 -5
- package/dist/src/chainlink-external-adapter-framework-0.0.6.tgz +0 -0
- package/{package → dist/src}/config/index.d.ts +20 -1
- package/{package → dist/src}/config/index.js +24 -9
- package/{config → dist/src/config}/provider-limits.d.ts +0 -0
- package/{config → dist/src/config}/provider-limits.js +0 -0
- package/dist/src/examples/bank-frick/accounts.d.ts +39 -0
- package/dist/src/examples/bank-frick/accounts.js +192 -0
- package/dist/src/examples/bank-frick/config/index.d.ts +4 -0
- package/dist/src/examples/bank-frick/config/index.js +54 -0
- package/dist/src/examples/bank-frick/index.d.ts +2 -0
- package/dist/src/examples/bank-frick/index.js +15 -0
- package/dist/src/examples/bank-frick/util.d.ts +4 -0
- package/dist/src/examples/bank-frick/util.js +39 -0
- package/dist/src/examples/coingecko/batch-warming.d.ts +7 -0
- package/{package → dist/src}/examples/coingecko/batch-warming.js +3 -2
- package/dist/src/examples/coingecko/index.d.ts +2 -0
- package/{package → dist/src}/examples/coingecko/index.js +3 -2
- package/dist/src/examples/coingecko/rest.d.ts +12 -0
- package/{package → dist/src}/examples/coingecko/rest.js +3 -2
- package/{examples → dist/src/examples}/ncfx/config/index.d.ts +0 -0
- package/{examples → dist/src/examples}/ncfx/config/index.js +0 -0
- package/dist/src/examples/ncfx/index.d.ts +13 -0
- package/{package → dist/src}/examples/ncfx/index.js +3 -2
- package/{package → dist/src}/examples/ncfx/websocket.d.ts +12 -1
- package/{package → dist/src}/examples/ncfx/websocket.js +3 -2
- package/{package → dist/src}/index.d.ts +2 -3
- package/{package → dist/src}/index.js +55 -19
- package/{metrics → dist/src/metrics}/constants.d.ts +0 -0
- package/{metrics → dist/src/metrics}/constants.js +0 -0
- package/{metrics → dist/src/metrics}/index.d.ts +0 -0
- package/{package → dist/src}/metrics/index.js +0 -1
- package/dist/src/metrics/util.d.ts +7 -0
- package/{package → dist/src}/metrics/util.js +2 -2
- package/{adapter.d.ts → dist/src/package/adapter.d.ts} +2 -2
- package/{adapter.js → dist/src/package/adapter.js} +0 -0
- package/{background-executor.d.ts → dist/src/package/background-executor.d.ts} +0 -0
- package/{package → dist/src/package}/background-executor.js +0 -0
- package/{package → dist/src/package}/cache/factory.d.ts +0 -0
- package/{cache → dist/src/package/cache}/factory.js +0 -0
- package/{cache → dist/src/package/cache}/index.d.ts +0 -0
- package/{cache → dist/src/package/cache}/index.js +0 -0
- package/{package → dist/src/package}/cache/local.d.ts +0 -0
- package/{package → dist/src/package}/cache/local.js +0 -0
- package/{package → dist/src/package}/cache/metrics.d.ts +0 -0
- package/{package → dist/src/package}/cache/metrics.js +0 -0
- package/{package → dist/src/package}/cache/redis.d.ts +0 -0
- package/{cache → dist/src/package/cache}/redis.js +0 -0
- package/{config → dist/src/package/config}/index.d.ts +0 -0
- package/{config → dist/src/package/config}/index.js +0 -0
- package/{package → dist/src/package}/config/provider-limits.d.ts +0 -0
- package/{package → dist/src/package}/config/provider-limits.js +2 -1
- package/{examples → dist/src/package/examples}/coingecko/batch-warming.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/batch-warming.js +0 -0
- package/{examples → dist/src/package/examples}/coingecko/index.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/index.js +0 -0
- package/{examples → dist/src/package/examples}/coingecko/rest.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/rest.js +0 -0
- package/{package → dist/src/package}/examples/ncfx/config/index.d.ts +0 -0
- package/{package → dist/src/package}/examples/ncfx/config/index.js +0 -0
- package/{examples → dist/src/package/examples}/ncfx/index.d.ts +0 -0
- package/{examples → dist/src/package/examples}/ncfx/index.js +0 -0
- package/{examples → dist/src/package/examples}/ncfx/websocket.d.ts +0 -0
- package/{examples → dist/src/package/examples}/ncfx/websocket.js +0 -0
- package/{index.d.ts → dist/src/package/index.d.ts} +1 -1
- package/{index.js → dist/src/package/index.js} +0 -0
- package/{package → dist/src/package}/metrics/constants.d.ts +0 -0
- package/{package → dist/src/package}/metrics/constants.js +0 -0
- package/{package → dist/src/package}/metrics/index.d.ts +0 -0
- package/{metrics → dist/src/package/metrics}/index.js +0 -0
- package/{metrics → dist/src/package/metrics}/util.d.ts +0 -0
- package/{metrics → dist/src/package/metrics}/util.js +0 -0
- package/dist/src/package/package.json +72 -0
- package/{package → dist/src/package}/rate-limiting/background/fixed-frequency.d.ts +0 -0
- package/{package → dist/src/package}/rate-limiting/background/fixed-frequency.js +0 -0
- package/{package → dist/src/package}/rate-limiting/index.d.ts +2 -2
- package/{package → dist/src/package}/rate-limiting/index.js +0 -0
- package/{package → dist/src/package}/rate-limiting/metrics.d.ts +0 -0
- package/{package → dist/src/package}/rate-limiting/metrics.js +0 -0
- package/{package → dist/src/package}/rate-limiting/request/simple-counting.d.ts +0 -0
- package/{package → dist/src/package}/rate-limiting/request/simple-counting.js +0 -0
- package/{package → dist/src/package}/test.d.ts +0 -0
- package/{package → dist/src/package}/test.js +0 -0
- package/{package → dist/src/package}/transports/batch-warming.d.ts +0 -0
- package/{package → dist/src/package}/transports/batch-warming.js +0 -0
- package/{package → dist/src/package}/transports/index.d.ts +0 -0
- package/{package → dist/src/package}/transports/index.js +0 -0
- package/{package → dist/src/package}/transports/metrics.d.ts +1 -1
- package/{package → dist/src/package}/transports/metrics.js +0 -0
- package/{package → dist/src/package}/transports/rest.d.ts +0 -0
- package/{package → dist/src/package}/transports/rest.js +0 -0
- package/{package → dist/src/package}/transports/util.d.ts +0 -0
- package/{package → dist/src/package}/transports/util.js +0 -0
- package/{package → dist/src/package}/transports/websocket.d.ts +0 -0
- package/{package → dist/src/package}/transports/websocket.js +0 -0
- package/{package → dist/src/package}/util/expiring-sorted-set.d.ts +0 -0
- package/{package → dist/src/package}/util/expiring-sorted-set.js +0 -0
- package/{package → dist/src/package}/util/index.d.ts +0 -0
- package/{package → dist/src/package}/util/index.js +0 -0
- package/{package → dist/src/package}/util/logger.d.ts +0 -0
- package/{package → dist/src/package}/util/logger.js +0 -0
- package/{package → dist/src/package}/util/request.d.ts +0 -0
- package/{package → dist/src/package}/util/request.js +0 -0
- package/{package → dist/src/package}/validation/error.d.ts +0 -0
- package/{package → dist/src/package}/validation/error.js +0 -0
- package/{package → dist/src/package}/validation/index.d.ts +0 -0
- package/{package → dist/src/package}/validation/index.js +0 -0
- package/{package → dist/src/package}/validation/input-params.d.ts +0 -0
- package/{package → dist/src/package}/validation/input-params.js +0 -0
- package/{package → dist/src/package}/validation/override-functions.d.ts +0 -0
- package/{package → dist/src/package}/validation/override-functions.js +0 -0
- package/{package → dist/src/package}/validation/preset-tokens.json +0 -0
- package/{package → dist/src/package}/validation/validator.d.ts +0 -0
- package/{package → dist/src/package}/validation/validator.js +0 -0
- package/{package → dist/src}/package.json +5 -2
- package/{rate-limiting → dist/src/rate-limiting}/background/fixed-frequency.d.ts +2 -1
- package/{rate-limiting → dist/src/rate-limiting}/background/fixed-frequency.js +0 -2
- package/{rate-limiting → dist/src/rate-limiting}/index.d.ts +4 -3
- package/{rate-limiting → dist/src/rate-limiting}/index.js +0 -0
- package/{rate-limiting → dist/src/rate-limiting}/metrics.d.ts +0 -0
- package/{rate-limiting → dist/src/rate-limiting}/metrics.js +0 -0
- package/{rate-limiting → dist/src/rate-limiting}/request/simple-counting.d.ts +2 -1
- package/{rate-limiting → dist/src/rate-limiting}/request/simple-counting.js +0 -0
- package/{test.d.ts → dist/src/test.d.ts} +0 -0
- package/{test.js → dist/src/test.js} +2 -2
- package/{transports → dist/src/transports}/batch-warming.d.ts +4 -3
- package/{transports → dist/src/transports}/batch-warming.js +4 -4
- package/{transports → dist/src/transports}/index.d.ts +5 -22
- package/{transports → dist/src/transports}/index.js +3 -3
- package/{transports → dist/src/transports}/metrics.d.ts +4 -3
- package/{transports → dist/src/transports}/metrics.js +2 -2
- package/{transports → dist/src/transports}/rest.d.ts +2 -1
- package/{transports → dist/src/transports}/rest.js +3 -1
- package/{transports → dist/src/transports}/util.d.ts +0 -0
- package/{transports → dist/src/transports}/util.js +0 -0
- package/{transports → dist/src/transports}/websocket.d.ts +7 -7
- package/{transports → dist/src/transports}/websocket.js +8 -11
- package/{util → dist/src/util}/expiring-sorted-set.d.ts +0 -0
- package/{util → dist/src/util}/expiring-sorted-set.js +0 -0
- package/{util → dist/src/util}/index.d.ts +2 -1
- package/{util → dist/src/util}/index.js +1 -1
- package/{util → dist/src/util}/logger.d.ts +0 -0
- package/{util → dist/src/util}/logger.js +0 -0
- package/{util → dist/src/util}/request.d.ts +5 -3
- package/{util → dist/src/util}/request.js +0 -0
- package/dist/src/util/subscription-set/expiring-sorted-set.d.ts +22 -0
- package/dist/src/util/subscription-set/expiring-sorted-set.js +47 -0
- package/dist/src/util/subscription-set/subscription-set.d.ts +18 -0
- package/dist/src/util/subscription-set/subscription-set.js +19 -0
- package/dist/src/util/test-payload-loader.d.ts +25 -0
- package/dist/src/util/test-payload-loader.js +83 -0
- package/{validation → dist/src/validation}/error.d.ts +4 -4
- package/{validation → dist/src/validation}/error.js +1 -1
- package/{validation → dist/src/validation}/index.d.ts +0 -0
- package/{validation → dist/src/validation}/index.js +8 -3
- package/{validation → dist/src/validation}/input-params.d.ts +0 -0
- package/{validation → dist/src/validation}/input-params.js +0 -0
- package/dist/src/validation/override-functions.d.ts +3 -0
- package/{validation → dist/src/validation}/override-functions.js +0 -0
- package/{validation → dist/src/validation}/preset-tokens.json +0 -0
- package/{validation → dist/src/validation}/validator.d.ts +0 -0
- package/{validation → dist/src/validation}/validator.js +0 -0
- package/docker-compose.yaml +35 -0
- package/env.sh +54 -0
- package/env2.sh +55 -0
- package/package.json +5 -3
- package/publish.sh +0 -0
- package/src/adapter.ts +263 -0
- package/src/background-executor.ts +52 -0
- package/src/cache/factory.ts +26 -0
- package/src/cache/index.ts +258 -0
- package/src/cache/local.ts +73 -0
- package/src/cache/metrics.ts +112 -0
- package/src/cache/redis.ts +93 -0
- package/src/config/index.ts +517 -0
- package/src/config/provider-limits.ts +130 -0
- package/src/examples/bank-frick/README.MD +10 -0
- package/src/examples/bank-frick/accounts.ts +246 -0
- package/src/examples/bank-frick/config/index.ts +53 -0
- package/src/examples/bank-frick/index.ts +13 -0
- package/src/examples/bank-frick/types.d.ts +38 -0
- package/src/examples/bank-frick/util.ts +55 -0
- package/src/examples/coingecko/batch-warming.ts +78 -0
- package/src/examples/coingecko/index.ts +9 -0
- package/src/examples/coingecko/rest.ts +77 -0
- package/src/examples/ncfx/config/index.ts +12 -0
- package/src/examples/ncfx/index.ts +9 -0
- package/src/examples/ncfx/websocket.ts +99 -0
- package/src/index.ts +149 -0
- package/src/metrics/constants.ts +23 -0
- package/src/metrics/index.ts +115 -0
- package/src/metrics/util.ts +18 -0
- package/src/rate-limiting/background/fixed-frequency.ts +45 -0
- package/src/rate-limiting/index.ts +100 -0
- package/src/rate-limiting/metrics.ts +18 -0
- package/src/rate-limiting/request/simple-counting.ts +76 -0
- package/src/test.ts +5 -0
- package/src/transports/batch-warming.ts +122 -0
- package/src/transports/index.ts +152 -0
- package/src/transports/metrics.ts +95 -0
- package/src/transports/rest.ts +164 -0
- package/src/transports/util.ts +63 -0
- package/src/transports/websocket.ts +245 -0
- package/src/util/index.ts +22 -0
- package/src/util/logger.ts +69 -0
- package/src/util/request.ts +117 -0
- package/src/util/subscription-set/expiring-sorted-set.ts +54 -0
- package/src/util/subscription-set/subscription-set.ts +35 -0
- package/src/util/test-payload-loader.ts +87 -0
- package/src/validation/error.ts +116 -0
- package/src/validation/index.ts +110 -0
- package/src/validation/input-params.ts +45 -0
- package/src/validation/override-functions.ts +44 -0
- package/src/validation/preset-tokens.json +23 -0
- package/src/validation/validator.ts +384 -0
- package/test/adapter.test.ts +27 -0
- package/test/background-executor.test.ts +108 -0
- package/test/cache/cache-key.test.ts +114 -0
- package/test/cache/helper.ts +100 -0
- package/test/cache/local.test.ts +54 -0
- package/test/cache/redis.test.ts +89 -0
- package/test/correlation.test.ts +114 -0
- package/test/index.test.ts +37 -0
- package/test/metrics/feed-id.test.ts +38 -0
- package/test/metrics/helper.ts +14 -0
- package/test/metrics/labels.test.ts +36 -0
- package/test/metrics/metrics.test.ts +267 -0
- package/test/metrics/redis-metrics.test.ts +113 -0
- package/test/metrics/warmer-metrics.test.ts +192 -0
- package/test/metrics/ws-metrics.test.ts +225 -0
- package/test/rate-limit-config.test.ts +242 -0
- package/test/smoke.test.ts +166 -0
- package/test/transports/batch.test.ts +465 -0
- package/test/transports/rest.test.ts +242 -0
- package/test/transports/websocket.test.ts +183 -0
- package/test/tsconfig.json +5 -0
- package/test/util.ts +77 -0
- package/test/validation.test.ts +178 -0
- package/test-payload-fail.json +3 -0
- package/test-payload.js +22 -0
- package/test-payload.json +7 -0
- package/test.sh +20 -0
- package/test2.sh +2 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +6 -0
- package/webpack.config.js +23 -0
- package/chainlink-external-adapter-framework-v0.0.8.tgz +0 -0
- package/package/adapter.d.ts +0 -88
- package/package/adapter.js +0 -112
- package/package/examples/coingecko/batch-warming.d.ts +0 -2
- package/package/examples/coingecko/index.d.ts +0 -2
- package/package/examples/coingecko/rest.d.ts +0 -2
- package/package/examples/ncfx/index.d.ts +0 -2
- package/package/metrics/util.d.ts +0 -3
- package/validation/override-functions.d.ts +0 -3
package/package/adapter.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initializeAdapter = exports.initializeDependencies = void 0;
|
|
4
|
-
const factory_1 = require("./cache/factory");
|
|
5
|
-
const rate_limiting_1 = require("./rate-limiting");
|
|
6
|
-
const util_1 = require("./util");
|
|
7
|
-
const logger = (0, util_1.makeLogger)('Adapter');
|
|
8
|
-
/**
|
|
9
|
-
* This function will take an adapter structure and go through each endpoint, calculating
|
|
10
|
-
* each one's allocation of the total rate limits that are set for the adapter as a whole.
|
|
11
|
-
*
|
|
12
|
-
* @param adapter - the adapter to initialize rate limiting for
|
|
13
|
-
*/
|
|
14
|
-
const calculateRateLimitAllocations = (adapter) => {
|
|
15
|
-
const numberOfEndpoints = adapter.endpoints.length;
|
|
16
|
-
const endpointsWithExplicitAllocations = adapter.endpoints.filter((e) => e.rateLimiting);
|
|
17
|
-
const totalExplicitAllocation = endpointsWithExplicitAllocations
|
|
18
|
-
.map((e) => e.rateLimiting?.allocationPercentage || 0)
|
|
19
|
-
.reduce((sum, next) => sum + next, 0);
|
|
20
|
-
if (totalExplicitAllocation > 100) {
|
|
21
|
-
throw new Error('The total allocation set for all endpoints summed cannot exceed 100%');
|
|
22
|
-
}
|
|
23
|
-
if (totalExplicitAllocation === 100 &&
|
|
24
|
-
numberOfEndpoints - endpointsWithExplicitAllocations.length > 0) {
|
|
25
|
-
throw new Error('The explicit allocation is at 100% but there are endpoints with implicit allocation');
|
|
26
|
-
}
|
|
27
|
-
const implicitAllocation = 100 - totalExplicitAllocation;
|
|
28
|
-
logger.debug('Adapter rate limit allocations:');
|
|
29
|
-
for (const endpoint of adapter.endpoints) {
|
|
30
|
-
if (!endpoint.rateLimiting) {
|
|
31
|
-
endpoint.rateLimiting = {
|
|
32
|
-
allocationPercentage: implicitAllocation / (numberOfEndpoints - endpointsWithExplicitAllocations.length),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
logger.debug(`Endpoint [${endpoint.name}] - ${endpoint.rateLimiting?.allocationPercentage}%`);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* This function will process dependencies for an adapter, such as caches or rate limiters,
|
|
40
|
-
* in order to inject them into transports and other relevant places later in the lifecycle.
|
|
41
|
-
*
|
|
42
|
-
* @param config - the configuration for this adapter
|
|
43
|
-
* @param inputDependencies - a partial obj of initialized dependencies to override the created ones
|
|
44
|
-
* @param rateLimitingConfig - details from the adapter regarding rate limiting
|
|
45
|
-
* @returns a set of AdapterDependencies all initialized
|
|
46
|
-
*/
|
|
47
|
-
const initializeDependencies = (adapter, config, inputDependencies) => {
|
|
48
|
-
const dependencies = inputDependencies || {};
|
|
49
|
-
if (!dependencies.cache) {
|
|
50
|
-
dependencies.cache = factory_1.CacheFactory.buildCache(config);
|
|
51
|
-
}
|
|
52
|
-
// In the future we might want something more complex, but for now it's better to simplify
|
|
53
|
-
// and just use the same rate limiting for everything. Once we have a more complex use case we
|
|
54
|
-
// can think of ways to make this more configurable.
|
|
55
|
-
const rateLimitingTier = (0, rate_limiting_1.getRateLimitingTier)(adapter.rateLimiting?.tiers, config.RATE_LIMIT_API_TIER);
|
|
56
|
-
if (!dependencies.requestRateLimiter) {
|
|
57
|
-
dependencies.requestRateLimiter = new rate_limiting_1.SimpleCountingRateLimiter().initialize(adapter.endpoints, rateLimitingTier);
|
|
58
|
-
}
|
|
59
|
-
if (!dependencies.backgroundExecuteRateLimiter) {
|
|
60
|
-
dependencies.backgroundExecuteRateLimiter = new rate_limiting_1.FixedFrequencyRateLimiter().initialize(adapter.endpoints, rateLimitingTier);
|
|
61
|
-
}
|
|
62
|
-
return dependencies;
|
|
63
|
-
};
|
|
64
|
-
exports.initializeDependencies = initializeDependencies;
|
|
65
|
-
/**
|
|
66
|
-
* Takes an adapter and normalizes all endpoint names and aliases, as well as the default endpoint.
|
|
67
|
-
* i.e. makes them lowercase for now
|
|
68
|
-
* @param adapter - an instance of an Adapter
|
|
69
|
-
*/
|
|
70
|
-
const normalizeEndpointNames = (adapter) => {
|
|
71
|
-
// Make endpoints case insensitive, including default
|
|
72
|
-
adapter.defaultEndpoint = adapter.defaultEndpoint?.toLowerCase();
|
|
73
|
-
for (const endpoint of adapter.endpoints) {
|
|
74
|
-
endpoint.name = endpoint.name.toLowerCase();
|
|
75
|
-
endpoint.aliases = endpoint.aliases?.map((a) => a.toLowerCase());
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Initializes all of the [[Transport]]s in the adapter, passing along any [[AdapterDependencies]] and [[AdapterConfig]].
|
|
80
|
-
* Additionally, it builds a map out of all the endpoint names and aliases (checking for duplicates).
|
|
81
|
-
*
|
|
82
|
-
* @param adapter - an instance of an Adapter
|
|
83
|
-
* @param dependencies - dependencies that the adapter will need at initialization
|
|
84
|
-
* @param config - configuration variables already processed and validated
|
|
85
|
-
* @returns - the adapter with all transports initialized and aliases map built
|
|
86
|
-
*/
|
|
87
|
-
const initializeAdapter = async (adapter, config, dependencies) => {
|
|
88
|
-
normalizeEndpointNames(adapter);
|
|
89
|
-
calculateRateLimitAllocations(adapter);
|
|
90
|
-
const initializedDependencies = (0, exports.initializeDependencies)(adapter, config, dependencies);
|
|
91
|
-
const endpointsMap = {};
|
|
92
|
-
for (const endpoint of adapter.endpoints) {
|
|
93
|
-
// Add aliases to map to use in validation
|
|
94
|
-
const aliases = [endpoint.name, ...(endpoint.aliases || [])];
|
|
95
|
-
for (const alias of aliases) {
|
|
96
|
-
if (endpointsMap[alias]) {
|
|
97
|
-
throw new Error(`Duplicate endpoint / alias: "${alias}"`);
|
|
98
|
-
}
|
|
99
|
-
endpointsMap[alias] = endpoint;
|
|
100
|
-
}
|
|
101
|
-
logger.debug(`Initializing transport for endpoint "${endpoint.name}"...`);
|
|
102
|
-
await endpoint.transport.initialize(initializedDependencies);
|
|
103
|
-
}
|
|
104
|
-
logger.debug('Adapter initialization complete.');
|
|
105
|
-
return {
|
|
106
|
-
...adapter,
|
|
107
|
-
endpointsMap,
|
|
108
|
-
dependencies: initializedDependencies,
|
|
109
|
-
config,
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
exports.initializeAdapter = initializeAdapter;
|