mqtt 2.18.9 → 3.0.0
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/CONTRIBUTING.md +27 -27
- package/LICENSE.md +15 -15
- package/README.md +689 -612
- package/bin/pub.js +146 -146
- package/bin/sub.js +123 -123
- package/dist/mqtt.js +11916 -14116
- package/dist/mqtt.min.js +1 -1
- package/doc/help.txt +8 -8
- package/doc/publish.txt +26 -26
- package/doc/subscribe.txt +26 -26
- package/examples/client/secure-client.js +24 -24
- package/examples/client/simple-both.js +13 -13
- package/examples/client/simple-publish.js +7 -7
- package/examples/client/simple-subscribe.js +9 -9
- package/examples/tls client/crt.ca.cg.pem +34 -34
- package/examples/tls client/mqttclient.js +48 -48
- package/examples/tls client/tls-cert.pem +13 -13
- package/examples/tls client/tls-key.pem +15 -15
- package/examples/wss/client.js +49 -49
- package/examples/wss/client_with_proxy.js +58 -58
- package/lib/client.js +1460 -1129
- package/lib/connect/ali.js +130 -0
- package/lib/connect/index.js +157 -149
- package/lib/connect/tcp.js +19 -19
- package/lib/connect/tls.js +41 -41
- package/lib/connect/ws.js +92 -92
- package/lib/connect/wx.js +134 -110
- package/lib/store.js +140 -140
- package/lib/validations.js +52 -52
- package/mqtt.js +41 -41
- package/package.json +112 -107
- package/test/abstract_client.js +3084 -2667
- package/test/abstract_store.js +135 -135
- package/test/browser/server.js +132 -132
- package/test/browser/test.js +92 -92
- package/test/client.js +1129 -544
- package/test/helpers/private-csr.pem +16 -16
- package/test/helpers/private-key.pem +27 -27
- package/test/helpers/public-cert.pem +19 -19
- package/test/helpers/public-key.pem +9 -9
- package/test/helpers/server.js +52 -52
- package/test/helpers/server_process.js +9 -9
- package/test/helpers/tls-cert.pem +14 -14
- package/test/helpers/tls-csr.pem +11 -11
- package/test/helpers/tls-key.pem +15 -15
- package/test/helpers/wrong-cert.pem +13 -13
- package/test/helpers/wrong-csr.pem +11 -11
- package/test/helpers/wrong-key.pem +15 -15
- package/test/mocha.opts +4 -4
- package/test/mqtt.js +230 -230
- package/test/mqtt_store.js +9 -9
- package/test/secure_client.js +157 -157
- package/test/server.js +93 -65
- package/test/store.js +10 -10
- package/test/typescript/broker-connect-subscribe-and-publish.js +24 -0
- package/test/typescript/broker-connect-subscribe-and-publish.js.map +1 -0
- package/test/typescript/broker-connect-subscribe-and-publish.ts +22 -22
- package/test/typescript/tsconfig.json +14 -14
- package/test/util.js +13 -13
- package/test/websocket_client.js +144 -144
- package/types/index.d.ts +27 -27
- package/types/lib/client-options.d.ts +178 -137
- package/types/lib/client.d.ts +231 -196
- package/types/lib/connect/index.d.ts +10 -10
- package/types/lib/store-options.d.ts +6 -6
- package/types/lib/store.d.ts +46 -46
- package/test/browser/wx.js +0 -93
package/package.json
CHANGED
|
@@ -1,107 +1,112 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mqtt",
|
|
3
|
-
"description": "A library for the MQTT protocol",
|
|
4
|
-
"version": "
|
|
5
|
-
"contributors": [
|
|
6
|
-
"Adam Rudd <adamvrr@gmail.com>",
|
|
7
|
-
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"publish",
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"typescript-compile-
|
|
28
|
-
"typescript-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"browser-
|
|
32
|
-
"
|
|
33
|
-
"sauce-test": "zuul --server test/browser/server.js --tunnel ngrok -- test/browser/test.js",
|
|
34
|
-
"ci": "npm run tslint && npm run typescript-test && npm run test && codecov"
|
|
35
|
-
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "mqtt",
|
|
3
|
+
"description": "A library for the MQTT protocol",
|
|
4
|
+
"version": "3.0.0",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"Adam Rudd <adamvrr@gmail.com>",
|
|
7
|
+
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
|
|
8
|
+
"Siarhei Buntsevich <scarry0506@gmail.com> (https://github.com/scarry1992)"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mqtt",
|
|
12
|
+
"publish/subscribe",
|
|
13
|
+
"publish",
|
|
14
|
+
"subscribe"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git://github.com/mqttjs/MQTT.js.git"
|
|
20
|
+
},
|
|
21
|
+
"main": "mqtt.js",
|
|
22
|
+
"types": "types/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"test": "node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly --",
|
|
25
|
+
"pretest": "standard | snazzy",
|
|
26
|
+
"tslint": "if [[ \"`node -v`\" != \"v4.3.2\" ]]; then tslint types/**/*.d.ts; fi",
|
|
27
|
+
"typescript-compile-test": "tsc -p test/typescript/tsconfig.json",
|
|
28
|
+
"typescript-compile-execute": "node test/typescript/*.js",
|
|
29
|
+
"typescript-test": "npm run typescript-compile-test && npm run typescript-compile-execute",
|
|
30
|
+
"prepare": "npm run browser-build",
|
|
31
|
+
"browser-build": "rimraf dist/ && mkdirp dist/ && browserify mqtt.js -s mqtt > dist/mqtt.js && uglifyjs < dist/mqtt.js > dist/mqtt.min.js",
|
|
32
|
+
"browser-test": "zuul --server test/browser/server.js --local --open test/browser/test.js",
|
|
33
|
+
"sauce-test": "zuul --server test/browser/server.js --tunnel ngrok -- test/browser/test.js",
|
|
34
|
+
"ci": "npm run tslint && npm run typescript-compile-test && npm run test && codecov"
|
|
35
|
+
},
|
|
36
|
+
"pre-commit": [
|
|
37
|
+
"test",
|
|
38
|
+
"tslint"
|
|
39
|
+
],
|
|
40
|
+
"bin": {
|
|
41
|
+
"mqtt_pub": "./bin/pub.js",
|
|
42
|
+
"mqtt_sub": "./bin/sub.js",
|
|
43
|
+
"mqtt": "./mqtt.js"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/",
|
|
47
|
+
"CONTRIBUTING.md",
|
|
48
|
+
"doc",
|
|
49
|
+
"lib",
|
|
50
|
+
"bin",
|
|
51
|
+
"examples",
|
|
52
|
+
"test",
|
|
53
|
+
"types",
|
|
54
|
+
"mqtt.js"
|
|
55
|
+
],
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=4.0.0"
|
|
58
|
+
},
|
|
59
|
+
"browser": {
|
|
60
|
+
"./mqtt.js": "./lib/connect/index.js",
|
|
61
|
+
"fs": false,
|
|
62
|
+
"tls": false,
|
|
63
|
+
"net": false
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"base64-js": "^1.3.0",
|
|
67
|
+
"commist": "^1.0.0",
|
|
68
|
+
"concat-stream": "^1.6.2",
|
|
69
|
+
"end-of-stream": "^1.4.1",
|
|
70
|
+
"es6-map": "^0.1.5",
|
|
71
|
+
"help-me": "^1.0.1",
|
|
72
|
+
"inherits": "^2.0.3",
|
|
73
|
+
"minimist": "^1.2.0",
|
|
74
|
+
"mqtt-packet": "^6.0.0",
|
|
75
|
+
"pump": "^3.0.0",
|
|
76
|
+
"readable-stream": "^2.3.6",
|
|
77
|
+
"reinterval": "^1.1.0",
|
|
78
|
+
"split2": "^3.1.0",
|
|
79
|
+
"websocket-stream": "^5.1.2",
|
|
80
|
+
"xtend": "^4.0.1"
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@types/node": "^10.0.0",
|
|
84
|
+
"browserify": "^16.2.2",
|
|
85
|
+
"codecov": "^3.0.4",
|
|
86
|
+
"global": "^4.3.2",
|
|
87
|
+
"istanbul": "^0.4.5",
|
|
88
|
+
"mkdirp": "^0.5.1",
|
|
89
|
+
"mocha": "^4.1.0",
|
|
90
|
+
"mqtt-connection": "^4.0.0",
|
|
91
|
+
"pre-commit": "^1.2.2",
|
|
92
|
+
"rimraf": "^2.6.2",
|
|
93
|
+
"safe-buffer": "^5.1.2",
|
|
94
|
+
"should": "^13.2.1",
|
|
95
|
+
"sinon": "~1.17.7",
|
|
96
|
+
"snazzy": "^8.0.0",
|
|
97
|
+
"standard": "^11.0.1",
|
|
98
|
+
"through2": "^3.0.0",
|
|
99
|
+
"tslint": "^5.11.0",
|
|
100
|
+
"tslint-config-standard": "^8.0.1",
|
|
101
|
+
"typescript": "^3.2.2",
|
|
102
|
+
"uglify-js": "^3.4.5",
|
|
103
|
+
"ws": "^3.3.3",
|
|
104
|
+
"zuul": "^3.12.0",
|
|
105
|
+
"zuul-ngrok": "^4.0.0"
|
|
106
|
+
},
|
|
107
|
+
"standard": {
|
|
108
|
+
"env": [
|
|
109
|
+
"mocha"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
}
|