@libp2p/utils 5.4.3-d1f1c2be7 → 5.4.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.
@@ -42,7 +42,7 @@ export class Job {
42
42
  }
43
43
  }
44
44
  async join(options = {}) {
45
- const recipient = new JobRecipient((new Error('where')).stack, options.signal);
45
+ const recipient = new JobRecipient(options.signal);
46
46
  this.recipients.push(recipient);
47
47
  options.signal?.addEventListener('abort', this.onAbort);
48
48
  return recipient.deferred.promise;
@@ -1 +1 @@
1
- {"version":3,"file":"job.js","sourceRoot":"","sources":["../../../src/queue/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C;;GAEG;AACH,SAAS,QAAQ;IACf,OAAO,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAA;AACjF,CAAC;AAQD,MAAM,OAAO,GAAG;IACP,EAAE,CAAQ;IACV,EAAE,CAAiD;IACnD,OAAO,CAAY;IACnB,UAAU,CAAoC;IAC9C,MAAM,CAAW;IACR,QAAQ,CAAa;IACpB,UAAU,CAAiB;IAE5C,YAAa,EAAmD,EAAE,OAAY;QAC5E,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAA;QACtB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG;YACd,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AAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACpC,CAAC,CAAC,CAAA;YAEF,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;QAC1B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAClC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAChC,CAAC,CAAC,CAAA;YAEF,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;QACzB,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACnC,IAAI,CAAC,OAAO,EAAE,CAAA;QAChB,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAClC,SAAS,CAAC,OAAO,EAAE,CAAA;YACnB,SAAS,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;QAC9D,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -2,8 +2,7 @@ import type { DeferredPromise } from 'p-defer';
2
2
  export declare class JobRecipient<JobReturnType> {
3
3
  deferred: DeferredPromise<JobReturnType>;
4
4
  signal?: AbortSignal;
5
- where?: string;
6
- constructor(where?: string, signal?: AbortSignal);
5
+ constructor(signal?: AbortSignal);
7
6
  onAbort(): void;
8
7
  cleanup(): void;
9
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"recipient.d.ts","sourceRoot":"","sources":["../../../src/queue/recipient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,qBAAa,YAAY,CAAC,aAAa;IAC9B,QAAQ,EAAE,eAAe,CAAC,aAAa,CAAC,CAAA;IACxC,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;gBAER,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW;IASjD,OAAO,IAAK,IAAI;IAIhB,OAAO,IAAK,IAAI;CAGjB"}
1
+ {"version":3,"file":"recipient.d.ts","sourceRoot":"","sources":["../../../src/queue/recipient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,qBAAa,YAAY,CAAC,aAAa;IAC9B,QAAQ,EAAE,eAAe,CAAC,aAAa,CAAC,CAAA;IACxC,MAAM,CAAC,EAAE,WAAW,CAAA;gBAEd,MAAM,CAAC,EAAE,WAAW;IAQjC,OAAO,IAAK,IAAI;IAIhB,OAAO,IAAK,IAAI;CAGjB"}
@@ -3,11 +3,9 @@ import pDefer from 'p-defer';
3
3
  export class JobRecipient {
4
4
  deferred;
5
5
  signal;
6
- where;
7
- constructor(where, signal) {
6
+ constructor(signal) {
8
7
  this.signal = signal;
9
8
  this.deferred = pDefer();
10
- this.where = where;
11
9
  this.onAbort = this.onAbort.bind(this);
12
10
  this.signal?.addEventListener('abort', this.onAbort);
13
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"recipient.js","sourceRoot":"","sources":["../../../src/queue/recipient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,MAAM,MAAM,SAAS,CAAA;AAG5B,MAAM,OAAO,YAAY;IAChB,QAAQ,CAAgC;IACxC,MAAM,CAAc;IACpB,KAAK,CAAS;IAErB,YAAa,KAAc,EAAE,MAAoB;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,MAAM,EAAE,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACzD,CAAC;CACF"}
1
+ {"version":3,"file":"recipient.js","sourceRoot":"","sources":["../../../src/queue/recipient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,MAAM,MAAM,SAAS,CAAA;AAG5B,MAAM,OAAO,YAAY;IAChB,QAAQ,CAAgC;IACxC,MAAM,CAAc;IAE3B,YAAa,MAAoB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,MAAM,EAAE,CAAA;QAExB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC,CAAA;IAC/D,CAAC;IAED,OAAO;QACL,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACzD,CAAC;CACF"}
@@ -0,0 +1,115 @@
1
+ {
2
+ "createTimeoutOptions": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.abort_options.createTimeoutOptions.html",
3
+ "./abort-options:createTimeoutOptions": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.abort_options.createTimeoutOptions.html",
4
+ "AbstractStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.abstract_stream.AbstractStream.html",
5
+ "./abstract-stream:AbstractStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.abstract_stream.AbstractStream.html",
6
+ "AbstractStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html",
7
+ "./abstract-stream:AbstractStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.abstract_stream.AbstractStreamInit.html",
8
+ "AdaptiveTimeout": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.adaptive_timeout.AdaptiveTimeout.html",
9
+ "./adaptive-timeout:AdaptiveTimeout": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.adaptive_timeout.AdaptiveTimeout.html",
10
+ "AdaptiveTimeoutInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.AdaptiveTimeoutInit.html",
11
+ "./adaptive-timeout:AdaptiveTimeoutInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.AdaptiveTimeoutInit.html",
12
+ "AdaptiveTimeoutSignal": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.AdaptiveTimeoutSignal.html",
13
+ "./adaptive-timeout:AdaptiveTimeoutSignal": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.AdaptiveTimeoutSignal.html",
14
+ "GetTimeoutSignalOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.GetTimeoutSignalOptions.html",
15
+ "./adaptive-timeout:GetTimeoutSignalOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.adaptive_timeout.GetTimeoutSignalOptions.html",
16
+ "DEFAULT_FAILURE_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_FAILURE_MULTIPLIER.html",
17
+ "./adaptive-timeout:DEFAULT_FAILURE_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_FAILURE_MULTIPLIER.html",
18
+ "DEFAULT_MIN_TIMEOUT": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_MIN_TIMEOUT.html",
19
+ "./adaptive-timeout:DEFAULT_MIN_TIMEOUT": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_MIN_TIMEOUT.html",
20
+ "DEFAULT_TIMEOUT_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_TIMEOUT_MULTIPLIER.html",
21
+ "./adaptive-timeout:DEFAULT_TIMEOUT_MULTIPLIER": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.adaptive_timeout.DEFAULT_TIMEOUT_MULTIPLIER.html",
22
+ "certifiedAddressesFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html",
23
+ "./address-sort:certifiedAddressesFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.certifiedAddressesFirst.html",
24
+ "circuitRelayAddressesLast": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html",
25
+ "./address-sort:circuitRelayAddressesLast": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.circuitRelayAddressesLast.html",
26
+ "defaultAddressSort": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.defaultAddressSort.html",
27
+ "./address-sort:defaultAddressSort": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.defaultAddressSort.html",
28
+ "publicAddressesFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.publicAddressesFirst.html",
29
+ "./address-sort:publicAddressesFirst": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.address_sort.publicAddressesFirst.html",
30
+ "arrayEquals": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.array_equals.arrayEquals.html",
31
+ "./array-equals:arrayEquals": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.array_equals.arrayEquals.html",
32
+ "SafelyCloseConnectionOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.close.SafelyCloseConnectionOptions.html",
33
+ "./close:SafelyCloseConnectionOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.close.SafelyCloseConnectionOptions.html",
34
+ "safelyCloseConnectionIfUnused": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close.safelyCloseConnectionIfUnused.html",
35
+ "./close:safelyCloseConnectionIfUnused": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close.safelyCloseConnectionIfUnused.html",
36
+ "safelyCloseStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close.safelyCloseStream.html",
37
+ "./close:safelyCloseStream": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close.safelyCloseStream.html",
38
+ "closeSource": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close_source.closeSource.html",
39
+ "./close-source:closeSource": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.close_source.closeSource.html",
40
+ "BloomFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.filters.BloomFilter.html",
41
+ "CuckooFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.filters.CuckooFilter.html",
42
+ "ScalableCuckooFilter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.filters.ScalableCuckooFilter.html",
43
+ "BloomFilterOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.filters.BloomFilterOptions.html",
44
+ "CuckooFilterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.filters.CuckooFilterInit.html",
45
+ "Filter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.filters.Filter.html",
46
+ "./filters:Filter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.filters.Filter.html",
47
+ "ScalableCuckooFilterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.filters.ScalableCuckooFilterInit.html",
48
+ "createBloomFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.filters.createBloomFilter.html",
49
+ "createCuckooFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.filters.createCuckooFilter.html",
50
+ "createScalableCuckooFilter": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.filters.createScalableCuckooFilter.html",
51
+ "Errors": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html",
52
+ "./ip-port-to-multiaddr:Errors": "https://libp2p.github.io/js-libp2p/variables/_libp2p_utils.ip_port_to_multiaddr.Errors.html",
53
+ "ipPortToMultiaddr": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html",
54
+ "./ip-port-to-multiaddr:ipPortToMultiaddr": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.ip_port_to_multiaddr.ipPortToMultiaddr.html",
55
+ "isPromise": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.is_promise.isPromise.html",
56
+ "./is-promise:isPromise": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.is_promise.isPromise.html",
57
+ "MovingAverage": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.moving_average.MovingAverage.html",
58
+ "./moving-average:MovingAverage": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.moving_average.MovingAverage.html",
59
+ "isLoopback": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html",
60
+ "./multiaddr/is-loopback:isLoopback": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.multiaddr_is_loopback.isLoopback.html",
61
+ "isPrivate": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html",
62
+ "./multiaddr/is-private:isPrivate": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.multiaddr_is_private.isPrivate.html",
63
+ "PeerQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.peer_queue.PeerQueue.html",
64
+ "./peer-queue:PeerQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.peer_queue.PeerQueue.html",
65
+ "PeerQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.peer_queue.PeerQueueJobOptions.html",
66
+ "./peer-queue:PeerQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.peer_queue.PeerQueueJobOptions.html",
67
+ "PriorityQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.priority_queue.PriorityQueue.html",
68
+ "./priority-queue:PriorityQueue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.priority_queue.PriorityQueue.html",
69
+ "PriorityQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.priority_queue.PriorityQueueJobOptions.html",
70
+ "./priority-queue:PriorityQueueJobOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.priority_queue.PriorityQueueJobOptions.html",
71
+ "isPrivateIp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.private_ip.isPrivateIp.html",
72
+ "./private-ip:isPrivateIp": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.private_ip.isPrivateIp.html",
73
+ "Queue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.queue.Queue.html",
74
+ "./queue:Queue": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.queue.Queue.html",
75
+ "Comparator": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.Comparator.html",
76
+ "./queue:Comparator": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.Comparator.html",
77
+ "JobMatcher": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.JobMatcher.html",
78
+ "./queue:JobMatcher": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.JobMatcher.html",
79
+ "QueueEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueEvents.html",
80
+ "./queue:QueueEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueEvents.html",
81
+ "QueueInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueInit.html",
82
+ "./queue:QueueInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueInit.html",
83
+ "QueueJobFailure": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueJobFailure.html",
84
+ "./queue:QueueJobFailure": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueJobFailure.html",
85
+ "QueueJobSuccess": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueJobSuccess.html",
86
+ "./queue:QueueJobSuccess": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.QueueJobSuccess.html",
87
+ "RunFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.RunFunction.html",
88
+ "./queue:RunFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.queue.RunFunction.html",
89
+ "JobStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_utils.queue.JobStatus.html",
90
+ "./queue:JobStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_utils.queue.JobStatus.html",
91
+ "RateLimiter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.rate_limiter.RateLimiter.html",
92
+ "./rate-limiter:RateLimiter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_utils.rate_limiter.RateLimiter.html",
93
+ "GetKeySecDurationOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.GetKeySecDurationOptions.html",
94
+ "./rate-limiter:GetKeySecDurationOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.GetKeySecDurationOptions.html",
95
+ "RateLimiterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateLimiterInit.html",
96
+ "./rate-limiter:RateLimiterInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateLimiterInit.html",
97
+ "RateLimiterResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateLimiterResult.html",
98
+ "./rate-limiter:RateLimiterResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateLimiterResult.html",
99
+ "RateRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateRecord.html",
100
+ "./rate-limiter:RateRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.rate_limiter.RateRecord.html",
101
+ "StreamProperties": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html",
102
+ "./stream-to-ma-conn:StreamProperties": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.stream_to_ma_conn.StreamProperties.html",
103
+ "streamToMaConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html",
104
+ "./stream-to-ma-conn:streamToMaConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.stream_to_ma_conn.streamToMaConnection.html",
105
+ "CreateTrackedListInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_list.CreateTrackedListInit.html",
106
+ "./tracked-list:CreateTrackedListInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_list.CreateTrackedListInit.html",
107
+ "trackedList": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.tracked_list.trackedList.html",
108
+ "./tracked-list:trackedList": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.tracked_list.trackedList.html",
109
+ "CreateTrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_map.CreateTrackedMapInit.html",
110
+ "./tracked-map:CreateTrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_map.CreateTrackedMapInit.html",
111
+ "TrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_map.TrackedMapInit.html",
112
+ "./tracked-map:TrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_utils.tracked_map.TrackedMapInit.html",
113
+ "trackedMap": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.tracked_map.trackedMap.html",
114
+ "./tracked-map:trackedMap": "https://libp2p.github.io/js-libp2p/functions/_libp2p_utils.tracked_map.trackedMap.html"
115
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/utils",
3
- "version": "5.4.3-d1f1c2be7",
3
+ "version": "5.4.4",
4
4
  "description": "Package to aggregate shared logic and dependencies for the libp2p ecosystem",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/utils#readme",
@@ -152,9 +152,9 @@
152
152
  },
153
153
  "dependencies": {
154
154
  "@chainsafe/is-ip": "^2.0.2",
155
- "@libp2p/crypto": "4.1.3-d1f1c2be7",
156
- "@libp2p/interface": "1.4.1-d1f1c2be7",
157
- "@libp2p/logger": "4.0.14-d1f1c2be7",
155
+ "@libp2p/crypto": "^4.1.4",
156
+ "@libp2p/interface": "^1.5.0",
157
+ "@libp2p/logger": "^4.0.15",
158
158
  "@multiformats/multiaddr": "^12.2.3",
159
159
  "@multiformats/multiaddr-matcher": "^1.2.1",
160
160
  "@sindresorhus/fnv1a": "^3.1.0",
@@ -174,7 +174,7 @@
174
174
  "uint8arrays": "^5.1.0"
175
175
  },
176
176
  "devDependencies": {
177
- "@libp2p/peer-id-factory": "4.1.3-d1f1c2be7",
177
+ "@libp2p/peer-id-factory": "^4.1.4",
178
178
  "@types/netmask": "^2.0.5",
179
179
  "aegir": "^43.0.1",
180
180
  "delay": "^6.0.0",
package/src/queue/job.ts CHANGED
@@ -59,7 +59,7 @@ export class Job <JobOptions extends AbortOptions = AbortOptions, JobReturnType
59
59
  }
60
60
 
61
61
  async join (options: AbortOptions = {}): Promise<JobReturnType> {
62
- const recipient = new JobRecipient<JobReturnType>((new Error('where')).stack, options.signal)
62
+ const recipient = new JobRecipient<JobReturnType>(options.signal)
63
63
  this.recipients.push(recipient)
64
64
 
65
65
  options.signal?.addEventListener('abort', this.onAbort)
@@ -5,12 +5,10 @@ import type { DeferredPromise } from 'p-defer'
5
5
  export class JobRecipient<JobReturnType> {
6
6
  public deferred: DeferredPromise<JobReturnType>
7
7
  public signal?: AbortSignal
8
- public where?: string
9
8
 
10
- constructor (where?: string, signal?: AbortSignal) {
9
+ constructor (signal?: AbortSignal) {
11
10
  this.signal = signal
12
11
  this.deferred = pDefer()
13
- this.where = where
14
12
 
15
13
  this.onAbort = this.onAbort.bind(this)
16
14
  this.signal?.addEventListener('abort', this.onAbort)