@twin.org/entity-storage-connector-memory 0.0.1-next.12 → 0.0.1-next.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.
@@ -116,7 +116,10 @@ class MemoryEntityStorageConnector {
116
116
  if (entity.EntityConditions.check(allEntities[i], conditions) && entities.length < finalPageSize) {
117
117
  entities.push(core.ObjectHelper.pick(allEntities[i], properties));
118
118
  if (entities.length >= finalPageSize) {
119
- nextCursor = (i + 1).toString();
119
+ if (i < allEntities.length - 1) {
120
+ nextCursor = (i + 1).toString();
121
+ }
122
+ break;
120
123
  }
121
124
  }
122
125
  }
@@ -114,7 +114,10 @@ class MemoryEntityStorageConnector {
114
114
  if (EntityConditions.check(allEntities[i], conditions) && entities.length < finalPageSize) {
115
115
  entities.push(ObjectHelper.pick(allEntities[i], properties));
116
116
  if (entities.length >= finalPageSize) {
117
- nextCursor = (i + 1).toString();
117
+ if (i < allEntities.length - 1) {
118
+ nextCursor = (i + 1).toString();
119
+ }
120
+ break;
118
121
  }
119
122
  }
120
123
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/entity-storage-connector-memory - Changelog
2
2
 
3
- ## v0.0.1-next.12
3
+ ## v0.0.1-next.13
4
4
 
5
5
  - Initial Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/entity-storage-connector-memory",
3
- "version": "0.0.1-next.12",
3
+ "version": "0.0.1-next.13",
4
4
  "description": "Entity Storage connector implementation using in-memory storage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
18
  "@twin.org/entity": "next",
19
- "@twin.org/entity-storage-models": "0.0.1-next.12",
19
+ "@twin.org/entity-storage-models": "0.0.1-next.13",
20
20
  "@twin.org/nameof": "next"
21
21
  },
22
22
  "main": "./dist/cjs/index.cjs",