mqtt 2.18.8 → 2.18.9

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