aedes 0.51.2 → 1.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/.github/actions/sticky-pr-comment/action.yml +55 -0
- package/.github/workflows/benchmark-compare-serial.yml +60 -0
- package/.github/workflows/ci.yml +12 -17
- package/.release-it.json +18 -0
- package/.taprc +15 -6
- package/README.md +6 -4
- package/aedes.d.ts +0 -6
- package/aedes.js +270 -238
- package/benchmarks/README.md +33 -0
- package/benchmarks/pingpong.js +94 -25
- package/benchmarks/receiver.js +77 -0
- package/benchmarks/report.js +150 -0
- package/benchmarks/runBenchmarks.js +118 -0
- package/benchmarks/sender.js +86 -0
- package/benchmarks/server.js +19 -18
- package/checkVersion.js +20 -0
- package/docs/Aedes.md +66 -8
- package/docs/Client.md +3 -4
- package/docs/Examples.md +39 -22
- package/docs/MIGRATION.md +50 -0
- package/eslint.config.js +8 -0
- package/example.js +51 -40
- package/examples/clusters/index.js +28 -23
- package/examples/clusters/package.json +10 -6
- package/lib/client.js +405 -306
- package/lib/handlers/connect.js +42 -38
- package/lib/handlers/index.js +9 -11
- package/lib/handlers/ping.js +2 -3
- package/lib/handlers/puback.js +5 -5
- package/lib/handlers/publish.js +29 -14
- package/lib/handlers/pubrec.js +9 -17
- package/lib/handlers/pubrel.js +34 -25
- package/lib/handlers/subscribe.js +54 -43
- package/lib/handlers/unsubscribe.js +16 -19
- package/lib/qos-packet.js +14 -17
- package/lib/utils.js +5 -12
- package/lib/write.js +4 -5
- package/package.json +134 -136
- package/test/auth.js +468 -804
- package/test/basic.js +613 -575
- package/test/bridge.js +44 -40
- package/test/client-pub-sub.js +531 -504
- package/test/close_socket_by_other_party.js +137 -102
- package/test/connect.js +487 -484
- package/test/drain-timeout.js +593 -0
- package/test/drain-toxiproxy.js +620 -0
- package/test/events.js +174 -144
- package/test/helper.js +351 -73
- package/test/keep-alive.js +40 -67
- package/test/meta.js +257 -210
- package/test/not-blocking.js +93 -197
- package/test/qos1.js +464 -554
- package/test/qos2.js +308 -393
- package/test/regr-21.js +39 -21
- package/test/require.cjs +22 -0
- package/test/retain.js +349 -398
- package/test/topics.js +176 -183
- package/test/types/aedes.test-d.ts +4 -8
- package/test/will.js +310 -428
- package/types/instance.d.ts +40 -35
- package/types/packet.d.ts +10 -10
- package/.coveralls.yml +0 -1
- package/benchmarks/bombing.js +0 -34
- package/benchmarks/bombingQoS1.js +0 -36
- package/benchmarks/throughputCounter.js +0 -23
- package/benchmarks/throughputCounterQoS1.js +0 -33
- package/types/.eslintrc.json +0 -47
package/package.json
CHANGED
|
@@ -1,138 +1,136 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"uuid": "^9.0.1"
|
|
137
|
-
}
|
|
2
|
+
"name": "aedes",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Stream-based MQTT broker",
|
|
5
|
+
"exports": "./aedes.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"types": "aedes.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"lint": "npm run lint:code && npm run lint:markdown",
|
|
10
|
+
"lint:fix": "eslint --fix",
|
|
11
|
+
"lint:code": "eslint",
|
|
12
|
+
"lint:markdown": "markdownlint docs/*.md README.md",
|
|
13
|
+
"lint:markdown:fix": "markdownlint --fix docs/*.md README.md",
|
|
14
|
+
"test": "npm run lint && npm run unit && npm run test:typescript",
|
|
15
|
+
"test:ci": "npm run lint && npm run coverage && npm run test:typescript",
|
|
16
|
+
"test:report": "npm run lint && npm run unit:report && npm run test:typescript",
|
|
17
|
+
"test:typescript": "tsd",
|
|
18
|
+
"unit": "node checkVersion.js && npm run unit:v20win32 || npm run unit:other",
|
|
19
|
+
"unit:v20win32": "node --test --test-timeout=180000",
|
|
20
|
+
"unit:other": "node --test --test-timeout=180000 test/*.js test/*.cjs",
|
|
21
|
+
"coverage": "c8 --reporter=lcov npm run unit",
|
|
22
|
+
"coverage:report": "c8 report",
|
|
23
|
+
"license-checker": "license-checker --production --onlyAllow=\"MIT;ISC;BSD-3-Clause;BSD-2-Clause;0BSD\"",
|
|
24
|
+
"release": "read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it --disable-metrics"
|
|
25
|
+
},
|
|
26
|
+
"pre-commit": [
|
|
27
|
+
"test"
|
|
28
|
+
],
|
|
29
|
+
"tsd": {
|
|
30
|
+
"directory": "test/types"
|
|
31
|
+
},
|
|
32
|
+
"standard": {
|
|
33
|
+
"ignore": [
|
|
34
|
+
"types/*",
|
|
35
|
+
"test/types/*"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/moscajs/aedes.git"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"mqtt",
|
|
44
|
+
"broker",
|
|
45
|
+
"server",
|
|
46
|
+
"mqtt-server",
|
|
47
|
+
"stream",
|
|
48
|
+
"streams",
|
|
49
|
+
"publish",
|
|
50
|
+
"subscribe",
|
|
51
|
+
"pubsub",
|
|
52
|
+
"messaging",
|
|
53
|
+
"mosca",
|
|
54
|
+
"mosquitto",
|
|
55
|
+
"iot",
|
|
56
|
+
"internet",
|
|
57
|
+
"of",
|
|
58
|
+
"things"
|
|
59
|
+
],
|
|
60
|
+
"author": "Matteo Collina <hello@matteocollina.com>",
|
|
61
|
+
"contributors": [
|
|
62
|
+
{
|
|
63
|
+
"name": "Gavin D'mello",
|
|
64
|
+
"url": "https://github.com/GavinDmello"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "Behrad Zari",
|
|
68
|
+
"url": "https://github.com/behrad"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "Gnought",
|
|
72
|
+
"url": "https://github.com/gnought"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "Daniel Lando",
|
|
76
|
+
"url": "https://github.com/robertsLando"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"license": "MIT",
|
|
80
|
+
"funding": {
|
|
81
|
+
"type": "opencollective",
|
|
82
|
+
"url": "https://opencollective.com/aedes"
|
|
83
|
+
},
|
|
84
|
+
"bugs": {
|
|
85
|
+
"url": "https://github.com/moscajs/aedes/issues"
|
|
86
|
+
},
|
|
87
|
+
"homepage": "https://github.com/moscajs/aedes#readme",
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=20"
|
|
90
|
+
},
|
|
91
|
+
"devDependencies": {
|
|
92
|
+
"@fastify/pre-commit": "^2.2.0",
|
|
93
|
+
"@types/node": "^24.2.0",
|
|
94
|
+
"c8": "^10.1.3",
|
|
95
|
+
"eslint": "^9.32.0",
|
|
96
|
+
"license-checker": "^25.0.1",
|
|
97
|
+
"markdownlint-cli": "^0.45.0",
|
|
98
|
+
"mqtt": "^5.14.0",
|
|
99
|
+
"neostandard": "^0.12.2",
|
|
100
|
+
"release-it": "^19.0.4",
|
|
101
|
+
"testcontainers": "^11.9.0",
|
|
102
|
+
"toxiproxy-node-client": "^4.0.0",
|
|
103
|
+
"tsd": "^0.33.0",
|
|
104
|
+
"ws": "^8.18.3"
|
|
105
|
+
},
|
|
106
|
+
"dependencies": {
|
|
107
|
+
"aedes-packet": "^3.0.0",
|
|
108
|
+
"aedes-persistence": "^10.2.2",
|
|
109
|
+
"end-of-stream": "^1.4.5",
|
|
110
|
+
"fastfall": "^1.5.1",
|
|
111
|
+
"fastparallel": "^2.4.1",
|
|
112
|
+
"fastseries": "^2.0.0",
|
|
113
|
+
"hyperid": "^3.3.0",
|
|
114
|
+
"mqemitter": "^7.1.0",
|
|
115
|
+
"mqtt-packet": "^9.0.2",
|
|
116
|
+
"retimer": "^4.0.0",
|
|
117
|
+
"reusify": "^1.1.0",
|
|
118
|
+
"uuid": "^11.1.0"
|
|
119
|
+
},
|
|
120
|
+
"peerDependencies": {
|
|
121
|
+
"aedes-persistence-level": "^9.1.2",
|
|
122
|
+
"aedes-persistence-mongodb": "^9.3.1",
|
|
123
|
+
"aedes-persistence-redis": "^11.2.1"
|
|
124
|
+
},
|
|
125
|
+
"peerDependenciesMeta": {
|
|
126
|
+
"aedes-persistence-level": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"aedes-persistence-mongodb": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"aedes-persistence-redis": {
|
|
133
|
+
"optional": true
|
|
134
|
+
}
|
|
135
|
+
}
|
|
138
136
|
}
|