@rebasepro/server-mongo 0.9.1-canary.f2f61da → 0.9.1-canary.faee831
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 +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/services/MongoRealtimeService.d.ts +5 -5
- package/dist/services/MongoRealtimeService.d.ts.map +1 -1
- package/dist/{websocket-DQlwCHFq.js → websocket-CoKu1mvm.js} +4 -4
- package/dist/websocket-CoKu1mvm.js.map +1 -0
- package/package.json +5 -5
- package/src/services/MongoDriver.ts +2 -2
- package/src/services/MongoRealtimeService.ts +10 -10
- package/src/websocket.ts +3 -3
- package/dist/websocket-DQlwCHFq.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -488,7 +488,7 @@ var MongoRealtimeService = class {
|
|
|
488
488
|
const registryCollection = this.driver?.registry?.getCollectionByPath(config.path);
|
|
489
489
|
if (config.authContext && this.driver) {
|
|
490
490
|
const mockUser = {
|
|
491
|
-
uid: config.authContext.
|
|
491
|
+
uid: config.authContext.uid,
|
|
492
492
|
roles: config.authContext.roles
|
|
493
493
|
};
|
|
494
494
|
rows = await (await this.driver.withAuth(mockUser)).fetchCollection({
|
|
@@ -571,7 +571,7 @@ var MongoRealtimeService = class {
|
|
|
571
571
|
const registryCollection = this.driver?.registry?.getCollectionByPath(config.path);
|
|
572
572
|
if (config.authContext && this.driver) {
|
|
573
573
|
const mockUser = {
|
|
574
|
-
uid: config.authContext.
|
|
574
|
+
uid: config.authContext.uid,
|
|
575
575
|
roles: config.authContext.roles
|
|
576
576
|
};
|
|
577
577
|
row = await (await this.driver.withAuth(mockUser)).fetchOne({
|
|
@@ -651,7 +651,7 @@ var MongoRealtimeService = class {
|
|
|
651
651
|
const ws = this.clients.get(clientId);
|
|
652
652
|
if (!ws) return;
|
|
653
653
|
const authContext = _authContext ? {
|
|
654
|
-
|
|
654
|
+
uid: _authContext.uid,
|
|
655
655
|
roles: (_authContext.roles ?? []).map(String)
|
|
656
656
|
} : void 0;
|
|
657
657
|
switch (message.type) {
|
|
@@ -1357,7 +1357,7 @@ var AuthenticatedMongoDriver = class {
|
|
|
1357
1357
|
listenCollection(props) {
|
|
1358
1358
|
const unsubscribe = this.delegate.listenCollection(props);
|
|
1359
1359
|
const authContext = {
|
|
1360
|
-
|
|
1360
|
+
uid: this.user.uid,
|
|
1361
1361
|
roles: this.user.roles ?? []
|
|
1362
1362
|
};
|
|
1363
1363
|
const subscriptions = this.delegate.getRealtimeService().getSubscriptions();
|
|
@@ -1376,7 +1376,7 @@ var AuthenticatedMongoDriver = class {
|
|
|
1376
1376
|
listenOne(props) {
|
|
1377
1377
|
const unsubscribe = this.delegate.listenOne(props);
|
|
1378
1378
|
const authContext = {
|
|
1379
|
-
|
|
1379
|
+
uid: this.user.uid,
|
|
1380
1380
|
roles: this.user.roles ?? []
|
|
1381
1381
|
};
|
|
1382
1382
|
const subscriptions = this.delegate.getRealtimeService().getSubscriptions();
|
|
@@ -2497,7 +2497,7 @@ function createMongoBootstrapper(mongoConfig) {
|
|
|
2497
2497
|
},
|
|
2498
2498
|
mountRoutes() {},
|
|
2499
2499
|
async initializeWebsockets(server, realtimeService, driver, config) {
|
|
2500
|
-
const { createMongoWebSocket } = await import("./websocket-
|
|
2500
|
+
const { createMongoWebSocket } = await import("./websocket-CoKu1mvm.js");
|
|
2501
2501
|
createMongoWebSocket(server, realtimeService, driver, config, cachedAdmin);
|
|
2502
2502
|
}
|
|
2503
2503
|
};
|