@libp2p/fetch 4.1.0-f60bd85b0 → 4.1.2

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.
@@ -1,4 +1,4 @@
1
- import type { Fetch as FetchInterface, FetchComponents, FetchInit, LookupFunction } from './index.js';
1
+ import type { Fetch as FetchInterface, FetchComponents, FetchInit, LookupFunction } from './index.ts';
2
2
  import type { Stream, Startable, DialProtocolOptions, DialTarget } from '@libp2p/interface';
3
3
  /**
4
4
  * A simple libp2p protocol for requesting a value corresponding to a key from a peer.
package/dist/src/fetch.js CHANGED
@@ -3,8 +3,8 @@ import { pbStream } from '@libp2p/utils';
3
3
  import { setMaxListeners } from 'main-event';
4
4
  import { fromString as uint8arrayFromString } from 'uint8arrays/from-string';
5
5
  import { toString as uint8arrayToString } from 'uint8arrays/to-string';
6
- import { PROTOCOL_NAME, PROTOCOL_VERSION } from './constants.js';
7
- import { FetchRequest, FetchResponse } from './pb/proto.js';
6
+ import { PROTOCOL_NAME, PROTOCOL_VERSION } from "./constants.js";
7
+ import { FetchRequest, FetchResponse } from "./pb/proto.js";
8
8
  const DEFAULT_TIMEOUT = 10_000;
9
9
  /**
10
10
  * A simple libp2p protocol for requesting a value corresponding to a key from a peer.
package/dist/src/index.js CHANGED
@@ -41,7 +41,7 @@
41
41
  * })
42
42
  * ```
43
43
  */
44
- import { Fetch as FetchClass } from './fetch.js';
44
+ import { Fetch as FetchClass } from "./fetch.js";
45
45
  export function fetch(init = {}) {
46
46
  return (components) => new FetchClass(components, init);
47
47
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "Fetch": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.Fetch.html",
3
+ ".:Fetch": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.Fetch.html",
4
+ "FetchComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.FetchComponents.html",
5
+ ".:FetchComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.FetchComponents.html",
6
+ "FetchInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.FetchInit.html",
7
+ ".:FetchInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.FetchInit.html",
8
+ "LookupFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.LookupFunction.html",
9
+ ".:LookupFunction": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_fetch.LookupFunction.html",
10
+ "fetch": "https://libp2p.github.io/js-libp2p/functions/_libp2p_fetch.fetch.html",
11
+ ".:fetch": "https://libp2p.github.io/js-libp2p/functions/_libp2p_fetch.fetch.html"
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/fetch",
3
- "version": "4.1.0-f60bd85b0",
3
+ "version": "4.1.2",
4
4
  "description": "Implementation of the Fetch Protocol",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-fetch#readme",
@@ -26,7 +26,8 @@
26
26
  "exports": {
27
27
  ".": {
28
28
  "types": "./dist/src/index.d.ts",
29
- "import": "./dist/src/index.js"
29
+ "import": "./dist/src/index.js",
30
+ "module-sync": "./dist/src/index.js"
30
31
  }
31
32
  },
32
33
  "scripts": {
@@ -45,17 +46,17 @@
45
46
  "doc-check": "aegir doc-check"
46
47
  },
47
48
  "dependencies": {
48
- "@libp2p/interface": "3.2.0-f60bd85b0",
49
- "@libp2p/interface-internal": "3.1.0-f60bd85b0",
50
- "@libp2p/utils": "7.0.15-f60bd85b0",
49
+ "@libp2p/interface": "^3.2.2",
50
+ "@libp2p/interface-internal": "^3.1.2",
51
+ "@libp2p/utils": "^7.0.17",
51
52
  "main-event": "^1.0.1",
52
53
  "protons-runtime": "^6.0.1",
53
54
  "uint8arraylist": "^2.4.8",
54
55
  "uint8arrays": "^5.1.0"
55
56
  },
56
57
  "devDependencies": {
57
- "@libp2p/crypto": "5.1.15-f60bd85b0",
58
- "@libp2p/peer-id": "6.0.6-f60bd85b0",
58
+ "@libp2p/crypto": "^5.1.17",
59
+ "@libp2p/peer-id": "^6.0.8",
59
60
  "aegir": "^47.0.22",
60
61
  "protons": "^8.1.1",
61
62
  "sinon": "^21.0.0",
package/src/fetch.ts CHANGED
@@ -3,9 +3,9 @@ import { pbStream } from '@libp2p/utils'
3
3
  import { setMaxListeners } from 'main-event'
4
4
  import { fromString as uint8arrayFromString } from 'uint8arrays/from-string'
5
5
  import { toString as uint8arrayToString } from 'uint8arrays/to-string'
6
- import { PROTOCOL_NAME, PROTOCOL_VERSION } from './constants.js'
7
- import { FetchRequest, FetchResponse } from './pb/proto.js'
8
- import type { Fetch as FetchInterface, FetchComponents, FetchInit, LookupFunction } from './index.js'
6
+ import { PROTOCOL_NAME, PROTOCOL_VERSION } from './constants.ts'
7
+ import { FetchRequest, FetchResponse } from './pb/proto.ts'
8
+ import type { Fetch as FetchInterface, FetchComponents, FetchInit, LookupFunction } from './index.ts'
9
9
  import type { Stream, Startable, DialProtocolOptions, DialTarget } from '@libp2p/interface'
10
10
 
11
11
  const DEFAULT_TIMEOUT = 10_000
package/src/index.ts CHANGED
@@ -42,7 +42,7 @@
42
42
  * ```
43
43
  */
44
44
 
45
- import { Fetch as FetchClass } from './fetch.js'
45
+ import { Fetch as FetchClass } from './fetch.ts'
46
46
  import type { DialProtocolOptions, DialTarget } from '@libp2p/interface'
47
47
  import type { ConnectionManager, Registrar } from '@libp2p/interface-internal'
48
48