@rebasepro/server-mongo 0.29.1 → 0.29.3
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/dist/db/MongoConditionBuilder.d.ts +1 -1
- package/dist/index.es.js +3 -1
- package/dist/index.es.js.map +1 -1
- package/dist/services/MongoHistoryService.d.ts +6 -2
- package/dist/services/MongoRealtimeService.d.ts +34 -8
- package/dist/websocket-CXSVz4oq.js.map +1 -1
- package/dist/websocket.d.ts +15 -3
- package/package.json +5 -5
|
@@ -19,7 +19,7 @@ export declare class MongoConditionBuilder {
|
|
|
19
19
|
* @param filter - Rebase filter values
|
|
20
20
|
* @returns Array of MongoDB filter objects
|
|
21
21
|
*/
|
|
22
|
-
static buildFilterConditions<M extends Record<string, any>>(filter: FilterValues<Extract<keyof M, string>>): Filter<Document>[];
|
|
22
|
+
static buildFilterConditions<M extends Record<string, any>>(filter: FilterValues<Extract<keyof M, string>> | undefined): Filter<Document>[];
|
|
23
23
|
/**
|
|
24
24
|
* One field, one operator, one value.
|
|
25
25
|
*
|
package/dist/index.es.js
CHANGED
|
@@ -34,7 +34,9 @@ var MongoDBConnection = class {
|
|
|
34
34
|
}
|
|
35
35
|
get isConnected() {
|
|
36
36
|
try {
|
|
37
|
-
|
|
37
|
+
const topology = "topology" in this.client ? this.client.topology : void 0;
|
|
38
|
+
if (typeof topology !== "object" || topology === null || !("isConnected" in topology)) return false;
|
|
39
|
+
return typeof topology.isConnected === "function" ? topology.isConnected() === true : false;
|
|
38
40
|
} catch {
|
|
39
41
|
return false;
|
|
40
42
|
}
|