@things-factory/integration-base 6.2.39 → 6.2.42

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": "@things-factory/integration-base",
3
- "version": "6.2.39",
3
+ "version": "6.2.42",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@apollo/client": "^3.6.9",
29
- "@things-factory/api": "^6.2.38",
30
- "@things-factory/auth-base": "^6.2.38",
29
+ "@things-factory/api": "^6.2.42",
30
+ "@things-factory/auth-base": "^6.2.42",
31
31
  "@things-factory/env": "^6.2.33",
32
- "@things-factory/oauth2-client": "^6.2.38",
33
- "@things-factory/scheduler-client": "^6.2.38",
34
- "@things-factory/shell": "^6.2.34",
32
+ "@things-factory/oauth2-client": "^6.2.42",
33
+ "@things-factory/scheduler-client": "^6.2.42",
34
+ "@things-factory/shell": "^6.2.42",
35
35
  "async-mqtt": "^2.5.0",
36
36
  "chance": "^1.1.11",
37
37
  "cross-fetch": "^3.0.4",
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "@types/cron": "^2.0.1"
48
48
  },
49
- "gitHead": "7d263cbcb5703048f6709d950deb2160638ef3c6"
49
+ "gitHead": "cc76b5c3dea6a88d4381e914eeaaff9e102e672d"
50
50
  }
@@ -74,7 +74,7 @@ export class OperatoConnector implements Connector {
74
74
  async connect(connection) {
75
75
  var {
76
76
  endpoint: uri,
77
- params: { authKey, domain, subscriptionHandlers }
77
+ params: { authKey, domain, subscriptionHandlers = {} }
78
78
  } = connection
79
79
 
80
80
  if (!authKey || !domain) {
@@ -193,7 +193,8 @@ export class OperatoConnector implements Connector {
193
193
  ConnectionManager.logger.info(`(${tag}:${scenarioName}) subscription closed flag: ${subscriptionObserver.closed}`)
194
194
  })
195
195
 
196
- ConnectionManager.addConnectionInstance(connection, { client, subscriptions })
196
+ client['subscriptions'] = subscriptions
197
+ ConnectionManager.addConnectionInstance(connection, client)
197
198
 
198
199
  ConnectionManager.logger.info(
199
200
  `graphql-connector connection(${connection.name}:${connection.endpoint}) is connected`
@@ -201,7 +202,8 @@ export class OperatoConnector implements Connector {
201
202
  }
202
203
 
203
204
  async disconnect(connection) {
204
- var { client, subscriptions } = ConnectionManager.getConnectionInstance(connection)
205
+ var client = ConnectionManager.getConnectionInstance(connection)
206
+ let subscriptions: SubscriberData[] = client['subscriptions']
205
207
  subscriptions.forEach(subscription => subscription.subscriptionObserver.unsubscribe())
206
208
  client.stop()
207
209
  ConnectionManager.removeConnectionInstance(connection)