@e22m4u/js-repository-mongodb-adapter 0.5.1 → 0.5.6

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 e22m4u@yandex.ru
3
+ Copyright (c) 2023-2025 Mikhail Evstropov <e22m4u@yandex.ru>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -164,34 +164,82 @@ var import_js_repository8 = require("@e22m4u/js-repository");
164
164
  var import_js_repository9 = require("@e22m4u/js-repository");
165
165
  var import_js_repository10 = require("@e22m4u/js-repository");
166
166
  var MONGODB_OPTION_NAMES = [
167
- "appname",
167
+ "ALPNProtocols",
168
+ "allowPartialTrustChain",
169
+ "appName",
170
+ "auth",
168
171
  "authMechanism",
169
172
  "authMechanismProperties",
170
173
  "authSource",
174
+ "autoEncryption",
175
+ "autoSelectFamily",
176
+ "autoSelectFamilyAttemptTimeout",
177
+ "bsonRegExp",
178
+ "ca",
179
+ "cert",
180
+ "checkKeys",
181
+ "checkServerIdentity",
182
+ "ciphers",
171
183
  "compressors",
172
184
  "connectTimeoutMS",
185
+ "crl",
173
186
  "directConnection",
187
+ "driverInfo",
188
+ "ecdhCurve",
189
+ "enableUtf8Validation",
190
+ "family",
191
+ "fieldsAsRaw",
192
+ "forceServerObjectId",
174
193
  "heartbeatFrequencyMS",
194
+ "hints",
195
+ "ignoreUndefined",
175
196
  "journal",
197
+ "keepAliveInitialDelay",
198
+ "key",
176
199
  "loadBalanced",
200
+ "localAddress",
201
+ "localPort",
177
202
  "localThresholdMS",
203
+ "lookup",
204
+ "maxConnecting",
178
205
  "maxIdleTimeMS",
179
206
  "maxPoolSize",
180
- "maxConnecting",
181
207
  "maxStalenessSeconds",
208
+ "minDHSize",
209
+ "minHeartbeatFrequencyMS",
182
210
  "minPoolSize",
211
+ "mongodbLogComponentSeverities",
212
+ "mongodbLogMaxDocumentLength",
213
+ "mongodbLogPath",
214
+ "monitorCommands",
215
+ "noDelay",
216
+ "passphrase",
217
+ "pfx",
218
+ "pkFactory",
219
+ "promoteBuffers",
220
+ "promoteLongs",
221
+ "promoteValues",
183
222
  "proxyHost",
223
+ "proxyPassword",
184
224
  "proxyPort",
185
225
  "proxyUsername",
186
- "proxyPassword",
226
+ "raw",
227
+ "readConcern",
187
228
  "readConcernLevel",
188
229
  "readPreference",
189
230
  "readPreferenceTags",
231
+ "rejectUnauthorized",
190
232
  "replicaSet",
191
233
  "retryReads",
192
234
  "retryWrites",
235
+ "secureContext",
236
+ "secureProtocol",
237
+ "serializeFunctions",
238
+ "serverApi",
239
+ "serverMonitoringMode",
193
240
  "serverSelectionTimeoutMS",
194
- "serverSelectionTryOnce",
241
+ "servername",
242
+ "session",
195
243
  "socketTimeoutMS",
196
244
  "srvMaxHosts",
197
245
  "srvServiceName",
@@ -201,12 +249,15 @@ var MONGODB_OPTION_NAMES = [
201
249
  "tlsAllowInvalidCertificates",
202
250
  "tlsAllowInvalidHostnames",
203
251
  "tlsCAFile",
252
+ "tlsCRLFile",
204
253
  "tlsCertificateKeyFile",
205
254
  "tlsCertificateKeyFilePassword",
206
255
  "tlsInsecure",
256
+ "useBigInt64",
207
257
  "w",
208
258
  "waitQueueTimeoutMS",
209
- "wTimeoutMS",
259
+ "writeConcern",
260
+ "wtimeoutMS",
210
261
  "zlibCompressionLevel"
211
262
  ];
212
263
  var DEFAULT_SETTINGS = {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@e22m4u/js-repository-mongodb-adapter",
3
- "version": "0.5.1",
3
+ "version": "0.5.6",
4
4
  "description": "MongoDB адаптер для @e22m4u/js-repository",
5
- "author": "e22m4u <e22m4u@yandex.ru>",
5
+ "author": "Mikhail Evstropov <e22m4u@yandex.ru>",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "MongoDB",
@@ -38,7 +38,7 @@
38
38
  "prepare": "husky"
39
39
  },
40
40
  "dependencies": {
41
- "mongodb": "6.16.0"
41
+ "mongodb": "6.19.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@e22m4u/js-format": "~0.1.0",
@@ -47,17 +47,17 @@
47
47
  "devDependencies": {
48
48
  "@commitlint/cli": "~19.8.1",
49
49
  "@commitlint/config-conventional": "~19.8.1",
50
- "@eslint/js": "~9.30.0",
50
+ "@eslint/js": "~9.34.0",
51
51
  "c8": "~10.1.3",
52
- "chai": "~5.2.0",
53
- "chai-as-promised": "~8.0.1",
54
- "dotenv": "~17.0.0",
55
- "esbuild": "~0.25.5",
56
- "eslint": "~9.30.0",
57
- "eslint-config-prettier": "~10.1.5",
52
+ "chai": "~6.0.1",
53
+ "chai-as-promised": "~8.0.2",
54
+ "dotenv": "~17.2.1",
55
+ "esbuild": "~0.25.9",
56
+ "eslint": "~9.34.0",
57
+ "eslint-config-prettier": "~10.1.8",
58
58
  "eslint-plugin-chai-expect": "~3.1.0",
59
59
  "eslint-plugin-mocha": "~11.1.0",
60
- "globals": "~16.2.0",
60
+ "globals": "~16.3.0",
61
61
  "husky": "~9.1.7",
62
62
  "mocha": "~11.7.1",
63
63
  "prettier": "~3.6.2",
package/setup.sh CHANGED
@@ -20,9 +20,9 @@ if [ "$DOCKER_EXISTS" -ne 0 ]; then
20
20
  exit 1
21
21
  fi
22
22
 
23
- # Pulling latest mongodb image
24
- printf "\nPulling latest mongodb image..."
25
- docker pull mongo:latest > /dev/null 2>&1
23
+ # Pulling mongodb image
24
+ printf "\nPulling mongodb $MONGODB_VERSION image..."
25
+ docker pull mongo:"$MONGODB_VERSION" > /dev/null 2>&1
26
26
 
27
27
  # Starting the mongodb container
28
28
  printf "\nStarting the mongodb container..."
@@ -30,7 +30,7 @@ CONTAINER_EXISTS=$(docker ps -a -q -f name="$MONGODB_CONTAINER")
30
30
  if [ "$CONTAINER_EXISTS" ]; then
31
31
  docker rm -f "$MONGODB_CONTAINER" > /dev/null
32
32
  fi
33
- docker run --name "$MONGODB_CONTAINER" -p "$MONGODB_PORT":27017 -d mongo:latest > /dev/null
33
+ docker run --name "$MONGODB_CONTAINER" -p "$MONGODB_PORT":27017 -d mongo:"$MONGODB_VERSION" > /dev/null
34
34
 
35
35
  # Mongodb container has started
36
36
  printf "\n\nStatus: Mongodb container has started."
@@ -17,39 +17,89 @@ import {InvalidOperatorValueError} from '@e22m4u/js-repository';
17
17
 
18
18
  /**
19
19
  * Mongodb option names.
20
- * 5.8.1
20
+ * 6.19.0
21
+ *
22
+ * https://mongodb.github.io/node-mongodb-native/6.19/interfaces/MongoClientOptions.html
21
23
  *
22
24
  * @type {string[]}
23
25
  */
24
26
  const MONGODB_OPTION_NAMES = [
25
- 'appname',
27
+ 'ALPNProtocols',
28
+ 'allowPartialTrustChain',
29
+ 'appName',
30
+ 'auth',
26
31
  'authMechanism',
27
32
  'authMechanismProperties',
28
33
  'authSource',
34
+ 'autoEncryption',
35
+ 'autoSelectFamily',
36
+ 'autoSelectFamilyAttemptTimeout',
37
+ 'bsonRegExp',
38
+ 'ca',
39
+ 'cert',
40
+ 'checkKeys',
41
+ 'checkServerIdentity',
42
+ 'ciphers',
29
43
  'compressors',
30
44
  'connectTimeoutMS',
45
+ 'crl',
31
46
  'directConnection',
47
+ 'driverInfo',
48
+ 'ecdhCurve',
49
+ 'enableUtf8Validation',
50
+ 'family',
51
+ 'fieldsAsRaw',
52
+ 'forceServerObjectId',
32
53
  'heartbeatFrequencyMS',
54
+ 'hints',
55
+ 'ignoreUndefined',
33
56
  'journal',
57
+ 'keepAliveInitialDelay',
58
+ 'key',
34
59
  'loadBalanced',
60
+ 'localAddress',
61
+ 'localPort',
35
62
  'localThresholdMS',
63
+ 'lookup',
64
+ 'maxConnecting',
36
65
  'maxIdleTimeMS',
37
66
  'maxPoolSize',
38
- 'maxConnecting',
39
67
  'maxStalenessSeconds',
68
+ 'minDHSize',
69
+ 'minHeartbeatFrequencyMS',
40
70
  'minPoolSize',
71
+ 'mongodbLogComponentSeverities',
72
+ 'mongodbLogMaxDocumentLength',
73
+ 'mongodbLogPath',
74
+ 'monitorCommands',
75
+ 'noDelay',
76
+ 'passphrase',
77
+ 'pfx',
78
+ 'pkFactory',
79
+ 'promoteBuffers',
80
+ 'promoteLongs',
81
+ 'promoteValues',
41
82
  'proxyHost',
83
+ 'proxyPassword',
42
84
  'proxyPort',
43
85
  'proxyUsername',
44
- 'proxyPassword',
86
+ 'raw',
87
+ 'readConcern',
45
88
  'readConcernLevel',
46
89
  'readPreference',
47
90
  'readPreferenceTags',
91
+ 'rejectUnauthorized',
48
92
  'replicaSet',
49
93
  'retryReads',
50
94
  'retryWrites',
95
+ 'secureContext',
96
+ 'secureProtocol',
97
+ 'serializeFunctions',
98
+ 'serverApi',
99
+ 'serverMonitoringMode',
51
100
  'serverSelectionTimeoutMS',
52
- 'serverSelectionTryOnce',
101
+ 'servername',
102
+ 'session',
53
103
  'socketTimeoutMS',
54
104
  'srvMaxHosts',
55
105
  'srvServiceName',
@@ -59,12 +109,15 @@ const MONGODB_OPTION_NAMES = [
59
109
  'tlsAllowInvalidCertificates',
60
110
  'tlsAllowInvalidHostnames',
61
111
  'tlsCAFile',
112
+ 'tlsCRLFile',
62
113
  'tlsCertificateKeyFile',
63
114
  'tlsCertificateKeyFilePassword',
64
115
  'tlsInsecure',
116
+ 'useBigInt64',
65
117
  'w',
66
118
  'waitQueueTimeoutMS',
67
- 'wTimeoutMS',
119
+ 'writeConcern',
120
+ 'wtimeoutMS',
68
121
  'zlibCompressionLevel',
69
122
  ];
70
123
 
package/test.env CHANGED
@@ -1,3 +1,4 @@
1
+ MONGODB_VERSION=4.4.29
1
2
  MONGODB_CONTAINER=mongodb_c
2
3
  MONGODB_HOST=localhost
3
4
  MONGODB_PORT=27017