lightning-pool 4.4.0 → 4.4.1
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 +7 -1
- package/cjs/pool-request.js +2 -1
- package/esm/pool-request.js +2 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -121,7 +121,13 @@ Acquires a `resource` from the `Pool` or create a new one.
|
|
|
121
121
|
|
|
122
122
|
##### Usage
|
|
123
123
|
|
|
124
|
-
`pool.acquire()
|
|
124
|
+
`pool.acquire(): Promise<any>`
|
|
125
|
+
|
|
126
|
+
`pool.acquire(factoryCreateOptions: any): Promise<any>`
|
|
127
|
+
|
|
128
|
+
`pool.acquire(callback:Callback): Promise<any>`
|
|
129
|
+
|
|
130
|
+
`pool.acquire(factoryCreateOptions?: any, callback:Callback): Promise<any>`
|
|
125
131
|
|
|
126
132
|
- *Returns*: A Promise
|
|
127
133
|
|
package/cjs/pool-request.js
CHANGED
|
@@ -4,10 +4,11 @@ exports.PoolRequest = void 0;
|
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5
5
|
function noop() { }
|
|
6
6
|
class PoolRequest {
|
|
7
|
-
constructor(pool, callback) {
|
|
7
|
+
constructor(pool, callback, options) {
|
|
8
8
|
this.timedOut = false;
|
|
9
9
|
this.created = Date.now();
|
|
10
10
|
this.callback = callback || noop;
|
|
11
|
+
this.options = options;
|
|
11
12
|
if (pool.options.acquireTimeoutMillis) {
|
|
12
13
|
this.timeoutHandle = setTimeout(() => {
|
|
13
14
|
this.timedOut = true;
|
package/esm/pool-request.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2
2
|
function noop() { }
|
|
3
3
|
export class PoolRequest {
|
|
4
|
-
constructor(pool, callback) {
|
|
4
|
+
constructor(pool, callback, options) {
|
|
5
5
|
this.timedOut = false;
|
|
6
6
|
this.created = Date.now();
|
|
7
7
|
this.callback = callback || noop;
|
|
8
|
+
this.options = options;
|
|
8
9
|
if (pool.options.acquireTimeoutMillis) {
|
|
9
10
|
this.timeoutHandle = setTimeout(() => {
|
|
10
11
|
this.timedOut = true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightning-pool",
|
|
3
3
|
"description": "Fastest generic Pool written with TypeScript",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.1",
|
|
5
5
|
"author": "Panates Ltd.",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Eray Hanoglu <e.hanoglu@panates.com>"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"doublylinked": "^2.5.4",
|
|
18
|
-
"putil-promisify": "^1.10.1"
|
|
18
|
+
"putil-promisify": "^1.10.1",
|
|
19
|
+
"tslib": "^2.6.3"
|
|
19
20
|
},
|
|
20
21
|
"type": "module",
|
|
21
22
|
"main": "./cjs/index.js",
|