@toa.io/bindings.amqp 0.4.0-dev.8 → 0.4.0-dev.9

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.amqp",
3
- "version": "0.4.0-dev.8",
3
+ "version": "0.4.0-dev.9",
4
4
  "description": "Toa AMQP Binding",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -19,14 +19,14 @@
19
19
  "test": "echo \"Error: run tests from root\" && exit 1"
20
20
  },
21
21
  "devDependencies": {
22
- "@toa.io/mock": "0.4.0-dev.8"
22
+ "@toa.io/mock": "0.4.0-dev.9"
23
23
  },
24
24
  "dependencies": {
25
- "@toa.io/console": "0.4.0-dev.8",
26
- "@toa.io/core": "0.4.0-dev.8",
27
- "@toa.io/generic": "0.4.0-dev.8",
28
- "@toa.io/generics.amqp": "0.4.0-dev.8",
29
- "@toa.io/pointer": "0.4.0-dev.8"
25
+ "@toa.io/console": "0.4.0-dev.9",
26
+ "@toa.io/core": "0.4.0-dev.9",
27
+ "@toa.io/generic": "0.4.0-dev.9",
28
+ "@toa.io/generics.amqp": "0.4.0-dev.9",
29
+ "@toa.io/pointer": "0.4.0-dev.9"
30
30
  },
31
31
  "gitHead": "2be07592325b2e4dc823e81d882a4e50bf50de24"
32
32
  }
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const connectors = require('@toa.io/pointer')
3
+ const pointer = require('@toa.io/pointer')
4
4
 
5
5
  const { PREFIX } = require('./constants')
6
6
 
@@ -13,7 +13,7 @@ const deployment = (instances, annotation) => {
13
13
  /** @type {toa.pointer.deployment.Options} */
14
14
  const options = { prefix: PREFIX }
15
15
 
16
- return connectors.deployment(instances, annotation, options)
16
+ return pointer.deployment(instances, annotation, options)
17
17
  }
18
18
 
19
19
  /**
@@ -22,7 +22,7 @@ const deployment = (instances, annotation) => {
22
22
  const validate = (annotation) => {
23
23
  const defined = annotation !== undefined
24
24
  const defaults = defined && (typeof annotation === 'string' || annotation.default !== undefined)
25
- const correct = defined && (defaults || annotation.system !== undefined)
25
+ const correct = defined && (defaults || 'system' in annotation)
26
26
 
27
27
  if (!correct) {
28
28
  throw new Error('AMQP deployment requires either \'system\' or \'default\' pointer annotation')
@@ -49,11 +49,11 @@ it('should expose reference', () => {
49
49
  })
50
50
 
51
51
  it('should set amqp: protocol on localhost', () => {
52
- process.env.TOA_ENV = 'local'
52
+ process.env.TOA_DEV = '1'
53
53
 
54
54
  pointer = new Pointer(locator)
55
55
 
56
56
  expect(pointer.protocol).toStrictEqual(protocol)
57
57
 
58
- delete process.env.TOA_ENV
58
+ delete process.env.TOA_DEV
59
59
  })