@travetto/model-mongo 7.1.2 → 7.1.4

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/README.md CHANGED
@@ -70,34 +70,29 @@ export class MongoModelConfig {
70
70
  */
71
71
  port?: number;
72
72
  /**
73
- * Direct mongo connection options
73
+ * Direct mongo connection options, these do not go on the connection string
74
74
  */
75
- connectionOptions = {};
75
+ connectionOptions: mongo.MongoClientOptions = {};
76
76
  /**
77
77
  * Is using the SRV DNS record configuration
78
78
  */
79
79
  srvRecord?: boolean;
80
-
81
80
  /**
82
81
  * Mongo client options
83
82
  */
84
83
  options: mongo.MongoClientOptions = {};
85
-
86
84
  /**
87
85
  * Allow storage modification at runtime
88
86
  */
89
87
  modifyStorage?: boolean;
90
-
91
88
  /**
92
89
  * Frequency of culling for cullable content
93
90
  */
94
91
  cullRate?: number | TimeSpan;
95
-
96
92
  /**
97
93
  * Connection string
98
94
  */
99
95
  connectionString?: string;
100
-
101
96
  /**
102
97
  * Should we store the _id as a string in the id field
103
98
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-mongo",
3
- "version": "7.1.2",
3
+ "version": "7.1.4",
4
4
  "type": "module",
5
5
  "description": "Mongo backing for the travetto model module.",
6
6
  "keywords": [
@@ -26,13 +26,13 @@
26
26
  "directory": "module/model-mongo"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^7.1.2",
30
- "@travetto/model": "^7.1.2",
31
- "@travetto/model-query": "^7.1.2",
29
+ "@travetto/config": "^7.1.4",
30
+ "@travetto/model": "^7.1.4",
31
+ "@travetto/model-query": "^7.1.4",
32
32
  "mongodb": "^7.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@travetto/cli": "^7.1.2"
35
+ "@travetto/cli": "^7.1.4"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@travetto/cli": {
package/src/config.ts CHANGED
@@ -29,34 +29,29 @@ export class MongoModelConfig {
29
29
  */
30
30
  port?: number;
31
31
  /**
32
- * Direct mongo connection options
32
+ * Direct mongo connection options, these do not go on the connection string
33
33
  */
34
- connectionOptions = {};
34
+ connectionOptions: mongo.MongoClientOptions = {};
35
35
  /**
36
36
  * Is using the SRV DNS record configuration
37
37
  */
38
38
  srvRecord?: boolean;
39
-
40
39
  /**
41
40
  * Mongo client options
42
41
  */
43
42
  options: mongo.MongoClientOptions = {};
44
-
45
43
  /**
46
44
  * Allow storage modification at runtime
47
45
  */
48
46
  modifyStorage?: boolean;
49
-
50
47
  /**
51
48
  * Frequency of culling for cullable content
52
49
  */
53
50
  cullRate?: number | TimeSpan;
54
-
55
51
  /**
56
52
  * Connection string
57
53
  */
58
54
  connectionString?: string;
59
-
60
55
  /**
61
56
  * Should we store the _id as a string in the id field
62
57
  */
package/src/service.ts CHANGED
@@ -100,7 +100,7 @@ export class MongoModelService implements
100
100
  }
101
101
 
102
102
  async postConstruct(): Promise<void> {
103
- this.client = await MongoClient.connect(this.config.url, this.config.options);
103
+ this.client = await MongoClient.connect(this.config.url, this.config.connectionOptions);
104
104
  this.#db = this.client.db(this.config.namespace);
105
105
  this.#bucket = new GridFSBucket(this.#db, {
106
106
  bucketName: ModelBlobNamespace,