@orion-js/mongodb 4.2.4 → 4.2.5
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.cjs +2 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -128,9 +128,6 @@ var OrionMongoDatabaseWrapper = class {
|
|
|
128
128
|
configTimeout;
|
|
129
129
|
constructor(connectionName) {
|
|
130
130
|
this.connectionName = connectionName;
|
|
131
|
-
import_logger.logger.info("New connection requested", {
|
|
132
|
-
connectionName
|
|
133
|
-
});
|
|
134
131
|
this.connectionEvent.setMaxListeners(Number.POSITIVE_INFINITY);
|
|
135
132
|
this.connectionPromise = new Promise((resolve, reject) => {
|
|
136
133
|
if (this.state === "connected") {
|
|
@@ -176,11 +173,8 @@ var OrionMongoDatabaseWrapper = class {
|
|
|
176
173
|
return this;
|
|
177
174
|
}
|
|
178
175
|
this.state = "connecting";
|
|
179
|
-
const censoredURI = this.uri.replace(/\/\/.*:.*@/, "//");
|
|
180
|
-
import_logger.logger.info(
|
|
181
|
-
uri: censoredURI,
|
|
182
|
-
connectionName: this.connectionName
|
|
183
|
-
});
|
|
176
|
+
const censoredURI = this.uri.replace(/\/\/.*:.*@/, "//").replace(/^mongodb(\+srv)?:\/\//, "");
|
|
177
|
+
import_logger.logger.info(`Starting MongoDB connection "${this.connectionName}" [${censoredURI}]`);
|
|
184
178
|
if (this.encrypted.client) {
|
|
185
179
|
await this.connectWithRetry(this.encrypted.client);
|
|
186
180
|
import_logger.logger.info("Successfully connected to encrypted mongo", {
|
|
@@ -191,10 +185,6 @@ var OrionMongoDatabaseWrapper = class {
|
|
|
191
185
|
await this.connectWithRetry(this.client);
|
|
192
186
|
this.state = "connected";
|
|
193
187
|
this.connectionEvent.emit("connected", this.client);
|
|
194
|
-
import_logger.logger.info("Successfully connected to mongo", {
|
|
195
|
-
uri: censoredURI,
|
|
196
|
-
connectionName: this.connectionName
|
|
197
|
-
});
|
|
198
188
|
(0, import_node_process.nextTick)(() => {
|
|
199
189
|
this.connectionEvent.removeAllListeners();
|
|
200
190
|
this.connectionEvent = null;
|