@travetto/model-mongo 6.0.0-rc.3 → 6.0.1
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 +6 -6
- package/src/internal/util.ts +1 -1
- package/src/service.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-mongo",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "Mongo backing for the travetto model module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mongo",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"directory": "module/model-mongo"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@travetto/cli": "^6.0.
|
|
29
|
-
"@travetto/config": "^6.0.
|
|
30
|
-
"@travetto/model": "^6.0.
|
|
31
|
-
"@travetto/model-query": "^6.0.
|
|
32
|
-
"mongodb": "^6.
|
|
28
|
+
"@travetto/cli": "^6.0.1",
|
|
29
|
+
"@travetto/config": "^6.0.1",
|
|
30
|
+
"@travetto/model": "^6.0.1",
|
|
31
|
+
"@travetto/model-query": "^6.0.1",
|
|
32
|
+
"mongodb": "^6.20.0"
|
|
33
33
|
},
|
|
34
34
|
"travetto": {
|
|
35
35
|
"displayName": "MongoDB Model Support"
|
package/src/internal/util.ts
CHANGED
|
@@ -131,7 +131,7 @@ export class MongoUtil {
|
|
|
131
131
|
} else if (firstKey && '$geoWithin' in v) {
|
|
132
132
|
const coords: [number, number][] = castTo(v.$geoWithin);
|
|
133
133
|
const first = coords[0];
|
|
134
|
-
const last = coords
|
|
134
|
+
const last = coords.at(-1)!;
|
|
135
135
|
// Connect if not
|
|
136
136
|
if (first[0] !== last[0] || first[1] !== last[1]) {
|
|
137
137
|
coords.push(first);
|
package/src/service.ts
CHANGED
|
@@ -107,7 +107,7 @@ export class MongoModelService implements
|
|
|
107
107
|
writeConcern: { w: 1 }
|
|
108
108
|
});
|
|
109
109
|
await ModelStorageUtil.registerModelChangeListener(this);
|
|
110
|
-
ShutdownManager.onGracefulShutdown(() => this.client.close()
|
|
110
|
+
ShutdownManager.onGracefulShutdown(() => this.client.close());
|
|
111
111
|
ModelExpiryUtil.registerCull(this);
|
|
112
112
|
}
|
|
113
113
|
|