@toa.io/bindings.http 0.1.0-dev.0 → 0.1.0-dev.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/bindings.http",
3
- "version": "0.1.0-dev.0",
3
+ "version": "0.1.0-dev.13+ccc74b9",
4
4
  "description": "Toa HTTP Binding",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -18,10 +18,6 @@
18
18
  "scripts": {
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
- "peerDependencies": {
22
- "@toa.io/core": "^0.0.0",
23
- "@toa.io/gears": "^0.0.0"
24
- },
25
21
  "dependencies": {
26
22
  "agentkeepalive": "4.1.4",
27
23
  "express": "4.17.1",
@@ -30,5 +26,5 @@
30
26
  "devDependencies": {
31
27
  "@babel/parser": "^7.16.2"
32
28
  },
33
- "gitHead": "632df6cead03909ad2cfb8852e178914ac4ab5d2"
29
+ "gitHead": "ccc74b95d373e8b8c780aa4ae5a4de878fe7517a"
34
30
  }
package/src/consumer.js CHANGED
@@ -37,10 +37,10 @@ class Consumer extends Connector {
37
37
  }
38
38
 
39
39
  static #locate (locator, endpoint) {
40
- const host = process.env.TOA_ENV === 'dev' ? 'localhost' : locator.host()
40
+ const host = locator.host()
41
41
  const path = resource.path(locator, endpoint)
42
42
 
43
- return 'http://' + host + ':' + PORT + path
43
+ return `http://${host}:${PORT}${path}`
44
44
  }
45
45
  }
46
46
 
package/src/factory.js CHANGED
@@ -27,6 +27,6 @@ class Factory {
27
27
  }
28
28
  }
29
29
 
30
- const AGENT_OPTIONS = { keepAlive: process.env.TOA_ENV !== 'dev' && process.env.TOA_ENV !== 'test' }
30
+ const AGENT_OPTIONS = { keepAlive: true }
31
31
 
32
32
  exports.Factory = Factory