@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.
@@ -1,4 +1,4 @@
1
- import { L as LittlePubSub } from './peernet-BXonj_o8.js';
1
+ import { L as LittlePubSub } from './peernet-O_tySEFY.js';
2
2
  import './identity-Cn0iQbY3.js';
3
3
  import './value-C3vAp-wb.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-BXonj_o8.js';
1
+ import { F as FormatInterface } from './peernet-O_tySEFY.js';
2
2
  import './identity-Cn0iQbY3.js';
3
3
  import './value-C3vAp-wb.js';
4
4
 
@@ -7968,9 +7968,9 @@ const lastFetched = {
7968
7968
  const fetchedCoordinates = {};
7969
7969
  const getAddress = async () => {
7970
7970
  const { address } = lastFetched;
7971
- if (address) {
7972
- address.value = await fetch('https://icanhazip.com/');
7973
- address.value = await address.value.text();
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-Y4l0mXGt.js');
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-BlYwNU8G.js');
8464
+ const importee = await import('./client-BDXkFVRR.js');
8465
8465
  /**
8466
8466
  * @access public
8467
8467
  * @type {PeernetClient}
@@ -1,3 +1,3 @@
1
- export { P as default } from './peernet-BXonj_o8.js';
1
+ export { P as default } from './peernet-O_tySEFY.js';
2
2
  import './identity-Cn0iQbY3.js';
3
3
  import './value-C3vAp-wb.js';
@@ -159,9 +159,9 @@ const lastFetched = {
159
159
  const fetchedCoordinates = {};
160
160
  const getAddress = async () => {
161
161
  const { address } = lastFetched;
162
- if (address) {
163
- address.value = await fetch('https://icanhazip.com/');
164
- address.value = await address.value.text();
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.1.96",
3
+ "version": "1.1.97",
4
4
  "description": "",
5
5
  "browser": "./exports/browser/peernet.js",
6
6
  "exports": {
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
- address.value = await fetch('https://icanhazip.com/')
43
- address.value = await address.value.text()
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
  }