@ikonintegration/ikapi 3.0.9 → 3.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/package.json
CHANGED
|
@@ -4,6 +4,8 @@ import Utils from './../../API/IKUtils';
|
|
|
4
4
|
export default class IKDBQueryScan extends IKDBBaseQuery {
|
|
5
5
|
constructor(optIndexName) {
|
|
6
6
|
super(optIndexName);
|
|
7
|
+
this.limit = -1;
|
|
8
|
+
this.lastEvaluatedKey = null;
|
|
7
9
|
}
|
|
8
10
|
async run(dbManager, appendingItems) {
|
|
9
11
|
const localConsole = (dbManager.transaction ? dbManager.transaction.logger : console);
|
|
@@ -16,15 +18,20 @@ export default class IKDBQueryScan extends IKDBBaseQuery {
|
|
|
16
18
|
unmarshalled = unmarshalled.concat(appendingItems);
|
|
17
19
|
}
|
|
18
20
|
//Check for continuation
|
|
19
|
-
|
|
21
|
+
this.lastEvaluatedKey = resp.LastEvaluatedKey;
|
|
22
|
+
if (resp.LastEvaluatedKey && !(this.limit > 0 && unmarshalled.length == this.limit)) {
|
|
23
|
+
localConsole.debug('Using continuation key:', resp.LastEvaluatedKey);
|
|
20
24
|
this.exclusiveStartKey = resp.LastEvaluatedKey;
|
|
21
25
|
return this.run(dbManager, unmarshalled);
|
|
22
26
|
} return unmarshalled;
|
|
23
27
|
} return null;
|
|
24
28
|
}
|
|
25
|
-
async rawRun(dbManager) {
|
|
29
|
+
async rawRun(dbManager, appendingItems) {
|
|
26
30
|
const localConsole = (dbManager.transaction ? dbManager.transaction.logger : console);
|
|
27
|
-
const query =
|
|
31
|
+
const query = {
|
|
32
|
+
...this._rawQuery(dbManager.tableName),
|
|
33
|
+
...(this.limit > 0 ? { Limit: this.limit - (appendingItems ? appendingItems.length : 0) } : {})
|
|
34
|
+
};
|
|
28
35
|
localConsole.log('Scanning: ', query);
|
|
29
36
|
const resp = await dbManager.connection.scan(query);
|
|
30
37
|
// localConsole.debug('Raw result: ', resp);
|
package/src/Logger/IKLogger.js
CHANGED
|
@@ -30,7 +30,7 @@ export default class IKLogger {
|
|
|
30
30
|
this._setupBindings();
|
|
31
31
|
//
|
|
32
32
|
this.log("Using logger with level: " + LOG_STRINGS[this._LOG_LEVEL]);
|
|
33
|
-
this.debug("logger config: "
|
|
33
|
+
this.debug("logger config: ", this._config);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
//Public
|
|
@@ -114,7 +114,7 @@ export default class IKLogger {
|
|
|
114
114
|
/* Sensitive information handling */
|
|
115
115
|
_supressSensitiveInfo(value) {
|
|
116
116
|
//realy false
|
|
117
|
-
if (this._config.enableSensitiveFiltering !== undefined && !this._config.enableSensitiveFiltering) return value;
|
|
117
|
+
if (this._config.enableSensitiveFiltering !== undefined && (!this._config.enableSensitiveFiltering || this._config.enableSensitiveFiltering == 'false')) return value;
|
|
118
118
|
if (typeof value == "string") {
|
|
119
119
|
//content based replacement
|
|
120
120
|
blacklist.forEach((f) => {
|