@chainlink/external-adapter-framework 0.5.5 → 0.5.6
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/package.json
CHANGED
package/transports/routing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdapterDependencies } from '../adapter';
|
|
2
2
|
import { AdapterConfig } from '../config';
|
|
3
|
-
import { AdapterRequest, AdapterResponse } from '../util
|
|
3
|
+
import { AdapterRequest, AdapterResponse } from '../util';
|
|
4
4
|
import { MetaTransport, Transport, TransportGenerics } from './';
|
|
5
5
|
/**
|
|
6
6
|
* Transport implementation that takes 2 or more transports and a function that determines with transport to use.
|
package/transports/routing.js
CHANGED
|
@@ -26,7 +26,7 @@ class RoutingTransport {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
async registerRequest(req, adapterConfig) {
|
|
29
|
-
logger.debug(`registering request using
|
|
29
|
+
logger.debug(`registering request using `, req.requestContext.data);
|
|
30
30
|
const key = this.route(req, adapterConfig || undefined);
|
|
31
31
|
if (!this.transports[key]) {
|
|
32
32
|
throw new error_1.AdapterError({ statusCode: 400, message: `No transport found for ${key}` });
|
|
@@ -40,7 +40,7 @@ class RoutingTransport {
|
|
|
40
40
|
logger.debug(`No registerRequest on ${key} (${transport.constructor.name})`);
|
|
41
41
|
}
|
|
42
42
|
resolveTransport(req, adapterConfig) {
|
|
43
|
-
logger.debug(`routing request using
|
|
43
|
+
logger.debug(`routing request using `, req.requestContext.data);
|
|
44
44
|
const key = this.route(req, adapterConfig || undefined);
|
|
45
45
|
if (!this.transports[key]) {
|
|
46
46
|
throw new error_1.AdapterError({ statusCode: 400, message: `No transport found for ${key}` });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../src/transports/routing.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../../src/transports/routing.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