teamplay 0.1.8 → 0.1.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.
Files changed (2) hide show
  1. package/orm/Signal.js +6 -0
  2. package/package.json +8 -8
package/orm/Signal.js CHANGED
@@ -44,6 +44,12 @@ export default class Signal extends Function {
44
44
  return _get(this[SEGMENTS])
45
45
  }
46
46
 
47
+ getId () {
48
+ if (this[SEGMENTS].length === 0) throw Error('Can\'t get the id of the root signal')
49
+ if (this[SEGMENTS].length === 1) throw Error('Can\'t get the id of a collection')
50
+ return this[SEGMENTS][this[SEGMENTS].length - 1]
51
+ }
52
+
47
53
  * [Symbol.iterator] () {
48
54
  if (this[IS_QUERY]) {
49
55
  const ids = _get([QUERIES, this[HASH], 'ids'])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teamplay",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Full-stack signals ORM with multiplayer",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@nx-js/observer-util": "^4.1.3",
26
- "@teamplay/backend": "^0.1.8",
27
- "@teamplay/cache": "^0.1.8",
28
- "@teamplay/channel": "^0.1.8",
29
- "@teamplay/debug": "^0.1.8",
30
- "@teamplay/schema": "^0.1.8",
31
- "@teamplay/utils": "^0.1.8",
26
+ "@teamplay/backend": "^0.1.9",
27
+ "@teamplay/cache": "^0.1.9",
28
+ "@teamplay/channel": "^0.1.9",
29
+ "@teamplay/debug": "^0.1.9",
30
+ "@teamplay/schema": "^0.1.9",
31
+ "@teamplay/utils": "^0.1.9",
32
32
  "diff-match-patch": "^1.0.5",
33
33
  "events": "^3.3.0",
34
34
  "json0-ot-diff": "^1.1.2",
@@ -63,5 +63,5 @@
63
63
  ]
64
64
  },
65
65
  "license": "MIT",
66
- "gitHead": "2a97cf799d5255b09b9f0b10cc589dec8da7ce72"
66
+ "gitHead": "e6a092cd5d261ac516d96b7fbd6c7087e40c4398"
67
67
  }