@toa.io/core 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/core",
3
- "version": "0.1.0-dev.0",
3
+ "version": "0.1.0-dev.13+ccc74b9",
4
4
  "description": "Toa Core",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -20,9 +20,9 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@rsql/parser": "1.2.4",
23
- "@toa.io/gears": "^0.1.0-dev.0",
24
- "@toa.io/schema": "^0.1.0-dev.0",
23
+ "@toa.io/gears": "0.1.1-dev.3",
24
+ "@toa.io/schema": "0.1.1-dev.3",
25
25
  "clone-deep": "4.0.1"
26
26
  },
27
- "gitHead": "632df6cead03909ad2cfb8852e178914ac4ab5d2"
27
+ "gitHead": "ccc74b95d373e8b8c780aa4ae5a4de878fe7517a"
28
28
  }
package/src/exceptions.js CHANGED
@@ -38,7 +38,7 @@ class SystemException extends Exception {
38
38
  constructor (error) {
39
39
  super(codes.System, error.message)
40
40
 
41
- if (error.stack !== undefined && process.env.TOA_ENV === 'dev') this.stack = error.stack
41
+ if (error.stack !== undefined) this.stack = error.stack
42
42
  }
43
43
  }
44
44
 
package/src/locator.js CHANGED
@@ -29,7 +29,9 @@ class Locator {
29
29
  host += concat(segment(this), SEPARATOR)
30
30
  }
31
31
 
32
- return host + type.toLowerCase()
32
+ if (type) host += type.toLowerCase()
33
+
34
+ return host
33
35
  }
34
36
 
35
37
  static parse (label) {
@@ -15,16 +15,6 @@ const nameless = {
15
15
  operations: [{ name: 'add' }, { name: 'get' }]
16
16
  }
17
17
 
18
- const env = process.env.TOA_ENV
19
-
20
- beforeAll(() => {
21
- delete process.env.TOA_ENV
22
- })
23
-
24
- afterAll(() => {
25
- process.env.TOA_ENV = env
26
- })
27
-
28
18
  it('should provide host', () => {
29
19
  expect(new Locator(manifest).host('db')).toBe('foo-db')
30
20
  expect(new Locator(nameless).host('db')).toBe('foo-db')