@travetto/model-mongo 8.0.0-alpha.30 → 8.0.0-alpha.32
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 +3 -3
- package/package.json +16 -16
- package/src/config.ts +3 -3
- package/support/service.mongo.ts +2 -0
package/README.md
CHANGED
|
@@ -160,11 +160,11 @@ export class MongoModelConfig {
|
|
|
160
160
|
.filter((pair): pair is [string, string | number | boolean] => ['string', 'number', 'boolean'].includes(typeof pair[1]))
|
|
161
161
|
.map(([k, v]) => [k, `${v}`])
|
|
162
162
|
).toString();
|
|
163
|
-
let
|
|
163
|
+
let credentials = '';
|
|
164
164
|
if (this.username) {
|
|
165
|
-
|
|
165
|
+
credentials = `${[this.username, this.password].filter(part => !!part).join(':')}@`;
|
|
166
166
|
}
|
|
167
|
-
const url = `mongodb${this.srvRecord ? '+srv' : ''}://${
|
|
167
|
+
const url = `mongodb${this.srvRecord ? '+srv' : ''}://${credentials}${hosts}/${this.namespace}?${optionString}`;
|
|
168
168
|
return url;
|
|
169
169
|
}
|
|
170
170
|
}
|
package/package.json
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-mongo",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "8.0.0-alpha.32",
|
|
5
4
|
"description": "Mongo backing for the travetto model module.",
|
|
6
5
|
"keywords": [
|
|
6
|
+
"database",
|
|
7
7
|
"mongo",
|
|
8
8
|
"travetto",
|
|
9
|
-
"database",
|
|
10
9
|
"typescript"
|
|
11
10
|
],
|
|
12
11
|
"homepage": "https://travetto.io",
|
|
13
12
|
"license": "MIT",
|
|
14
13
|
"author": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
14
|
+
"name": "Travetto Framework",
|
|
15
|
+
"email": "travetto.framework@gmail.com"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"url": "git+https://github.com/travetto/travetto.git",
|
|
19
|
+
"directory": "module/model-mongo"
|
|
17
20
|
},
|
|
18
21
|
"files": [
|
|
19
22
|
"__index__.ts",
|
|
20
23
|
"src",
|
|
21
24
|
"support"
|
|
22
25
|
],
|
|
26
|
+
"type": "module",
|
|
23
27
|
"main": "__index__.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"directory": "module/model-mongo"
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"@travetto/config": "^8.0.0-alpha.
|
|
30
|
-
"@travetto/model": "^8.0.0-alpha.
|
|
31
|
-
"@travetto/model-indexed": "^8.0.0-alpha.
|
|
32
|
-
"@travetto/model-query": "^8.0.0-alpha.
|
|
32
|
+
"@travetto/config": "^8.0.0-alpha.27",
|
|
33
|
+
"@travetto/model": "^8.0.0-alpha.28",
|
|
34
|
+
"@travetto/model-indexed": "^8.0.0-alpha.30",
|
|
35
|
+
"@travetto/model-query": "^8.0.0-alpha.31",
|
|
33
36
|
"mongodb": "^7.5.0"
|
|
34
37
|
},
|
|
35
38
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^8.0.0-alpha.
|
|
39
|
+
"@travetto/cli": "^8.0.0-alpha.33"
|
|
37
40
|
},
|
|
38
41
|
"peerDependenciesMeta": {
|
|
39
42
|
"@travetto/cli": {
|
|
@@ -42,8 +45,5 @@
|
|
|
42
45
|
},
|
|
43
46
|
"travetto": {
|
|
44
47
|
"displayName": "MongoDB Model Support"
|
|
45
|
-
},
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/config.ts
CHANGED
|
@@ -133,11 +133,11 @@ export class MongoModelConfig {
|
|
|
133
133
|
.filter((pair): pair is [string, string | number | boolean] => ['string', 'number', 'boolean'].includes(typeof pair[1]))
|
|
134
134
|
.map(([k, v]) => [k, `${v}`])
|
|
135
135
|
).toString();
|
|
136
|
-
let
|
|
136
|
+
let credentials = '';
|
|
137
137
|
if (this.username) {
|
|
138
|
-
|
|
138
|
+
credentials = `${[this.username, this.password].filter(part => !!part).join(':')}@`;
|
|
139
139
|
}
|
|
140
|
-
const url = `mongodb${this.srvRecord ? '+srv' : ''}://${
|
|
140
|
+
const url = `mongodb${this.srvRecord ? '+srv' : ''}://${credentials}${hosts}/${this.namespace}?${optionString}`;
|
|
141
141
|
return url;
|
|
142
142
|
}
|
|
143
143
|
}
|
package/support/service.mongo.ts
CHANGED