mqtt 5.6.0 → 5.6.2
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/build/lib/connect/index.js +7 -1
- package/build/lib/connect/index.js.map +1 -1
- package/build/lib/is-browser.js +2 -1
- package/build/lib/is-browser.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/dist/mqtt.esm.js +2 -2
- package/dist/mqtt.js +9 -3
- package/dist/mqtt.min.js +2 -2
- package/package.json +1 -1
- package/src/lib/connect/index.ts +10 -1
- package/src/lib/is-browser.ts +2 -1
package/package.json
CHANGED
package/src/lib/connect/index.ts
CHANGED
|
@@ -80,7 +80,16 @@ function connect(
|
|
|
80
80
|
parsed.port = Number(parsed.port)
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
opts = {
|
|
83
|
+
opts = {
|
|
84
|
+
...{
|
|
85
|
+
port: parsed.port,
|
|
86
|
+
host: parsed.hostname,
|
|
87
|
+
protocol: parsed.protocol,
|
|
88
|
+
query: parsed.query,
|
|
89
|
+
auth: parsed.auth,
|
|
90
|
+
},
|
|
91
|
+
...opts,
|
|
92
|
+
} as IClientOptions
|
|
84
93
|
|
|
85
94
|
if (opts.protocol === null) {
|
|
86
95
|
throw new Error('Missing protocol')
|
package/src/lib/is-browser.ts
CHANGED
|
@@ -4,7 +4,8 @@ const isStandardBrowserEnv = () => {
|
|
|
4
4
|
// Is the process an electron application
|
|
5
5
|
// check if we are in electron `renderer`
|
|
6
6
|
const electronRenderCheck =
|
|
7
|
-
navigator
|
|
7
|
+
typeof navigator !== 'undefined' &&
|
|
8
|
+
navigator.userAgent?.toLowerCase().indexOf(' electron/') > -1
|
|
8
9
|
if (electronRenderCheck && process?.versions) {
|
|
9
10
|
const electronMainCheck = Object.prototype.hasOwnProperty.call(
|
|
10
11
|
process.versions,
|