@ikonintegration/ikapi 2.6.0-beta → 2.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonintegration/ikapi",
3
- "version": "2.6.0-beta",
3
+ "version": "2.6.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "main.js",
@@ -1,6 +1,7 @@
1
1
  import AWS from "aws-sdk";
2
2
  import HTTPS from "https";
3
3
  import Utils from "./../../API/IKUtils";
4
+ import sha1 from 'sha1';
4
5
  //
5
6
  import IKGlobals from './../../IKGlobals';
6
7
  import IKDB from './../Prototype/IKDB';
@@ -19,7 +20,7 @@ export default class IKDB_DDB extends IKDB {
19
20
  }
20
21
 
21
22
  async _getConnection() {
22
- if (!DDB_CONN && !DDB_CONN_HASH && DDB_CONN_HASH != sha1(this.region)) DDB_CONN = await this._newConnection(this.config);
23
+ if ((!DDB_CONN && !DDB_CONN_HASH) || DDB_CONN_HASH != sha1(this.region)) DDB_CONN = await this._newConnection(this.config);
23
24
  return DDB_CONN;
24
25
  }
25
26
  async connect() {
@@ -27,7 +27,10 @@ export default class IKDBQueryUpdate extends IKDBBaseQuery {
27
27
  this.setValues[key] = val;
28
28
  console.debug(`Append ${key}@${val}`);
29
29
  return true;
30
- } return false;
30
+ }
31
+ //remove
32
+ this.removeValues.push(key);
33
+ return false;
31
34
  }
32
35
  //return if the value was appended or not
33
36
  incrementValue(val, key, prefix) {
@@ -1,4 +1,5 @@
1
1
  import AWS from "aws-sdk";
2
+ import sha1 from 'sha1';
2
3
  //
3
4
  import Utils from "./../API/IKUtils";
4
5
  //reusable client
@@ -32,7 +33,7 @@ export default class IKPublisher {
32
33
  }
33
34
  /* Private */
34
35
  _connect() {
35
- if (!PUBLISHER_CONN && !PUBLISHER_CONN_HASH && PUBLISHER_CONN_HASH != sha1(this.regiond)) {
36
+ if ((!PUBLISHER_CONN && !PUBLISHER_CONN_HASH) || PUBLISHER_CONN_HASH != sha1(this.region)) {
36
37
  //Configure when sending!
37
38
  let configObj = { region: this.region };
38
39
  if (Utils.isOffline()) configObj = { ...configObj, accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY };