@libp2p/memory 2.0.15 → 2.0.17-48f66c41e

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 { MemoryTransportComponents, MemoryTransportInit } from './index.js';
1
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts';
2
2
  import type { Logger, MultiaddrConnection, PeerId } from '@libp2p/interface';
3
3
  export declare const connections: Map<string, MemoryConnection>;
4
4
  interface MemoryConnectionHandler {
package/dist/src/index.js CHANGED
@@ -41,7 +41,7 @@
41
41
  * // use connection...
42
42
  * ```
43
43
  */
44
- import { MemoryTransport } from './memory.js';
44
+ import { MemoryTransport } from "./memory.js";
45
45
  export function memory(init) {
46
46
  return (components) => {
47
47
  return new MemoryTransport(components, init);
@@ -1,5 +1,5 @@
1
1
  import { TypedEventEmitter } from 'main-event';
2
- import type { MemoryTransportComponents, MemoryTransportInit } from './index.js';
2
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts';
3
3
  import type { Listener, CreateListenerOptions, ListenerEvents, MultiaddrConnection, UpgraderOptions } from '@libp2p/interface';
4
4
  import type { Multiaddr } from '@multiformats/multiaddr';
5
5
  export interface MemoryTransportListenerInit extends CreateListenerOptions, MemoryTransportInit {
@@ -2,7 +2,7 @@ import { ListenError } from '@libp2p/interface';
2
2
  import { multiaddr } from '@multiformats/multiaddr';
3
3
  import { TypedEventEmitter, setMaxListeners } from 'main-event';
4
4
  import { nanoid } from 'nanoid';
5
- import { MemoryConnection, connections } from './connections.js';
5
+ import { MemoryConnection, connections } from "./connections.js";
6
6
  export class MemoryTransportListener extends TypedEventEmitter {
7
7
  listenAddr;
8
8
  connection;
@@ -1,5 +1,5 @@
1
1
  import { serviceCapabilities, transportSymbol } from '@libp2p/interface';
2
- import type { MemoryTransportComponents, MemoryTransportInit } from './index.js';
2
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts';
3
3
  import type { Connection, Transport, Listener, CreateListenerOptions, DialTransportOptions } from '@libp2p/interface';
4
4
  import type { Multiaddr } from '@multiformats/multiaddr';
5
5
  export declare class MemoryTransport implements Transport {
@@ -1,8 +1,8 @@
1
1
  import { ConnectionFailedError, serviceCapabilities, transportSymbol } from '@libp2p/interface';
2
2
  import { CODE_P2P } from '@multiformats/multiaddr';
3
3
  import { Memory } from '@multiformats/multiaddr-matcher';
4
- import { connections } from './connections.js';
5
- import { MemoryTransportListener } from './listener.js';
4
+ import { connections } from "./connections.js";
5
+ import { MemoryTransportListener } from "./listener.js";
6
6
  export class MemoryTransport {
7
7
  components;
8
8
  init;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/memory",
3
- "version": "2.0.15",
3
+ "version": "2.0.17-48f66c41e",
4
4
  "description": "A memory transport for libp2p",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-memory#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": {
@@ -44,11 +45,11 @@
44
45
  "test:electron-main": "aegir test -t electron-main"
45
46
  },
46
47
  "dependencies": {
47
- "@libp2p/interface": "^3.2.0",
48
- "@libp2p/utils": "^7.0.15",
48
+ "@libp2p/interface": "3.2.2-48f66c41e",
49
+ "@libp2p/utils": "7.0.17-48f66c41e",
49
50
  "@multiformats/multiaddr": "^13.0.1",
50
51
  "@multiformats/multiaddr-matcher": "^3.0.1",
51
- "@types/sinon": "^20.0.0",
52
+ "@types/sinon": "^21.0.1",
52
53
  "delay": "^7.0.0",
53
54
  "it-map": "^3.1.4",
54
55
  "it-pushable": "^3.2.3",
@@ -58,8 +59,8 @@
58
59
  "uint8arraylist": "^2.4.8"
59
60
  },
60
61
  "devDependencies": {
61
- "@libp2p/logger": "^6.2.4",
62
- "@libp2p/peer-id": "^6.0.6",
62
+ "@libp2p/logger": "6.2.6-48f66c41e",
63
+ "@libp2p/peer-id": "6.0.8-48f66c41e",
63
64
  "aegir": "^47.0.22",
64
65
  "sinon": "^21.0.0",
65
66
  "sinon-ts": "^2.0.0"
@@ -5,7 +5,7 @@ import { pushable } from 'it-pushable'
5
5
  import { raceSignal } from 'race-signal'
6
6
  import { DEFAULT_MAX_MESSAGE_SIZE } from './constants.ts'
7
7
  import { pushableToMaConn } from './pushable-to-conn.ts'
8
- import type { MemoryTransportComponents, MemoryTransportInit } from './index.js'
8
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts'
9
9
  import type { Logger, MultiaddrConnection, PeerId } from '@libp2p/interface'
10
10
  import type { Uint8ArrayList } from 'uint8arraylist'
11
11
 
package/src/index.ts CHANGED
@@ -42,7 +42,7 @@
42
42
  * ```
43
43
  */
44
44
 
45
- import { MemoryTransport } from './memory.js'
45
+ import { MemoryTransport } from './memory.ts'
46
46
  import type { Transport, ComponentLogger, UpgraderOptions, PeerId } from '@libp2p/interface'
47
47
 
48
48
  export interface MemoryTransportComponents {
package/src/listener.ts CHANGED
@@ -2,8 +2,8 @@ import { ListenError } from '@libp2p/interface'
2
2
  import { multiaddr } from '@multiformats/multiaddr'
3
3
  import { TypedEventEmitter, setMaxListeners } from 'main-event'
4
4
  import { nanoid } from 'nanoid'
5
- import { MemoryConnection, connections } from './connections.js'
6
- import type { MemoryTransportComponents, MemoryTransportInit } from './index.js'
5
+ import { MemoryConnection, connections } from './connections.ts'
6
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts'
7
7
  import type { Listener, CreateListenerOptions, ListenerEvents, MultiaddrConnection, UpgraderOptions } from '@libp2p/interface'
8
8
  import type { Multiaddr } from '@multiformats/multiaddr'
9
9
 
package/src/memory.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ConnectionFailedError, serviceCapabilities, transportSymbol } from '@libp2p/interface'
2
2
  import { CODE_P2P } from '@multiformats/multiaddr'
3
3
  import { Memory } from '@multiformats/multiaddr-matcher'
4
- import { connections } from './connections.js'
5
- import { MemoryTransportListener } from './listener.js'
6
- import type { MemoryTransportComponents, MemoryTransportInit } from './index.js'
4
+ import { connections } from './connections.ts'
5
+ import { MemoryTransportListener } from './listener.ts'
6
+ import type { MemoryTransportComponents, MemoryTransportInit } from './index.ts'
7
7
  import type { Connection, Transport, Listener, CreateListenerOptions, DialTransportOptions } from '@libp2p/interface'
8
8
  import type { Multiaddr } from '@multiformats/multiaddr'
9
9
 
@@ -1,8 +0,0 @@
1
- {
2
- "MemoryTransportComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_memory.MemoryTransportComponents.html",
3
- ".:MemoryTransportComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_memory.MemoryTransportComponents.html",
4
- "MemoryTransportInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_memory.MemoryTransportInit.html",
5
- ".:MemoryTransportInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_memory.MemoryTransportInit.html",
6
- "memory": "https://libp2p.github.io/js-libp2p/functions/_libp2p_memory.memory.html",
7
- ".:memory": "https://libp2p.github.io/js-libp2p/functions/_libp2p_memory.memory.html"
8
- }