@rebasepro/server-mongodb 0.0.1-canary.ca2cb6e → 0.0.1-canary.dbf160a

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/index.es.js CHANGED
@@ -982,7 +982,7 @@ function createMongoBackend(config) {
982
982
  const admin = {
983
983
  async executeAggregate(pipeline) {
984
984
  const firstStage = pipeline[0];
985
- const collName = firstStage?.$from ?? "__admin__";
985
+ const collName = typeof firstStage.$from === "string" ? firstStage.$from : "__admin__";
986
986
  const cursor = db.collection(collName).aggregate(pipeline);
987
987
  return await cursor.toArray();
988
988
  },
@@ -1172,7 +1172,7 @@ class MongoUserService {
1172
1172
  }
1173
1173
  async updateUser(id, data) {
1174
1174
  const updateData = { ...data, updatedAt: /* @__PURE__ */ new Date() };
1175
- if (updateData.email) updateData.email = updateData.email.toLowerCase();
1175
+ if (typeof updateData.email === "string") updateData.email = updateData.email.toLowerCase();
1176
1176
  await this.collection.updateOne({ id }, { $set: updateData });
1177
1177
  return this.getUserById(id);
1178
1178
  }
@@ -1704,7 +1704,7 @@ function createMongoBootstrapper(mongoConfig) {
1704
1704
  mountRoutes() {
1705
1705
  },
1706
1706
  async initializeWebsockets(server, realtimeService, driver, config) {
1707
- const { createMongoWebSocket } = await import("./websocket-CKXZP-0x.js");
1707
+ const { createMongoWebSocket } = await import("./websocket-BZlPuJrt.js");
1708
1708
  createMongoWebSocket(
1709
1709
  server,
1710
1710
  realtimeService,