@karmaniverous/entity-manager 6.1.0-0 → 6.1.0-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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require('../node_modules/tslib/tslib.es6.js');
|
|
4
4
|
var conditionalize = require('./conditionalize.js');
|
|
5
|
+
var typed = require('../node_modules/radash/dist/esm/typed.js');
|
|
5
6
|
|
|
6
7
|
var _EntityManagerClient_options;
|
|
7
8
|
/**
|
|
@@ -10,10 +11,13 @@ var _EntityManagerClient_options;
|
|
|
10
11
|
* @category Client
|
|
11
12
|
*/
|
|
12
13
|
class EntityManagerClient {
|
|
13
|
-
constructor({ batchSize = 25, delayIncrement = 100, maxRetries = 5, throttle = 10, logger = console, logInternals = false, ...
|
|
14
|
+
constructor({ batchSize = 25, delayIncrement = 100, maxRetries = 5, throttle = 10, logger = console, logInternals = false, ...childOptions }) {
|
|
14
15
|
_EntityManagerClient_options.set(this, void 0);
|
|
16
|
+
if (!typed.isFunction(logger.debug))
|
|
17
|
+
throw new Error('logger must support debug method');
|
|
18
|
+
if (!typed.isFunction(logger.error))
|
|
19
|
+
throw new Error('logger must support error method');
|
|
15
20
|
tslib_es6.__classPrivateFieldSet(this, _EntityManagerClient_options, {
|
|
16
|
-
...options,
|
|
17
21
|
batchSize,
|
|
18
22
|
delayIncrement,
|
|
19
23
|
maxRetries,
|
|
@@ -23,6 +27,7 @@ class EntityManagerClient {
|
|
|
23
27
|
...logger,
|
|
24
28
|
debug: conditionalize.conditionalize(logger.debug, logInternals),
|
|
25
29
|
},
|
|
30
|
+
...childOptions,
|
|
26
31
|
}, "f");
|
|
27
32
|
}
|
|
28
33
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -890,7 +890,7 @@ type EntityManagerClientOptions = EntityManagerClientBatchOptions & LoggerOption
|
|
|
890
890
|
*/
|
|
891
891
|
declare abstract class EntityManagerClient<O extends EntityManagerClientOptions> {
|
|
892
892
|
#private;
|
|
893
|
-
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...
|
|
893
|
+
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...childOptions }: O);
|
|
894
894
|
/**
|
|
895
895
|
* Returns the options used to create the EntityManagerClient instance.
|
|
896
896
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -890,7 +890,7 @@ type EntityManagerClientOptions = EntityManagerClientBatchOptions & LoggerOption
|
|
|
890
890
|
*/
|
|
891
891
|
declare abstract class EntityManagerClient<O extends EntityManagerClientOptions> {
|
|
892
892
|
#private;
|
|
893
|
-
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...
|
|
893
|
+
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...childOptions }: O);
|
|
894
894
|
/**
|
|
895
895
|
* Returns the options used to create the EntityManagerClient instance.
|
|
896
896
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -890,7 +890,7 @@ type EntityManagerClientOptions = EntityManagerClientBatchOptions & LoggerOption
|
|
|
890
890
|
*/
|
|
891
891
|
declare abstract class EntityManagerClient<O extends EntityManagerClientOptions> {
|
|
892
892
|
#private;
|
|
893
|
-
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...
|
|
893
|
+
constructor({ batchSize, delayIncrement, maxRetries, throttle, logger, logInternals, ...childOptions }: O);
|
|
894
894
|
/**
|
|
895
895
|
* Returns the options used to create the EntityManagerClient instance.
|
|
896
896
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __classPrivateFieldSet, __classPrivateFieldGet } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { conditionalize } from './conditionalize.js';
|
|
3
|
+
import { isFunction } from '../node_modules/radash/dist/esm/typed.js';
|
|
3
4
|
|
|
4
5
|
var _EntityManagerClient_options;
|
|
5
6
|
/**
|
|
@@ -8,10 +9,13 @@ var _EntityManagerClient_options;
|
|
|
8
9
|
* @category Client
|
|
9
10
|
*/
|
|
10
11
|
class EntityManagerClient {
|
|
11
|
-
constructor({ batchSize = 25, delayIncrement = 100, maxRetries = 5, throttle = 10, logger = console, logInternals = false, ...
|
|
12
|
+
constructor({ batchSize = 25, delayIncrement = 100, maxRetries = 5, throttle = 10, logger = console, logInternals = false, ...childOptions }) {
|
|
12
13
|
_EntityManagerClient_options.set(this, void 0);
|
|
14
|
+
if (!isFunction(logger.debug))
|
|
15
|
+
throw new Error('logger must support debug method');
|
|
16
|
+
if (!isFunction(logger.error))
|
|
17
|
+
throw new Error('logger must support error method');
|
|
13
18
|
__classPrivateFieldSet(this, _EntityManagerClient_options, {
|
|
14
|
-
...options,
|
|
15
19
|
batchSize,
|
|
16
20
|
delayIncrement,
|
|
17
21
|
maxRetries,
|
|
@@ -21,6 +25,7 @@ class EntityManagerClient {
|
|
|
21
25
|
...logger,
|
|
22
26
|
debug: conditionalize(logger.debug, logInternals),
|
|
23
27
|
},
|
|
28
|
+
...childOptions,
|
|
24
29
|
}, "f");
|
|
25
30
|
}
|
|
26
31
|
/**
|
package/package.json
CHANGED