@leofcoin/peernet 1.1.96 → 1.1.97
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.
- package/exports/browser/{client-BlYwNU8G.js → client-BDXkFVRR.js} +1 -1
- package/exports/browser/{messages-Y4l0mXGt.js → messages-DDEOxfJp.js} +1 -1
- package/exports/browser/{peernet-BXonj_o8.js → peernet-O_tySEFY.js} +5 -5
- package/exports/browser/peernet.js +1 -1
- package/exports/peernet.js +3 -3
- package/package.json +1 -1
- package/src/dht/dht.ts +3 -3
|
@@ -7968,9 +7968,9 @@ const lastFetched = {
|
|
|
7968
7968
|
const fetchedCoordinates = {};
|
|
7969
7969
|
const getAddress = async () => {
|
|
7970
7970
|
const { address } = lastFetched;
|
|
7971
|
-
if (address) {
|
|
7972
|
-
|
|
7973
|
-
address.value = await
|
|
7971
|
+
if (!address) {
|
|
7972
|
+
const value = await fetch('https://icanhazip.com/');
|
|
7973
|
+
address.value = await value.text();
|
|
7974
7974
|
address.timestamp = Math.round(new Date().getTime() / 1000);
|
|
7975
7975
|
lastFetched.address = address;
|
|
7976
7976
|
}
|
|
@@ -8367,7 +8367,7 @@ class Peernet {
|
|
|
8367
8367
|
this.root = options.root;
|
|
8368
8368
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
8369
8369
|
// FolderMessageResponse
|
|
8370
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
8370
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-DDEOxfJp.js');
|
|
8371
8371
|
/**
|
|
8372
8372
|
* proto Object containing protos
|
|
8373
8373
|
* @type {Object}
|
|
@@ -8461,7 +8461,7 @@ class Peernet {
|
|
|
8461
8461
|
if (this.#starting || this.#started)
|
|
8462
8462
|
return;
|
|
8463
8463
|
this.#starting = true;
|
|
8464
|
-
const importee = await import('./client-
|
|
8464
|
+
const importee = await import('./client-BDXkFVRR.js');
|
|
8465
8465
|
/**
|
|
8466
8466
|
* @access public
|
|
8467
8467
|
* @type {PeernetClient}
|
package/exports/peernet.js
CHANGED
|
@@ -159,9 +159,9 @@ const lastFetched = {
|
|
|
159
159
|
const fetchedCoordinates = {};
|
|
160
160
|
const getAddress = async () => {
|
|
161
161
|
const { address } = lastFetched;
|
|
162
|
-
if (address) {
|
|
163
|
-
|
|
164
|
-
address.value = await
|
|
162
|
+
if (!address) {
|
|
163
|
+
const value = await fetch('https://icanhazip.com/');
|
|
164
|
+
address.value = await value.text();
|
|
165
165
|
address.timestamp = Math.round(new Date().getTime() / 1000);
|
|
166
166
|
lastFetched.address = address;
|
|
167
167
|
}
|
package/package.json
CHANGED
package/src/dht/dht.ts
CHANGED
|
@@ -38,9 +38,9 @@ const fetchedCoordinates = {}
|
|
|
38
38
|
|
|
39
39
|
export const getAddress = async () => {
|
|
40
40
|
const { address } = lastFetched
|
|
41
|
-
if (address) {
|
|
42
|
-
|
|
43
|
-
address.value = await
|
|
41
|
+
if (!address) {
|
|
42
|
+
const value = await fetch('https://icanhazip.com/')
|
|
43
|
+
address.value = await value.text()
|
|
44
44
|
address.timestamp = Math.round(new Date().getTime() / 1000)
|
|
45
45
|
lastFetched.address = address
|
|
46
46
|
}
|