@libp2p/utils 4.0.7-c960eb659 → 4.0.7-d8f5bc211

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.
@@ -0,0 +1,81 @@
1
+ /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
+ import { CodeError, ERR_INVALID_PARAMETERS } from '@libp2p/interface/errors';
3
+ import PQueue from 'p-queue';
4
+ // Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound
5
+ // Used to compute insertion index to keep queue sorted after insertion
6
+ function lowerBound(array, value, comparator) {
7
+ let first = 0;
8
+ let count = array.length;
9
+ while (count > 0) {
10
+ const step = Math.trunc(count / 2);
11
+ let it = first + step;
12
+ if (comparator(array[it], value) <= 0) {
13
+ first = ++it;
14
+ count -= step + 1;
15
+ }
16
+ else {
17
+ count = step;
18
+ }
19
+ }
20
+ return first;
21
+ }
22
+ /**
23
+ * Port of https://github.com/sindresorhus/p-queue/blob/main/source/priority-queue.ts
24
+ * that adds support for filtering jobs by peer id
25
+ */
26
+ class PeerPriorityQueue {
27
+ #queue = [];
28
+ enqueue(run, options) {
29
+ const peerId = options?.peerId;
30
+ const priority = options?.priority ?? 0;
31
+ if (peerId == null) {
32
+ throw new CodeError('missing peer id', ERR_INVALID_PARAMETERS);
33
+ }
34
+ const element = {
35
+ priority,
36
+ peerId,
37
+ run
38
+ };
39
+ if (this.size > 0 && this.#queue[this.size - 1].priority >= priority) {
40
+ this.#queue.push(element);
41
+ return;
42
+ }
43
+ const index = lowerBound(this.#queue, element, (a, b) => b.priority - a.priority);
44
+ this.#queue.splice(index, 0, element);
45
+ }
46
+ dequeue() {
47
+ const item = this.#queue.shift();
48
+ return item?.run;
49
+ }
50
+ filter(options) {
51
+ if (options.peerId != null) {
52
+ const peerId = options.peerId;
53
+ return this.#queue.filter((element) => peerId.equals(element.peerId)).map((element) => element.run);
54
+ }
55
+ return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);
56
+ }
57
+ get size() {
58
+ return this.#queue.length;
59
+ }
60
+ }
61
+ /**
62
+ * Extends PQueue to add support for querying queued jobs by peer id
63
+ */
64
+ export class PeerJobQueue extends PQueue {
65
+ constructor(options = {}) {
66
+ super({
67
+ ...options,
68
+ queueClass: PeerPriorityQueue
69
+ });
70
+ }
71
+ /**
72
+ * Returns true if this queue has a job for the passed peer id that has not yet
73
+ * started to run
74
+ */
75
+ hasJob(peerId) {
76
+ return this.sizeBy({
77
+ peerId
78
+ }) > 0;
79
+ }
80
+ }
81
+ //# sourceMappingURL=peer-job-queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peer-job-queue.js","sourceRoot":"","sources":["../../src/peer-job-queue.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAC5E,OAAO,MAAM,MAAM,SAAS,CAAA;AAI5B,mFAAmF;AACnF,uEAAuE;AACvE,SAAS,UAAU,CAAK,KAAmB,EAAE,KAAQ,EAAE,UAAkC;IACvF,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,CAAA;IAExB,OAAO,KAAK,GAAG,CAAC,EAAE;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;QAClC,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,CAAA;QAErB,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE,CAAE,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE;YACtC,KAAK,GAAG,EAAE,EAAE,CAAA;YACZ,KAAK,IAAI,IAAI,GAAG,CAAC,CAAA;SAClB;aAAM;YACL,KAAK,GAAG,IAAI,CAAA;SACb;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAcD;;;GAGG;AACH,MAAM,iBAAiB;IACZ,MAAM,GAAc,EAAE,CAAA;IAE/B,OAAO,CA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AO,CAAC,GAAG,CAAC,CAAA;SAChE;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CACvB,CAAC,OAA2C,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,CACvF,CAAC,GAAG,CAAC,CAAC,OAAuC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACjE,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;IAC3B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAmD;IACnF,YAAa,UAAgE,EAAE;QAC7E,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,UAAU,EAAE,iBAAiB;SAC9B,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAE,MAAc;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC;YACjB,MAAM;SACP,CAAC,GAAG,CAAC,CAAA;IACR,CAAC;CACF"}
@@ -1,9 +1,11 @@
1
+ import type { ComponentLogger } from '@libp2p/interface';
1
2
  import type { MultiaddrConnection, Stream } from '@libp2p/interface/connection';
