mssql-cr-layer 2.0.8 → 2.0.12
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 +1 -1
- package/package.json +6 -6
- package/src/index.js +10 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2021 Andre Gloria <andredagloria@gmail.com> (andrglo.com)
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mssql-cr-layer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "A MS SQL Server interface layer for common requests",
|
|
5
5
|
"repository": "andrglo/mssql-cr-layer",
|
|
6
6
|
"author": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"interface"
|
|
21
21
|
],
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"chai": "^4.
|
|
24
|
-
"coveralls": "^3.1.
|
|
25
|
-
"eslint": "^
|
|
23
|
+
"chai": "^4.3.4",
|
|
24
|
+
"coveralls": "^3.1.1",
|
|
25
|
+
"eslint": "^8.1.0",
|
|
26
26
|
"eslint-config-google": "^0.14.0",
|
|
27
|
-
"mocha": "^8.
|
|
27
|
+
"mocha": "^8.4.0",
|
|
28
28
|
"nyc": "^15.1.0"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"lodash.every": "^4.6.0",
|
|
38
|
-
"mssql": "^
|
|
38
|
+
"mssql": "^7.2.1"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/src/index.js
CHANGED
|
@@ -343,14 +343,13 @@ function decimalPlaces(num) {
|
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
function toMssqlConfig(config) {
|
|
346
|
-
|
|
346
|
+
const mssqlConfig = {
|
|
347
347
|
port: 1433,
|
|
348
348
|
server: config.host || 'localhost',
|
|
349
349
|
requestTimeout: 6000,
|
|
350
350
|
...config || {},
|
|
351
351
|
pool: {
|
|
352
|
-
min: 0
|
|
353
|
-
...config.pool || {}
|
|
352
|
+
min: 0
|
|
354
353
|
},
|
|
355
354
|
options: {
|
|
356
355
|
encrypt: false,
|
|
@@ -358,4 +357,12 @@ function toMssqlConfig(config) {
|
|
|
358
357
|
...config.options || {},
|
|
359
358
|
}
|
|
360
359
|
}
|
|
360
|
+
if (config.pool) {
|
|
361
|
+
mssqlConfig.pool = {...mssqlConfig.pool, ...config.pool}
|
|
362
|
+
if (mssqlConfig.pool.idleTimeout) {
|
|
363
|
+
mssqlConfig.pool.idleTimeoutMillis = mssqlConfig.pool.idleTimeout
|
|
364
|
+
delete mssqlConfig.pool.idleTimeout
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return mssqlConfig
|
|
361
368
|
}
|