@libp2p/echo 2.1.1-0a3406a05 → 2.1.1-6bd7f9169

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.
@@ -41,7 +41,7 @@
41
41
  * // write/read stream
42
42
  * ```
43
43
  */
44
- import type { ComponentLogger, PeerId } from '@libp2p/interface';
44
+ import type { AbortOptions, ComponentLogger, PeerId } from '@libp2p/interface';
45
45
  import type { ConnectionManager, Registrar } from '@libp2p/interface-internal';
46
46
  import type { Multiaddr } from '@multiformats/multiaddr';
47
47
  export interface EchoInit {
@@ -57,7 +57,7 @@ export interface EchoComponents {
57
57
  }
58
58
  export interface Echo {
59
59
  protocol: string;
60
- echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array): Promise<Uint8Array>;
60
+ echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array, options?: AbortOptions): Promise<Uint8Array>;
61
61
  }
62
62
  export declare function echo(init?: EchoInit): (components: EchoComponents) => Echo;
63
63
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,WAAW,QAAQ;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,SAAS,CA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AgB,IAAI,CAAE,IAAI,GAAE,QAAa,GAAG,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAE/E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/echo",
3
- "version": "2.1.1-0a3406a05",
3
+ "version": "2.1.1-6bd7f9169",
4
4
  "description": "Implementation of an Echo protocol",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-echo#readme",
@@ -51,14 +51,14 @@
51
51
  "doc-check": "aegir doc-check"
52
52
  },
53
53
  "dependencies": {
54
- "@libp2p/interface": "2.2.0-0a3406a05",
55
- "@libp2p/interface-internal": "2.0.10-0a3406a05",
54
+ "@libp2p/interface": "2.2.0-6bd7f9169",
55
+ "@libp2p/interface-internal": "2.0.10-6bd7f9169",
56
56
  "@multiformats/multiaddr": "^12.3.1",
57
57
  "it-byte-stream": "^1.1.0",
58
58
  "it-pipe": "^3.0.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@libp2p/logger": "5.1.3-0a3406a05",
61
+ "@libp2p/logger": "5.1.3-6bd7f9169",
62
62
  "aegir": "^44.0.1",
63
63
  "it-all": "^3.0.6",
64
64
  "it-pair": "^2.0.6",
package/src/index.ts CHANGED
@@ -43,7 +43,7 @@
43
43
  */
44
44
 
45
45
  import { Echo as EchoClass } from './echo.js'
46
- import type { ComponentLogger, PeerId } from '@libp2p/interface'
46
+ import type { AbortOptions, ComponentLogger, PeerId } from '@libp2p/interface'
47
47
  import type { ConnectionManager, Registrar } from '@libp2p/interface-internal'
48
48
  import type { Multiaddr } from '@multiformats/multiaddr'
49
49
 
@@ -62,7 +62,7 @@ export interface EchoComponents {
62
62
 
63
63
  export interface Echo {
64
64
  protocol: string
65
- echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array): Promise<Uint8Array>
65
+ echo(peer: PeerId | Multiaddr | Multiaddr[], buf: Uint8Array, options?: AbortOptions): Promise<Uint8Array>
66
66
  }
67
67
 
68
68
  export function echo (init: EchoInit = {}): (components: EchoComponents) => Echo {