2
3
  import type { Multiaddr } from '@multiformats/multiaddr';
3
4
  export interface StreamProperties {
4
5
  stream: Stream;
5
6
  remoteAddr: Multiaddr;
6
7
  localAddr: Multiaddr;
8
+ logger: ComponentLogger;
7
9
  }
8
10
  /**
9
11
  * Convert a duplex iterable into a MultiaddrConnection.
@@ -1 +1 @@
1
- {"version":3,"file":"stream-to-ma-conn.d.ts","sourceRoot":"","sources":["../../src/stream-to-ma-conn.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAIxD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,SAAS,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;CACrB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,CAiDlF"}
1
+ {"version":3,"file":"stream-to-ma-conn.d.ts","sourceRoot":"","sources":["../../src/stream-to-ma-conn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,SAAS,CAAA;IACrB,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,eAAe,CAAA;CACxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,gBAAgB,GAAG,mBAAmB,CA2ElF"}
@@ -1,52 +1,74 @@
1
- import { logger } from '@libp2p/logger';
2
- const log = logger('libp2p:stream:converter');
3
1
  /**
4
2
  * Convert a duplex iterable into a MultiaddrConnection.
5
3
  * https://github.com/libp2p/interface-transport#multiaddrconnection
6
4
  */
7
5
  export function streamToMaConnection(props) {
8
- const { stream, remoteAddr } = props;
9
- const { sink, source } = stream;
10
- const mapSource = (async function* () {
11
- for await (const list of source) {
12
- if (list instanceof Uint8Array) {
13
- yield list;
14
- }
15
- else {
16
- yield* list;
6
+ const { stream, remoteAddr, logger } = props;
7
+ const log = logger.forComponent('libp2p:stream:converter');
8
+ let closedRead = false;
9
+ let closedWrite = false;
10
+ // piggyback on `stream.close` invocations to close maconn
11
+ const streamClose = stream.close.bind(stream);
12
+ stream.close = async (options) => {
13
+ await streamClose(options);
14
+ close(true);
15
+ };
16
+ // piggyback on `stream.abort` invocations to close maconn
17
+ const streamAbort = stream.abort.bind(stream);
18
+ stream.abort = (err) => {
19
+ streamAbort(err);
20
+ close(true);
21
+ };
22
+ // piggyback on `stream.sink` invocations to close maconn
23
+ const streamSink = stream.sink.bind(stream);
24
+ stream.sink = async (source) => {
25
+ try {
26
+ await streamSink(source);
27
+ }
28
+ catch (err) {
29
+ // If aborted we can safely ignore
30
+ if (err.type !== 'aborted') {
31
+ // If the source errored the socket will already have been destroyed by
32
+ // toIterable.duplex(). If the socket errored it will already be
33
+ // destroyed. There's nothing to do here except log the error & return.
34
+ log(err);
17
35
  }
18
36
  }
19
- }());
37
+ finally {
38
+ closedWrite = true;
39
+ close();
40
+ }
41
+ };
20
42
  const maConn = {
21
- async sink(source) {
43
+ log,
44
+ sink: stream.sink,
45
+ source: (async function* () {
22
46
  try {
23
- await sink(source);
24
- close();
25
- }
26
- catch (err) {
27
- // If aborted we can safely ignore
28
- if (err.type !== 'aborted') {
29
- // If the source errored the socket will already have been destroyed by
30
- // toIterable.duplex(). If the socket errored it will already be
31
- // destroyed. There's nothing to do here except log the error & return.
32
- log(err);
47
+ for await (const list of stream.source) {
48
+ if (list instanceof Uint8Array) {
49
+ yield list;
50
+ }
51
+ else {
52
+ yield* list;
53
+ }
33
54
  }
34
55
  }
35
- },
36
- source: mapSource,
56
+ finally {
57
+ closedRead = true;
58
+ close();
59
+ }
60
+ }()),
37
61
  remoteAddr,
38
62
  timeline: { open: Date.now(), close: undefined },
39
- async close(options) {
40
- close();
41
- await stream.close(options);
42
- },
43
- abort(err) {
44
- close();
45
- stream.abort(err);
46
- }
63
+ close: stream.close,
64
+ abort: stream.abort
47
65
  };
48
- function close() {
49
- if (maConn.timeline.close == null) {
66
+ function close(force) {
67
+ if (force === true) {
68
+ closedRead = true;
69
+ closedWrite = true;
70
+ }
71
+ if (closedRead && closedWrite && maConn.timeline.close == null) {
50
72
  maConn.timeline.close = Date.now();
51
73
  }
52
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stream-to-ma-conn.js","sourceRoot":"","sources":["../../src/stream-to-ma-conn.ts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AC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@libp2p/utils",
3
- "version": "4.0.7-c960eb659",
3
+ "version": "4.0.7-d8f5bc211",
4
4
  "description": "Package to aggregate shared logic and dependencies for the libp2p ecosystem",
5
5
  "license": "Apache-2.0 OR MIT",
6
- "homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/utils#readme",
6
+ "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/utils#readme",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/libp2p/js-libp2p.git"
@@ -40,6 +40,10 @@
40
40
  "types": "./src/index.d.ts",
41
41
  "import": "./dist/src/index.js"
42
42
  },
43
+ "./abstract-stream": {
44
+ "types": "./dist/src/abstract-stream.d.ts",
45
+ "import": "./dist/src/abstract-stream.js"
46
+ },
43
47
  "./address-sort": {
44
48
  "types": "./dist/src/address-sort.d.ts",
45
49
  "import": "./dist/src/address-sort.js"
@@ -48,10 +52,18 @@
48
52
  "types": "./dist/src/array-equals.d.ts",
49
53
  "import": "./dist/src/array-equals.js"
50
54
  },
55
+ "./close-source": {
56
+ "types": "./dist/src/close-source.d.ts",
57
+ "import": "./dist/src/close-source.js"
58
+ },
51
59
  "./ip-port-to-multiaddr": {
52
60
  "types": "./dist/src/ip-port-to-multiaddr.d.ts",
53
61
  "import": "./dist/src/ip-port-to-multiaddr.js"
54
62
  },
63
+ "./is-promise": {
64
+ "types": "./dist/src/is-promise.d.ts",
65
+ "import": "./dist/src/is-promise.js"
66
+ },
55
67
  "./multiaddr/is-loopback": {
56
68
  "types": "./dist/src/multiaddr/is-loopback.d.ts",
57
69
  "import": "./dist/src/multiaddr/is-loopback.js"
@@ -60,6 +72,10 @@
60
72
  "types": "./dist/src/multiaddr/is-private.d.ts",
61
73
  "import": "./dist/src/multiaddr/is-private.js"
62
74
  },
75
+ "./peer-job-queue": {
76
+ "types": "./dist/src/peer-job-queue.d.ts",
77
+ "import": "./dist/src/peer-job-queue.js"
78
+ },
63
79
  "./stream-to-ma-conn": {
64
80
  "types": "./dist/src/stream-to-ma-conn.d.ts",
65
81
  "import": "./dist/src/stream-to-ma-conn.js"
@@ -87,20 +103,30 @@
87
103
  },
88
104
  "dependencies": {
89
105
  "@chainsafe/is-ip": "^2.0.2",
90
- "@libp2p/interface": "0.1.6-c960eb659",
91
- "@libp2p/logger": "3.1.0-c960eb659",
92
- "@multiformats/multiaddr": "^12.1.5",
93
- "@multiformats/multiaddr-matcher": "^1.0.1",
106
+ "@libp2p/interface": "0.1.6-d8f5bc211",
107
+ "@multiformats/multiaddr": "^12.1.10",
108
+ "@multiformats/multiaddr-matcher": "^1.1.0",
109
+ "get-iterator": "^2.0.1",
94
110
  "is-loopback-addr": "^2.0.1",
111
+ "it-pushable": "^3.2.2",
95
112
  "it-stream-types": "^2.0.1",
96
- "private-ip": "^3.0.0",
113
+ "p-queue": "^7.4.1",
114
+ "private-ip": "^3.0.1",
115
+ "race-signal": "^1.0.1",
97
116
  "uint8arraylist": "^2.4.3"
98
117
  },
99
118
  "devDependencies": {
119
+ "@libp2p/logger": "3.1.0-d8f5bc211",
120
+ "@libp2p/peer-id-factory": "3.0.8-d8f5bc211",
100
121
  "aegir": "^41.0.2",
101
- "it-all": "^3.0.1",
122
+ "delay": "^6.0.0",
123
+ "it-all": "^3.0.3",
124
+ "it-drain": "^3.0.5",
102
125
  "it-pair": "^2.0.6",
103
126
  "it-pipe": "^3.0.1",
104
- "uint8arrays": "^4.0.4"
127
+ "p-defer": "^4.0.0",
128
+ "sinon": "^17.0.1",
129
+ "sinon-ts": "^2.0.0",
130
+ "uint8arrays": "^4.0.6"
105
131
  }
106
132
  }