@mysetup/mqtt 1.14.9 → 1.15.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.
@@ -15,7 +15,7 @@ var checkInitConnect = function (props) {
15
15
  protocol: protocol,
16
16
  clientId: props.clientId,
17
17
  clean: false, /// for retaining previous message purpose
18
- rejectUnauthorized: true,
18
+ rejectUnauthorized: false,
19
19
  resubscribe: true,
20
20
  keepalive: 300,
21
21
  username: username,
@@ -2,17 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var logger_1 = require("@mysetup/logger");
4
4
  var mqttClient_1 = require("../mqttClient");
5
+ var _a = process.env, ENVIRONMENT = _a.ENVIRONMENT, MQTT_HOST = _a.MQTT_HOST, MQTT_USERNAME = _a.MQTT_USERNAME, MQTT_PASSWORD = _a.MQTT_PASSWORD, MQTT_PORT = _a.MQTT_PORT;
5
6
  var CLIENT_ID = "testClient-".concat(Math.random().toString(16).slice(2, 8));
6
7
  (0, mqttClient_1.mqttCreateConnection)({
7
8
  clientId: CLIENT_ID,
8
9
  config: {
9
- host: "localhost",
10
- port: 1883,
11
- protocol: "mqtt",
10
+ host: String(MQTT_HOST),
11
+ port: Number(MQTT_PORT),
12
+ protocol: "wss",
12
13
  path: "",
13
- username: process.env.MQTT_USERNAME,
14
- password: process.env.MQTT_PASSWORD,
14
+ username: MQTT_USERNAME,
15
+ password: MQTT_PASSWORD,
15
16
  },
17
+ environment: String(ENVIRONMENT),
16
18
  topicList: ["mj/ems/test"],
17
19
  messageCallback: function (topic, message) {
18
20
  logger_1.logger.info("Message received \u2192 topic: ".concat(topic, ", message: ").concat(message.toString()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysetup/mqtt",
3
- "version": "1.14.9",
3
+ "version": "1.15.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [