pulsar-client 1.11.0-rc.3 → 1.11.0-rc.4
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/README.md +3 -2
- package/package.json +2 -2
- package/src/Client.js +8 -1
package/README.md
CHANGED
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
|
|
24
24
|
The Pulsar Node.js client can be used to create Pulsar producers and consumers in Node.js. For the supported Pulsar features, see [Client Feature Matrix](https://pulsar.apache.org/client-feature-matrix/).
|
|
25
25
|
|
|
26
|
-
This library works only in Node.js
|
|
27
|
-
[node-addon-api](https://github.com/nodejs/node-addon-api) module to wrap the C++ library.
|
|
26
|
+
This library works only in Node.js 12.3 or later because it uses:
|
|
27
|
+
1. The [node-addon-api](https://github.com/nodejs/node-addon-api) module to wrap the C++ library.
|
|
28
|
+
2. The [Mozilla CA](https://nodejs.org/api/tls.html#tlsrootcertificates) file, which is provided by Node.js v12.3.0 and subsequent versions.
|
|
28
29
|
|
|
29
30
|
## Getting Started
|
|
30
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pulsar-client",
|
|
3
|
-
"version": "1.11.0-rc.
|
|
3
|
+
"version": "1.11.0-rc.4",
|
|
4
4
|
"description": "Pulsar Node.js client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"gypfile": true,
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=
|
|
35
|
+
"node": ">=12.3.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@seadub/clang-format-lint": "0.0.2",
|
package/src/Client.js
CHANGED
|
@@ -57,7 +57,14 @@ class Client {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
static genCertFile() {
|
|
60
|
-
|
|
60
|
+
try {
|
|
61
|
+
if (fs.existsSync(certsFilePath)) {
|
|
62
|
+
fs.unlinkSync(certsFilePath);
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.error(err);
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
const fd = fs.openSync(certsFilePath, 'a');
|
|
62
69
|
try {
|
|
63
70
|
tls.rootCertificates.forEach((cert) => {
|