@toa.io/core 1.0.0-alpha.190 → 1.0.0-alpha.194

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.190",
3
+ "version": "1.0.0-alpha.194",
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": "494b1c8f05c21f377f1152a9d89df5cbbd1001de"
29
+ "gitHead": "b9f5743c5ee483c2b293db60b22048d3c2cf6107"
30
30
  }
@@ -1,6 +1,6 @@
1
1
  type: object
2
2
  properties:
3
- id: { }
3
+ id: {}
4
4
  version:
5
5
  type: integer
6
6
  minimum: 0
@@ -31,4 +31,6 @@ properties:
31
31
  type: string
32
32
  not:
33
33
  const: id
34
+ deleted:
35
+ type: boolean
34
36
  additionalProperties: false
@@ -4,7 +4,7 @@ const { Operation } = require('./operation')
4
4
 
5
5
  class Observation extends Operation {
6
6
  async run (store) {
7
- if (store.scope === null || store.scope?.deleted === true) store.reply = null
7
+ if (store.scope === null || (store.scope?.deleted === true && store.request.query?.options?.deleted !== true)) store.reply = null
8
8
  else await super.run(store)
9
9
  }
10
10
  }
package/src/transition.js CHANGED
@@ -22,7 +22,7 @@ class Transition extends Operation {
22
22
 
23
23
  store.scope = request.query ? await this.query(request.query) : this.scope.init()
24
24
 
25
- if (store.scope === null || store.scope.deleted === true)
25
+ if (store.scope === null || (store.scope.deleted === true && request.query?.options?.deleted !== true))
26
26
  throw new StateNotFoundException()
27
27
 
28
28
  store.state = store.scope.get()