@rebasepro/server-mongo 0.16.0 → 0.16.1-canary.g2d1aec8

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.
@@ -1,8 +1,8 @@
1
1
  import { Db, MongoClient } from "mongodb";
2
2
  import type { BackendBootstrapper } from "@rebasepro/types";
3
- import { MongoDriver } from "./services/MongoDriver";
4
- import { MongoRealtimeService } from "./services/MongoRealtimeService";
5
- import { MongoCollectionRegistry } from "./factory";
3
+ import { MongoDriver } from "./services/MongoDriver.js";
4
+ import { MongoRealtimeService } from "./services/MongoRealtimeService.js";
5
+ import { MongoCollectionRegistry } from "./factory.js";
6
6
  export interface MongoDriverConfig {
7
7
  connection: Db;
8
8
  client: MongoClient;
package/dist/factory.d.ts CHANGED
@@ -6,10 +6,10 @@
6
6
  */
7
7
  import { Db, MongoClient } from "mongodb";
8
8
  import { DataDriver, CollectionConfig } from "@rebasepro/types";
9
- import { MongoDataService } from "./db/MongoDataService";
10
- import { MongoRealtimeService } from "./services/MongoRealtimeService";
11
- import { MongoDriver } from "./services/MongoDriver";
12
- import { MongoHistoryService, HistoryRetentionConfig } from "./services/MongoHistoryService";
9
+ import { MongoDataService } from "./db/MongoDataService.js";
10
+ import { MongoRealtimeService } from "./services/MongoRealtimeService.js";
11
+ import { MongoDriver } from "./services/MongoDriver.js";
12
+ import { MongoHistoryService, HistoryRetentionConfig } from "./services/MongoHistoryService.js";
13
13
  import { BackendConfig, BackendInstance, CollectionRegistryInterface, DataRepository, DatabaseAdmin } from "@rebasepro/types";
14
14
  /**
15
15
  * Configuration for creating a MongoDB backend.
package/dist/index.d.ts CHANGED
@@ -8,11 +8,11 @@
8
8
  * The package implements the abstract interfaces from @rebasepro/server
9
9
  * (DataRepository, RealtimeProvider, CollectionRegistryInterface, etc.)
10
10
  */
11
- export * from "./connection";
12
- export * from "./factory";
13
- export * from "./db/MongoDataService";
14
- export * from "./db/MongoConditionBuilder";
15
- export * from "./services/MongoRealtimeService";
16
- export * from "./services/MongoDriver";
17
- export * from "./MongoBootstrapper";
11
+ export * from "./connection.js";
12
+ export * from "./factory.js";
13
+ export * from "./db/MongoDataService.js";
14
+ export * from "./db/MongoConditionBuilder.js";
15
+ export * from "./services/MongoRealtimeService.js";
16
+ export * from "./services/MongoDriver.js";
17
+ export * from "./MongoBootstrapper.js";
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -6,9 +6,9 @@
6
6
  */
7
7
  import { Db } from "mongodb";
8
8
  import { DataDriver, DeleteProps, CollectionConfig, FetchCollectionProps, FetchOneProps, ListenCollectionProps, ListenOneProps, SaveProps, CollectionRegistryInterface, User, RebaseClient, RebaseSdkData } from "@rebasepro/types";
9
- import { MongoDataService } from "../db/MongoDataService";
10
- import { MongoRealtimeService } from "./MongoRealtimeService";
11
- import { MongoHistoryService } from "./MongoHistoryService";
9
+ import { MongoDataService } from "../db/MongoDataService.js";
10
+ import { MongoRealtimeService } from "./MongoRealtimeService.js";
11
+ import { MongoHistoryService } from "./MongoHistoryService.js";
12
12
  /**
13
13
  * MongoDB DataDriver Delegate
14
14
  *
@@ -7,7 +7,7 @@
7
7
  import { Db, ChangeStream } from "mongodb";
8
8
  import { RealtimeProvider, CollectionSubscriptionConfig, SingleSubscriptionConfig } from "@rebasepro/types";
9
9
  import { WebSocket } from "ws";
10
- import type { MongoDriver } from "./MongoDriver";
10
+ import type { MongoDriver } from "./MongoDriver.js";
11
11
  /** The acting user for a subscription, as the driver and the socket carry it. */
12
12
  export interface SubscriptionAuthContext {
13
13
  uid: string;
@@ -1,7 +1,7 @@
1
1
  import { DatabaseAdmin, AuthAdapter } from "@rebasepro/types";
2
2
  import { Server } from "http";
3
3
  import type { RebaseAuthConfig } from "@rebasepro/server";
4
- import { MongoRealtimeService } from "./services/MongoRealtimeService";
5
- import { MongoDriver } from "./services/MongoDriver";
4
+ import { MongoRealtimeService } from "./services/MongoRealtimeService.js";
5
+ import { MongoDriver } from "./services/MongoDriver.js";
6
6
  export declare function createMongoWebSocket(server: Server, realtimeService: MongoRealtimeService, driver: MongoDriver, authConfig?: RebaseAuthConfig, admin?: DatabaseAdmin, authAdapter?: AuthAdapter): void;
7
7
  //# sourceMappingURL=websocket.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/server-mongo",
3
3
  "type": "module",
4
- "version": "0.16.0",
4
+ "version": "0.16.1-canary.g2d1aec8",
5
5
  "description": "MongoDB backend for Rebase",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/rebaseco"
@@ -40,9 +40,9 @@
40
40
  "dependencies": {
41
41
  "mongodb": "^7.5.0",
42
42
  "ws": "^8.21.1",
43
- "@rebasepro/common": "0.16.0",
44
- "@rebasepro/types": "0.16.0",
45
- "@rebasepro/utils": "0.16.0"
43
+ "@rebasepro/types": "0.16.1-canary.g2d1aec8",
44
+ "@rebasepro/common": "0.16.1-canary.g2d1aec8",
45
+ "@rebasepro/utils": "0.16.1-canary.g2d1aec8"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/jest": "^30.0.0",
@@ -55,7 +55,7 @@
55
55
  "vite": "^8.1.5"
56
56
  },
57
57
  "peerDependencies": {
58
- "@rebasepro/server": "0.16.0"
58
+ "@rebasepro/server": "0.16.1-canary.g2d1aec8"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "@rebasepro/server": {
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "scripts": {
74
74
  "watch": "vite build --watch",
75
- "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/assert-build-output.mjs",
75
+ "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json && node ../../scripts/add-dts-extensions.mjs dist && node ../../scripts/assert-build-output.mjs",
76
76
  "test:lint": "eslint \"src/**\" --quiet",
77
77
  "test": "jest --passWithNoTests --forceExit",
78
78
  "clean": "rm -rf dist && find ./src -name '*.js' -type f | xargs rm -f"