@libp2p/upnp-nat 3.1.0 → 3.1.1-2e35b6055

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,10 @@
1
+ import { serviceCapabilities, serviceDependencies } from '@libp2p/interface';
2
+ import type { UPnPNATClient, UPnPNAT as UPnPNATInterface } from './index.js';
3
+ export declare class UPnPNAT implements UPnPNATInterface {
4
+ portMappingClient: UPnPNATClient;
5
+ constructor();
6
+ readonly [Symbol.toStringTag] = "@libp2p/upnp-nat";
7
+ readonly [serviceCapabilities]: string[];
8
+ get [serviceDependencies](): string[];
9
+ }
10
+ //# sourceMappingURL=upnp-nat.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upnp-nat.browser.d.ts","sourceRoot":"","sources":["../../src/upnp-nat.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE5E,qBAAa,OAAQ,YAAW,gBAAgB;IACvC,iBAAiB,EAAE,aAAa,CAAA;;IAMvC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,sBAAqB;IAElD,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAEvC;IAED,IAAI,CAAC,mBAAmB,CAAC,IAAK,MAAM,EAAE,CAErC;CACF"}
@@ -0,0 +1,15 @@
1
+ import { serviceCapabilities, serviceDependencies } from '@libp2p/interface';
2
+ export class UPnPNAT {
3
+ portMappingClient;
4
+ constructor() {
5
+ throw new Error('UPnPNAT is not supported in browsers');
6
+ }
7
+ [Symbol.toStringTag] = '@libp2p/upnp-nat';
8
+ [serviceCapabilities] = [
9
+ '@libp2p/nat-traversal'
10
+ ];
11
+ get [serviceDependencies]() {
12
+ return [];
13
+ }
14
+ }
15
+ //# sourceMappingURL=upnp-nat.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upnp-nat.browser.js","sourceRoot":"","sources":["../../src/upnp-nat.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAG5E,MAAM,OAAO,OAAO;IACX,iBAAiB,CAAe;IAEvC;QACE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;IACzD,CAAC;IAEQ,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAA;IAEzC,CAAC,mBAAmB,CAAC,GAAa;QACzC,uBAAuB;KACxB,CAAA;IAED,IAAI,CAAC,mBAAmB,CAAC;QACvB,OAAO,EAAE,CAAA;IACX,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/upnp-nat",
3
- "version": "3.1.0",
3
+ "version": "3.1.1-2e35b6055",
4
4
  "description": "UPnP NAT hole punching",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/upnp-nat#readme",
@@ -46,26 +46,34 @@
46
46
  "doc-check": "aegir doc-check",
47
47
  "build": "aegir build --no-bundle",
48
48
  "test": "aegir test -t node -t electron-main",
49
+ "test:chrome": "aegir test -t browser -f ./dist/test/browser.js --cov",
50
+ "test:chrome-webworker": "aegir test -t webworker -f ./dist/test/browser.js",
51
+ "test:firefox": "aegir test -t browser -f ./dist/test/browser.js -- --browser firefox",
52
+ "test:firefox-webworker": "aegir test -t webworker -f ./dist/test/browser.js -- --browser firefox",
49
53
  "test:node": "aegir test -t node --cov",
50
54
  "test:electron-main": "aegir test -t electron-main"
51
55
  },
52
56
  "dependencies": {
53
57
  "@achingbrain/nat-port-mapper": "^4.0.0",
54
58
  "@chainsafe/is-ip": "^2.0.2",
55
- "@libp2p/interface": "^2.4.1",
56
- "@libp2p/interface-internal": "^2.2.4",
57
- "@libp2p/utils": "^6.5.0",
59
+ "@libp2p/interface": "2.5.0-2e35b6055",
60
+ "@libp2p/interface-internal": "2.3.0-2e35b6055",
61
+ "@libp2p/utils": "6.5.1-2e35b6055",
58
62
  "@multiformats/multiaddr": "^12.3.3",
59
63
  "@multiformats/multiaddr-matcher": "^1.6.0",
60
64
  "p-defer": "^4.0.1",
61
65
  "race-signal": "^1.1.0"
62
66
  },
63
67
  "devDependencies": {
64
- "@libp2p/crypto": "^5.0.10",
65
- "@libp2p/logger": "^5.1.7",
66
- "@libp2p/peer-id": "^5.0.11",
68
+ "@libp2p/crypto": "5.0.11-2e35b6055",
69
+ "@libp2p/logger": "5.1.8-2e35b6055",
70
+ "@libp2p/peer-id": "5.0.12-2e35b6055",
67
71
  "aegir": "^45.0.5",
68
- "sinon-ts": "^2.0.0"
72
+ "sinon-ts": "^2.0.0",
73
+ "wherearewe": "^2.0.1"
74
+ },
75
+ "browser": {
76
+ "./dist/src/upnp-nat.js": "./dist/src/upnp-nat.browser.js"
69
77
  },
70
78
  "sideEffects": false
71
79
  }
@@ -0,0 +1,20 @@
1
+ import { serviceCapabilities, serviceDependencies } from '@libp2p/interface'
2
+ import type { UPnPNATClient, UPnPNAT as UPnPNATInterface } from './index.js'
3
+
4
+ export class UPnPNAT implements UPnPNATInterface {
5
+ public portMappingClient: UPnPNATClient
6
+
7
+ constructor () {
8
+ throw new Error('UPnPNAT is not supported in browsers')
9
+ }
10
+
11
+ readonly [Symbol.toStringTag] = '@libp2p/upnp-nat'
12
+
13
+ readonly [serviceCapabilities]: string[] = [
14
+ '@libp2p/nat-traversal'
15
+ ]
16
+
17
+ get [serviceDependencies] (): string[] {
18
+ return []
19
+ }
20
+ }
@@ -1,12 +0,0 @@
1
- {
2
- "PMPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.PMPOptions.html",
3
- ".:PMPOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.PMPOptions.html",
4
- "UPnPNAT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNAT.html",
5
- ".:UPnPNAT": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNAT.html",
6
- "UPnPNATComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html",
7
- ".:UPnPNATComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNATComponents.html",
8
- "UPnPNATInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNATInit.html",
9
- ".:UPnPNATInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_upnp_nat.UPnPNATInit.html",
10
- "uPnPNAT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_upnp_nat.uPnPNAT-1.html",
11
- ".:uPnPNAT": "https://libp2p.github.io/js-libp2p/functions/_libp2p_upnp_nat.uPnPNAT-1.html"
12
- }