unetjs 3.2.0 → 3.2.1
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/dist/cjs/unet.cjs +8 -4
- package/dist/esm/unet.js +8 -4
- package/dist/unetjs.js +7 -3
- package/dist/unetjs.js.map +1 -1
- package/dist/unetjs.min.js +1 -1
- package/dist/unetjs.min.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/unet.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* unet.js v3.2.
|
|
1
|
+
/* unet.js v3.2.1 2025-01-31T16:55:08.539Z */
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
/* fjage.js v1.13.
|
|
5
|
+
/* fjage.js v1.13.7 */
|
|
6
6
|
|
|
7
7
|
const isBrowser =
|
|
8
8
|
typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -696,7 +696,10 @@ class Message {
|
|
|
696
696
|
class Gateway {
|
|
697
697
|
|
|
698
698
|
constructor(opts = {}) {
|
|
699
|
-
|
|
699
|
+
// Similar to Object.assign but also overwrites `undefined` and empty strings with defaults
|
|
700
|
+
for (var key in GATEWAY_DEFAULTS){
|
|
701
|
+
if (opts[key] == undefined || opts[key] === '') opts[key] = GATEWAY_DEFAULTS[key];
|
|
702
|
+
}
|
|
700
703
|
var url = DEFAULT_URL;
|
|
701
704
|
url.hostname = opts.hostname;
|
|
702
705
|
url.port = opts.port;
|
|
@@ -714,7 +717,7 @@ class Gateway {
|
|
|
714
717
|
this.queue = []; // incoming message queue
|
|
715
718
|
this.connected = false; // connection status
|
|
716
719
|
this.debug = false; // debug info to be logged to console?
|
|
717
|
-
this.aid = new AgentID(
|
|
720
|
+
this.aid = new AgentID('gateway-'+_guid(4)); // gateway agent name
|
|
718
721
|
this.connector = this._createConnector(url);
|
|
719
722
|
this._addGWCache(this);
|
|
720
723
|
}
|
|
@@ -1310,6 +1313,7 @@ function MessageClass(name, parent=Message) {
|
|
|
1310
1313
|
this[k] = params[k];
|
|
1311
1314
|
}
|
|
1312
1315
|
}
|
|
1316
|
+
if (name.endsWith('Req')) this.perf = Performative.REQUEST;
|
|
1313
1317
|
}
|
|
1314
1318
|
};
|
|
1315
1319
|
cls.__clazz__ = name;
|
package/dist/esm/unet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* unet.js v3.2.
|
|
1
|
+
/* unet.js v3.2.1 2025-01-31T16:55:08.538Z */
|
|
2
2
|
|
|
3
|
-
/* fjage.js v1.13.
|
|
3
|
+
/* fjage.js v1.13.7 */
|
|
4
4
|
|
|
5
5
|
const isBrowser =
|
|
6
6
|
typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -694,7 +694,10 @@ class Message {
|
|
|
694
694
|
class Gateway {
|
|
695
695
|
|
|
696
696
|
constructor(opts = {}) {
|
|
697
|
-
|
|
697
|
+
// Similar to Object.assign but also overwrites `undefined` and empty strings with defaults
|
|
698
|
+
for (var key in GATEWAY_DEFAULTS){
|
|
699
|
+
if (opts[key] == undefined || opts[key] === '') opts[key] = GATEWAY_DEFAULTS[key];
|
|
700
|
+
}
|
|
698
701
|
var url = DEFAULT_URL;
|
|
699
702
|
url.hostname = opts.hostname;
|
|
700
703
|
url.port = opts.port;
|
|
@@ -712,7 +715,7 @@ class Gateway {
|
|
|
712
715
|
this.queue = []; // incoming message queue
|
|
713
716
|
this.connected = false; // connection status
|
|
714
717
|
this.debug = false; // debug info to be logged to console?
|
|
715
|
-
this.aid = new AgentID(
|
|
718
|
+
this.aid = new AgentID('gateway-'+_guid(4)); // gateway agent name
|
|
716
719
|
this.connector = this._createConnector(url);
|
|
717
720
|
this._addGWCache(this);
|
|
718
721
|
}
|
|
@@ -1308,6 +1311,7 @@ function MessageClass(name, parent=Message) {
|
|
|
1308
1311
|
this[k] = params[k];
|
|
1309
1312
|
}
|
|
1310
1313
|
}
|
|
1314
|
+
if (name.endsWith('Req')) this.perf = Performative.REQUEST;
|
|
1311
1315
|
}
|
|
1312
1316
|
};
|
|
1313
1317
|
cls.__clazz__ = name;
|
package/dist/unetjs.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.unet = {}));
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/* fjage.js v1.13.
|
|
7
|
+
/* fjage.js v1.13.7 */
|
|
8
8
|
|
|
9
9
|
const isBrowser =
|
|
10
10
|
typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -698,7 +698,10 @@
|
|
|
698
698
|
class Gateway {
|
|
699
699
|
|
|
700
700
|
constructor(opts = {}) {
|
|
701
|
-
|
|
701
|
+
// Similar to Object.assign but also overwrites `undefined` and empty strings with defaults
|
|
702
|
+
for (var key in GATEWAY_DEFAULTS){
|
|
703
|
+
if (opts[key] == undefined || opts[key] === '') opts[key] = GATEWAY_DEFAULTS[key];
|
|
704
|
+
}
|
|
702
705
|
var url = DEFAULT_URL;
|
|
703
706
|
url.hostname = opts.hostname;
|
|
704
707
|
url.port = opts.port;
|
|
@@ -716,7 +719,7 @@
|
|
|
716
719
|
this.queue = []; // incoming message queue
|
|
717
720
|
this.connected = false; // connection status
|
|
718
721
|
this.debug = false; // debug info to be logged to console?
|
|
719
|
-
this.aid = new AgentID(
|
|
722
|
+
this.aid = new AgentID('gateway-'+_guid(4)); // gateway agent name
|
|
720
723
|
this.connector = this._createConnector(url);
|
|
721
724
|
this._addGWCache(this);
|
|
722
725
|
}
|
|
@@ -1312,6 +1315,7 @@
|
|
|
1312
1315
|
this[k] = params[k];
|
|
1313
1316
|
}
|
|
1314
1317
|
}
|
|
1318
|
+
if (name.endsWith('Req')) this.perf = Performative.REQUEST;
|
|
1315
1319
|
}
|
|
1316
1320
|
};
|
|
1317
1321
|
cls.__clazz__ = name;
|