@toa.io/core 1.0.0-alpha.204 → 1.0.0-alpha.206

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": "1.0.0-alpha.204",
3
+ "version": "1.0.0-alpha.206",
4
4
  "description": "Toa Core",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
@@ -26,5 +26,5 @@
26
26
  "error-value": "0.3.0",
27
27
  "openspan": "1.0.0-alpha.173"
28
28
  },
29
- "gitHead": "1625cd465421f89eb1bc5feea249a7d943696df1"
29
+ "gitHead": "e5b108299f9aa80ce4d1c8446df761b5b0570fba"
30
30
  }
package/src/context.js CHANGED
@@ -6,6 +6,8 @@ const { Connector } = require('./connector')
6
6
  * @implements {toa.core.Context}
7
7
  */
8
8
  class Context extends Connector {
9
+ env
10
+ name
9
11
  aspects
10
12
 
11
13
  #local
@@ -15,6 +17,8 @@ class Context extends Connector {
15
17
  constructor (local, discover, aspects = []) {
16
18
  super()
17
19
 
20
+ this.env = process.env.TOA_ENV
21
+ this.name = process.env.TOA_CONTEXT
18
22
  this.aspects = aspects
19
23
 
20
24
  this.#local = local
@@ -61,7 +61,7 @@ class Entity {
61
61
  return
62
62
 
63
63
  for (const guard of this.#guards) {
64
- const ok = guard.fit(value, this.#state)
64
+ const ok = guard.fit(value, this.#origin)
65
65
 
66
66
  if (ok === false)
67
67
  throw new EntityGuardException(guard.name, value)