@wiotp/sdk 0.8.1-alpha.1 → 0.8.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/dist/BaseConfig.js
CHANGED
|
@@ -152,7 +152,7 @@ var BaseConfig = exports["default"] = /*#__PURE__*/function () {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// For encrypted ports
|
|
155
|
-
if (this.options.mqtt.port ==
|
|
155
|
+
if (this.options.mqtt.port == 443 || this.options.mqtt.port == 8883) {
|
|
156
156
|
if (this.options.mqtt.transport == "tcp") {
|
|
157
157
|
return "ssl://" + server;
|
|
158
158
|
}
|
|
@@ -27374,6 +27374,10 @@ var hasDescriptors = require('has-property-descriptors')();
|
|
|
27374
27374
|
var gOPD = require('gopd');
|
|
27375
27375
|
var $TypeError = GetIntrinsic('%TypeError%');
|
|
27376
27376
|
var $floor = GetIntrinsic('%Math.floor%');
|
|
27377
|
+
|
|
27378
|
+
/** @typedef {(...args: unknown[]) => unknown} Func */
|
|
27379
|
+
|
|
27380
|
+
/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
|
|
27377
27381
|
module.exports = function setFunctionLength(fn, length) {
|
|
27378
27382
|
if (typeof fn !== 'function') {
|
|
27379
27383
|
throw new $TypeError('`fn` is not a function');
|
|
@@ -27395,9 +27399,9 @@ module.exports = function setFunctionLength(fn, length) {
|
|
|
27395
27399
|
}
|
|
27396
27400
|
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
27397
27401
|
if (hasDescriptors) {
|
|
27398
|
-
define(fn, 'length', length, true, true);
|
|
27402
|
+
define( /** @type {Parameters<define>[0]} */fn, 'length', length, true, true);
|
|
27399
27403
|
} else {
|
|
27400
|
-
define(fn, 'length', length);
|
|
27404
|
+
define( /** @type {Parameters<define>[0]} */fn, 'length', length);
|
|
27401
27405
|
}
|
|
27402
27406
|
}
|
|
27403
27407
|
return fn;
|
|
@@ -27545,11 +27549,12 @@ function shift(stream) {
|
|
|
27545
27549
|
}
|
|
27546
27550
|
function getStateLength(state) {
|
|
27547
27551
|
if (state.buffer.length) {
|
|
27552
|
+
var idx = state.bufferIndex || 0;
|
|
27548
27553
|
// Since node 6.3.0 state.buffer is a BufferList not an array
|
|
27549
27554
|
if (state.buffer.head) {
|
|
27550
27555
|
return state.buffer.head.data.length;
|
|
27551
|
-
} else if (state.buffer.length > 0 && state.buffer[
|
|
27552
|
-
return state.buffer[
|
|
27556
|
+
} else if (state.buffer.length - idx > 0 && state.buffer[idx]) {
|
|
27557
|
+
return state.buffer[idx].length;
|
|
27553
27558
|
}
|
|
27554
27559
|
}
|
|
27555
27560
|
return state.length;
|
|
@@ -42002,7 +42007,7 @@ var BaseConfig = exports["default"] = /*#__PURE__*/function () {
|
|
|
42002
42007
|
}
|
|
42003
42008
|
|
|
42004
42009
|
// For encrypted ports
|
|
42005
|
-
if (this.options.mqtt.port ==
|
|
42010
|
+
if (this.options.mqtt.port == 443 || this.options.mqtt.port == 8883) {
|
|
42006
42011
|
if (this.options.mqtt.transport == "tcp") {
|
|
42007
42012
|
return "ssl://" + server;
|
|
42008
42013
|
}
|