@arcblock/event-hub 1.28.5 → 1.28.7

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 CHANGED
@@ -9,7 +9,7 @@ A module for local and remote Inter Process Event
9
9
  Install
10
10
 
11
11
  ```shell
12
- pnpm install @arcblock/event-hub
12
+ bun install @arcblock/event-hub
13
13
  ```
14
14
 
15
15
  Server
@@ -1,4 +1,4 @@
1
- const { EventEmitter } = require('events');
1
+ const { EventEmitter } = require('node:events');
2
2
 
3
3
  class Client extends EventEmitter {
4
4
  broadcast(...args) {
package/lib/client.js CHANGED
@@ -1,5 +1,4 @@
1
- // eslint-disable-next-line max-classes-per-file
2
- const { EventEmitter } = require('events');
1
+ const { EventEmitter } = require('node:events');
3
2
  const axon = require('axon');
4
3
  const roundrobin = require('axon/lib/plugins/round-robin');
5
4
  const queue = require('axon/lib/plugins/queue');
package/lib/rpc.js CHANGED
@@ -1,7 +1,6 @@
1
- /* eslint-disable no-console */
2
1
  const axon = require('axon');
3
2
  const Message = require('amp-message');
4
- const { randomUUID } = require('crypto');
3
+ const { randomUUID } = require('node:crypto');
5
4
 
6
5
  class Client extends axon.Socket {
7
6
  /**
@@ -62,7 +61,7 @@ class Client extends axon.Socket {
62
61
  sendEvent(event, data) {
63
62
  const buf = this.pack([event, data]);
64
63
  const s = this.socks[0];
65
- if (s && s.writable) s.write(buf);
64
+ if (s?.writable) s.write(buf);
66
65
  else throw new Error('axon socket not writable/connected');
67
66
  }
68
67
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-console */
2
1
  const Server = require('./server');
3
2
 
4
3
  const port = Number(process.env.ABT_NODE_EVENT_PORT);
package/lib/server.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-console */
2
1
  const axon = require('axon');
3
2
  const Message = require('amp-message');
4
3
  const JWT = require('@arcblock/jwt');
package/package.json CHANGED
@@ -3,13 +3,19 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.28.5",
6
+ "version": "1.28.7",
7
7
  "description": "A nodejs module for local and remote Inter Process Event",
8
8
  "main": "lib/index.js",
9
9
  "files": [
10
10
  "lib",
11
11
  "single.js"
12
12
  ],
13
+ "scripts": {
14
+ "lint": "biome check",
15
+ "lint:fix": "biome check --write",
16
+ "test": "bun test",
17
+ "coverage": "npm run test -- --coverage"
18
+ },
13
19
  "keywords": [],
14
20
  "author": "arcblock <engineer@arcblock.io>",
15
21
  "contributors": [
@@ -17,20 +23,12 @@
17
23
  ],
18
24
  "license": "MIT",
19
25
  "dependencies": {
26
+ "@arcblock/did": "1.28.7",
27
+ "@arcblock/jwt": "1.28.7",
28
+ "@ocap/wallet": "1.28.7",
20
29
  "amp-message": "~0.1.2",
21
- "axon": "^2.0.3",
22
- "@arcblock/did": "1.28.5",
23
- "@arcblock/jwt": "1.28.5",
24
- "@ocap/wallet": "1.28.5"
30
+ "axon": "^2.0.3"
25
31
  },
26
- "devDependencies": {
27
- "jest": "^29.7.0"
28
- },
29
- "gitHead": "e5764f753181ed6a7c615cd4fc6682aacf0cb7cd",
30
- "scripts": {
31
- "lint": "eslint tests lib",
32
- "lint:fix": "eslint --fix tests lib",
33
- "test": "jest --forceExit --detectOpenHandles",
34
- "coverage": "npm run test -- --coverage"
35
- }
36
- }
32
+ "devDependencies": {},
33
+ "gitHead": "e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"
34
+ }
package/LICENSE DELETED
@@ -1,13 +0,0 @@
1
- Copyright 2018-2025 ArcBlock
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.