@yuneta/gobj-js 7.2.0 → 7.3.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/README.md +739 -38
- package/dist/gobj-js.cjs.js +2 -1
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +55 -55
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +2 -1
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +53 -53
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +2 -1
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +111 -111
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +2 -1
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +2 -2
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +3 -3
package/dist/gobj-js.iife.min.js
CHANGED
|
@@ -131,7 +131,7 @@ var gobjJs = function(e) {
|
|
|
131
131
|
data: i || []
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
var o = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0,
|
|
134
|
+
var o = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0, E = Object.freeze({
|
|
135
135
|
DTP_STRING: 1,
|
|
136
136
|
DTP_BOOLEAN: 2,
|
|
137
137
|
DTP_INTEGER: 3,
|
|
@@ -141,8 +141,8 @@ var gobjJs = function(e) {
|
|
|
141
141
|
DTP_JSON: 7,
|
|
142
142
|
DTP_POINTER: 8
|
|
143
143
|
});
|
|
144
|
-
|
|
145
|
-
var
|
|
144
|
+
E.DTP_POINTER;
|
|
145
|
+
var T = Object.freeze({
|
|
146
146
|
SDF_NOTACCESS: 1,
|
|
147
147
|
SDF_RD: 2,
|
|
148
148
|
SDF_WR: 4,
|
|
@@ -151,7 +151,7 @@ var gobjJs = function(e) {
|
|
|
151
151
|
SDF_VOLATIL: 32,
|
|
152
152
|
SDF_RESOURCE: 64,
|
|
153
153
|
SDF_PKEY: 128,
|
|
154
|
-
|
|
154
|
+
SDF_DEPRECATED: 256,
|
|
155
155
|
SDF_FUTURE2: 512,
|
|
156
156
|
SDF_WILD_CMD: 1024,
|
|
157
157
|
SDF_STATS: 2048,
|
|
@@ -165,7 +165,7 @@ var gobjJs = function(e) {
|
|
|
165
165
|
SDF_AUTHZ_S: 524288,
|
|
166
166
|
SDF_AUTHZ_RS: 1048576
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
T.SDF_RD, T.SDF_WR, T.SDF_STATS, T.SDF_PERSIST, T.SDF_VOLATIL, T.SDF_RSTATS, T.SDF_PSTATS, T.SDF_WR, T.SDF_PERSIST;
|
|
169
169
|
var y = class {
|
|
170
170
|
constructor(e, t, n = 0, r = null, i = "", l = null, o = null, s = 0, _ = null, a = null, u = null) {
|
|
171
171
|
this.type = e, this.name = t, this.alias = l, this.flag = n, this.default_value = r, this.header = o, this.fillspace = s, this.description = i, this.json_fn = _, this.schema = a, this.authpth = u;
|
|
@@ -235,19 +235,19 @@ var gobjJs = function(e) {
|
|
|
235
235
|
function U(e, t, n) {
|
|
236
236
|
let r, i = n.default_value;
|
|
237
237
|
switch (n.type) {
|
|
238
|
-
case
|
|
238
|
+
case E.DTP_STRING:
|
|
239
239
|
r = String(i);
|
|
240
240
|
break;
|
|
241
|
-
case
|
|
241
|
+
case E.DTP_BOOLEAN:
|
|
242
242
|
r = en(i);
|
|
243
243
|
break;
|
|
244
|
-
case
|
|
244
|
+
case E.DTP_INTEGER:
|
|
245
245
|
r = parseInt(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
246
246
|
break;
|
|
247
|
-
case
|
|
247
|
+
case E.DTP_REAL:
|
|
248
248
|
r = Number(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
249
249
|
break;
|
|
250
|
-
case
|
|
250
|
+
case E.DTP_LIST:
|
|
251
251
|
if (Jt(i)) try {
|
|
252
252
|
r = JSON.parse(i);
|
|
253
253
|
} catch (e) {
|
|
@@ -256,7 +256,7 @@ var gobjJs = function(e) {
|
|
|
256
256
|
else r = i;
|
|
257
257
|
Bt(r) || (r = []);
|
|
258
258
|
break;
|
|
259
|
-
case
|
|
259
|
+
case E.DTP_DICT:
|
|
260
260
|
if (Jt(i)) try {
|
|
261
261
|
r = JSON.parse(i);
|
|
262
262
|
} catch (e) {
|
|
@@ -265,7 +265,7 @@ var gobjJs = function(e) {
|
|
|
265
265
|
else r = i;
|
|
266
266
|
xt(r) || (r = {});
|
|
267
267
|
break;
|
|
268
|
-
case
|
|
268
|
+
case E.DTP_JSON:
|
|
269
269
|
if (Jt(i)) try {
|
|
270
270
|
r = JSON.parse(i);
|
|
271
271
|
} catch (e) {
|
|
@@ -273,30 +273,30 @@ var gobjJs = function(e) {
|
|
|
273
273
|
}
|
|
274
274
|
else r = i;
|
|
275
275
|
break;
|
|
276
|
-
case
|
|
276
|
+
case E.DTP_POINTER: r = i;
|
|
277
277
|
}
|
|
278
278
|
return void 0 === r && (Ot(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
279
279
|
}
|
|
280
280
|
function C(e, t, n, r) {
|
|
281
281
|
let i;
|
|
282
282
|
switch (n.type) {
|
|
283
|
-
case
|
|
283
|
+
case E.DTP_STRING:
|
|
284
284
|
if (Jt(r)) i = String(r);
|
|
285
285
|
else {
|
|
286
286
|
let e = JSON.stringify(r);
|
|
287
287
|
e && (i = String(e));
|
|
288
288
|
}
|
|
289
289
|
break;
|
|
290
|
-
case
|
|
290
|
+
case E.DTP_BOOLEAN:
|
|
291
291
|
i = en(r);
|
|
292
292
|
break;
|
|
293
|
-
case
|
|
293
|
+
case E.DTP_INTEGER:
|
|
294
294
|
i = parseInt(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
295
295
|
break;
|
|
296
|
-
case
|
|
296
|
+
case E.DTP_REAL:
|
|
297
297
|
i = Number(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
298
298
|
break;
|
|
299
|
-
case
|
|
299
|
+
case E.DTP_LIST:
|
|
300
300
|
if (Jt(r)) try {
|
|
301
301
|
i = JSON.parse(r);
|
|
302
302
|
} catch (e) {
|
|
@@ -305,7 +305,7 @@ var gobjJs = function(e) {
|
|
|
305
305
|
else i = r;
|
|
306
306
|
if (!Bt(i)) return Ot(`attr must be an array: ${n.name}`), -1;
|
|
307
307
|
break;
|
|
308
|
-
case
|
|
308
|
+
case E.DTP_DICT:
|
|
309
309
|
if (Jt(r)) try {
|
|
310
310
|
i = JSON.parse(r);
|
|
311
311
|
} catch (e) {
|
|
@@ -314,7 +314,7 @@ var gobjJs = function(e) {
|
|
|
314
314
|
else i = r;
|
|
315
315
|
if (!xt(i)) return Ot(`attr must be an object: ${n.name}`), -1;
|
|
316
316
|
break;
|
|
317
|
-
case
|
|
317
|
+
case E.DTP_JSON:
|
|
318
318
|
if (Jt(r)) try {
|
|
319
319
|
i = JSON.parse(r);
|
|
320
320
|
} catch (e) {
|
|
@@ -323,7 +323,7 @@ var gobjJs = function(e) {
|
|
|
323
323
|
else i = r;
|
|
324
324
|
if (!Bt(i) && !xt(i)) return Ot(`attr must be a json dict/list: ${n.name}`), -1;
|
|
325
325
|
break;
|
|
326
|
-
case
|
|
326
|
+
case E.DTP_POINTER: i = r;
|
|
327
327
|
}
|
|
328
328
|
return void 0 === i && Ot(`${Ne(e)}: attr undefined: ${n.name}`), t[n.name] = i, xt(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = i), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
329
329
|
}
|
|
@@ -484,7 +484,7 @@ var gobjJs = function(e) {
|
|
|
484
484
|
let l = 0;
|
|
485
485
|
for (const [o, s] of Object.entries(t)) {
|
|
486
486
|
const t = V(i.gclass, o, !1);
|
|
487
|
-
t ? (-1 === n || t.flag & n) && (l += C(i, e, t, s)) : r && (r(i, o), l--);
|
|
487
|
+
t ? (-1 === n || t.flag & n) && (t.flag & T.SDF_DEPRECATED && Nt(`${Ne(i)}: Deprecated attribute used in gobj creation: ${o}`), l += C(i, e, t, s)) : r && (r(i, o), l--);
|
|
488
488
|
}
|
|
489
489
|
return l;
|
|
490
490
|
})(G(e), r, -1, e.gclass.gclass_flag & N.gcflag_ignore_unknown_attrs ? 0 : re, e) < 0 && (Ot(`${Ne(e)} json2data() FAILED`), Rt(r));
|
|
@@ -588,22 +588,22 @@ var gobjJs = function(e) {
|
|
|
588
588
|
function he(e) {
|
|
589
589
|
return !!(e && e.gobj_flag & w.gobj_flag_service);
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Ee(e) {
|
|
592
592
|
return !$e(e) && e.playing;
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Te() {
|
|
595
595
|
return !p || p.obflag & D.obflag_destroyed ? null : p;
|
|
596
596
|
}
|
|
597
597
|
function ye() {
|
|
598
|
-
let e =
|
|
598
|
+
let e = Te();
|
|
599
599
|
return e ? Se(e) : "";
|
|
600
600
|
}
|
|
601
601
|
function ve() {
|
|
602
|
-
let e =
|
|
602
|
+
let e = Te();
|
|
603
603
|
return e ? ze(e, "yuno_role") : "";
|
|
604
604
|
}
|
|
605
605
|
function je() {
|
|
606
|
-
let e =
|
|
606
|
+
let e = Te();
|
|
607
607
|
return e ? ze(e, "yuno_id") : "";
|
|
608
608
|
}
|
|
609
609
|
function Se(e) {
|
|
@@ -754,7 +754,7 @@ var gobjJs = function(e) {
|
|
|
754
754
|
if (t) {
|
|
755
755
|
if (0 === nn(t, "__disabled__")) return me(e);
|
|
756
756
|
if (0 === nn(t, "__running__")) return pe(e);
|
|
757
|
-
if (0 === nn(t, "__playing__")) return
|
|
757
|
+
if (0 === nn(t, "__playing__")) return Ee(e);
|
|
758
758
|
if (0 === nn(t, "__service__")) return he(e);
|
|
759
759
|
}
|
|
760
760
|
let n = F(e, t, !1);
|
|
@@ -848,16 +848,16 @@ var gobjJs = function(e) {
|
|
|
848
848
|
__hard_subscription__: 1,
|
|
849
849
|
__own_event__: 2
|
|
850
850
|
}), st = [
|
|
851
|
-
j(
|
|
852
|
-
j(
|
|
853
|
-
j(
|
|
854
|
-
j(
|
|
855
|
-
j(
|
|
856
|
-
j(
|
|
857
|
-
j(
|
|
858
|
-
j(
|
|
859
|
-
j(
|
|
860
|
-
j(
|
|
851
|
+
j(E.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
852
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
853
|
+
j(E.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
854
|
+
j(E.DTP_STRING, "renamed_event", 0, "", "rename event name"),
|
|
855
|
+
j(E.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
|
|
856
|
+
j(E.DTP_JSON, "__config__", 0, null, "subscription config"),
|
|
857
|
+
j(E.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
|
|
858
|
+
j(E.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
859
|
+
j(E.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
860
|
+
j(E.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
861
861
|
v()
|
|
862
862
|
];
|
|
863
863
|
function _t(e, t, n, r, i) {
|
|
@@ -1006,9 +1006,9 @@ var gobjJs = function(e) {
|
|
|
1006
1006
|
JSON_TRUE: 6,
|
|
1007
1007
|
JSON_FALSE: 7,
|
|
1008
1008
|
JSON_NULL: 8
|
|
1009
|
-
}), "undefined" != typeof window ? window.console : console),
|
|
1009
|
+
}), "undefined" != typeof window ? window.console : console), Et = ht.error, Tt = ht.warn, yt = ht.info, vt = ht.debug;
|
|
1010
1010
|
function jt(e) {
|
|
1011
|
-
e ? (
|
|
1011
|
+
e ? (Et = e, Tt = e) : (Et = ht.error, Tt = ht.warn);
|
|
1012
1012
|
}
|
|
1013
1013
|
function St(e) {
|
|
1014
1014
|
const t = Array.prototype.slice.call(arguments);
|
|
@@ -1034,11 +1034,11 @@ var gobjJs = function(e) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
function Ot(e) {
|
|
1036
1036
|
let t = St(e), n = Fn();
|
|
1037
|
-
|
|
1037
|
+
Et && (Et === window.console.error ? Et("%c" + n + " ERROR: " + String(t), "color:red") : (window.console.error("%c" + n + " ERROR: " + String(t), "color:red"), Et(`${n} ERROR: ${String(t)}`)));
|
|
1038
1038
|
}
|
|
1039
1039
|
function Nt(e) {
|
|
1040
1040
|
let t = St(e), n = Fn();
|
|
1041
|
-
|
|
1041
|
+
Tt && (Tt === window.console.warn ? Tt("%c" + n + " WARNING: " + String(t), "color:yellow") : (window.console.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Tt(`${n} WARNING: ${String(t)}`)));
|
|
1042
1042
|
}
|
|
1043
1043
|
function wt(e) {
|
|
1044
1044
|
let t = St(e), n = Fn();
|
|
@@ -1321,7 +1321,7 @@ var gobjJs = function(e) {
|
|
|
1321
1321
|
function hn(e, t) {
|
|
1322
1322
|
return 0 === Yt(t) || mn(e, t, "");
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function En(e, t, n, r) {
|
|
1325
1325
|
e && !Xt(e) && Ot("GObj bad instanceof");
|
|
1326
1326
|
let i = {};
|
|
1327
1327
|
if (Jt(n) && !Zt(n)) {
|
|
@@ -1337,7 +1337,7 @@ var gobjJs = function(e) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return i;
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function Tn(e, t, n, r) {
|
|
1341
1341
|
let i = {};
|
|
1342
1342
|
if (It(i, t), Jt(n) && !Zt(n)) {
|
|
1343
1343
|
let l = n;
|
|
@@ -1668,9 +1668,9 @@ var gobjJs = function(e) {
|
|
|
1668
1668
|
return t;
|
|
1669
1669
|
}
|
|
1670
1670
|
var Qn = [
|
|
1671
|
-
j(
|
|
1672
|
-
j(
|
|
1673
|
-
j(
|
|
1671
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
1672
|
+
j(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
1673
|
+
j(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
1674
1674
|
v()
|
|
1675
1675
|
], Hn = {
|
|
1676
1676
|
periodic: !1,
|
|
@@ -1718,30 +1718,30 @@ var gobjJs = function(e) {
|
|
|
1718
1718
|
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : void Xe(e, "msec", -1) : (Ot("not GObj TYPE"), -1);
|
|
1719
1719
|
}
|
|
1720
1720
|
var rr = [
|
|
1721
|
-
j(
|
|
1722
|
-
j(
|
|
1723
|
-
j(
|
|
1724
|
-
j(
|
|
1725
|
-
j(
|
|
1726
|
-
j(
|
|
1727
|
-
j(
|
|
1728
|
-
j(
|
|
1729
|
-
j(
|
|
1730
|
-
j(
|
|
1731
|
-
j(
|
|
1732
|
-
j(
|
|
1733
|
-
j(
|
|
1734
|
-
j(
|
|
1735
|
-
j(
|
|
1736
|
-
j(
|
|
1737
|
-
j(
|
|
1738
|
-
j(
|
|
1739
|
-
j(
|
|
1740
|
-
j(
|
|
1741
|
-
j(
|
|
1742
|
-
j(
|
|
1743
|
-
j(
|
|
1744
|
-
j(
|
|
1721
|
+
j(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
1722
|
+
j(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
1723
|
+
j(E.DTP_STRING, "__username__", 0, "", "Username"),
|
|
1724
|
+
j(E.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
|
|
1725
|
+
j(E.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
|
|
1726
|
+
j(E.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
|
|
1727
|
+
j(E.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
|
|
1728
|
+
j(E.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
|
|
1729
|
+
j(E.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
|
|
1730
|
+
j(E.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
|
|
1731
|
+
j(E.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
|
|
1732
|
+
j(E.DTP_STRING, "yuneta_version", 0, o, "Yuneta version"),
|
|
1733
|
+
j(E.DTP_LIST, "required_services", 0, "[]", "Required services"),
|
|
1734
|
+
j(E.DTP_INTEGER, "tracing", 0, 0, "Tracing level"),
|
|
1735
|
+
j(E.DTP_BOOLEAN, "trace_timer", 0, 0, "Trace timers"),
|
|
1736
|
+
j(E.DTP_BOOLEAN, "trace_inter_event", 0, 0, "Trace traffic"),
|
|
1737
|
+
j(E.DTP_POINTER, "trace_ievent_callback", 0, null, "Trace traffic callback"),
|
|
1738
|
+
j(E.DTP_BOOLEAN, "trace_creation", 0, 0, "Trace creation"),
|
|
1739
|
+
j(E.DTP_BOOLEAN, "trace_start_stop", 0, 0, "Trace start/stop"),
|
|
1740
|
+
j(E.DTP_BOOLEAN, "trace_subscriptions", 0, 0, "Trace subscription"),
|
|
1741
|
+
j(E.DTP_BOOLEAN, "trace_i18n", 0, 0, "Trace i18n"),
|
|
1742
|
+
j(E.DTP_BOOLEAN, "no_poll", 0, 0, "no poll"),
|
|
1743
|
+
j(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
1744
|
+
j(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
1745
1745
|
v()
|
|
1746
1746
|
], ir = { gobj_timer: null }, lr = null;
|
|
1747
1747
|
function or(e, t, n, r) {
|
|
@@ -1762,26 +1762,26 @@ var gobjJs = function(e) {
|
|
|
1762
1762
|
mt_destroy: function(e) {},
|
|
1763
1763
|
mt_play: function(e) {
|
|
1764
1764
|
let t = X();
|
|
1765
|
-
return pe(t) || _e(t),
|
|
1765
|
+
return pe(t) || _e(t), Ee(t) || de(t), 0;
|
|
1766
1766
|
},
|
|
1767
1767
|
mt_pause: function(e) {
|
|
1768
1768
|
return be(X()), 0;
|
|
1769
1769
|
}
|
|
1770
1770
|
};
|
|
1771
1771
|
var _r = "ievent_gate_stack", ar = [
|
|
1772
|
-
j(
|
|
1773
|
-
j(
|
|
1774
|
-
j(
|
|
1775
|
-
j(
|
|
1776
|
-
j(
|
|
1777
|
-
j(
|
|
1778
|
-
j(
|
|
1779
|
-
j(
|
|
1780
|
-
j(
|
|
1781
|
-
j(
|
|
1782
|
-
j(
|
|
1783
|
-
j(
|
|
1784
|
-
j(
|
|
1772
|
+
j(E.DTP_STRING, "wanted_yuno_role", T.SDF_RD, "", "wanted yuno role"),
|
|
1773
|
+
j(E.DTP_STRING, "wanted_yuno_name", T.SDF_RD, "", "wanted yuno name"),
|
|
1774
|
+
j(E.DTP_STRING, "wanted_yuno_service", T.SDF_RD, "", "wanted yuno service"),
|
|
1775
|
+
j(E.DTP_STRING, "remote_yuno_role", T.SDF_RD, "", "confirmed remote yuno role"),
|
|
1776
|
+
j(E.DTP_STRING, "remote_yuno_name", T.SDF_RD, "", "confirmed remote yuno name"),
|
|
1777
|
+
j(E.DTP_STRING, "remote_yuno_service", T.SDF_RD, "", "confirmed remote yuno service"),
|
|
1778
|
+
j(E.DTP_STRING, "url", T.SDF_RD, "", "Url to connect"),
|
|
1779
|
+
j(E.DTP_STRING, "jwt", T.SDF_PERSIST, "", "JWT"),
|
|
1780
|
+
j(E.DTP_STRING, "cert_pem", T.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
1781
|
+
j(E.DTP_JSON, "extra_info", T.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
1782
|
+
j(E.DTP_INTEGER, "timeout_retry", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1783
|
+
j(E.DTP_INTEGER, "timeout_idack", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1784
|
+
j(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
1785
1785
|
v()
|
|
1786
1786
|
], ur = {
|
|
1787
1787
|
url: null,
|
|
@@ -1811,7 +1811,7 @@ var gobjJs = function(e) {
|
|
|
1811
1811
|
data: n.data
|
|
1812
1812
|
}, e);
|
|
1813
1813
|
}, n.onclose = (n) => {
|
|
1814
|
-
Be(
|
|
1814
|
+
Be(Te(), "browser_beforeunload") ? Nt("Close websocket by unload page") : lt(e, "EV_ON_CLOSE", {
|
|
1815
1815
|
url: t,
|
|
1816
1816
|
e: n
|
|
1817
1817
|
}, e);
|
|
@@ -1844,8 +1844,8 @@ var gobjJs = function(e) {
|
|
|
1844
1844
|
function pr(e, t, n, r) {
|
|
1845
1845
|
return function(e, t) {
|
|
1846
1846
|
let n = e.priv, r = JSON.stringify(t);
|
|
1847
|
-
if (Be(
|
|
1848
|
-
let n = ze(e, "url"), i = Se(
|
|
1847
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1848
|
+
let n = ze(e, "url"), i = Se(Te()) + " ==> " + n, l = Ye(Te(), "trace_ievent_callback");
|
|
1849
1849
|
l ? l(i, t, 1, r.length) : dr(0, i, t);
|
|
1850
1850
|
}
|
|
1851
1851
|
try {
|
|
@@ -1870,7 +1870,7 @@ var gobjJs = function(e) {
|
|
|
1870
1870
|
};
|
|
1871
1871
|
}
|
|
1872
1872
|
function hr(e) {
|
|
1873
|
-
let t = e.priv, n = Te(
|
|
1873
|
+
let t = e.priv, n = Ee(Te()), r = ze(Te(), "yuno_version"), i = ze(Te(), "yuno_release"), l = ze(Te(), "yuno_tag"), s = {
|
|
1874
1874
|
yuno_role: ve(),
|
|
1875
1875
|
yuno_id: je(),
|
|
1876
1876
|
yuno_name: ye(),
|
|
@@ -1882,22 +1882,22 @@ var gobjJs = function(e) {
|
|
|
1882
1882
|
pid: 0,
|
|
1883
1883
|
watcher_pid: 0,
|
|
1884
1884
|
jwt: ze(e, "jwt"),
|
|
1885
|
-
username: ze(
|
|
1885
|
+
username: ze(Te(), "__username__"),
|
|
1886
1886
|
launch_id: 0,
|
|
1887
|
-
yuno_startdate: ze(
|
|
1887
|
+
yuno_startdate: ze(Te(), "start_date"),
|
|
1888
1888
|
id: Wn(),
|
|
1889
1889
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
1890
1890
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
1891
|
-
required_services: Ye(
|
|
1891
|
+
required_services: Ye(Te(), "required_services")
|
|
1892
1892
|
};
|
|
1893
1893
|
return kn(e, s, _r, mr(e, Se(De(e)), null)), In(e, s, "__identity__"), er(t.gobj_timer, Je(e, "timeout_idack")), pr(e, "EV_IDENTITY_CARD", s);
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function Er(e, t) {
|
|
1896
1896
|
if (Zt(t.event)) return -1;
|
|
1897
1897
|
let n = {}, r = t.__global__, i = t.__config__, l = t.__filter__, o = t.__service__, s = t.subscriber;
|
|
1898
1898
|
return i && (n.__config__ = i), r && (n.__global__ = r), l && (n.__filter__ = l), kn(e, n, _r, mr(e, Se(s), o)), In(e, n, "__subscribing__"), pr(e, t.event, n);
|
|
1899
1899
|
}
|
|
1900
|
-
function
|
|
1900
|
+
function Tr(e, t, n, r) {
|
|
1901
1901
|
let i = e.priv;
|
|
1902
1902
|
return pe(e) && (i.websocket = fr(e)), 0;
|
|
1903
1903
|
}
|
|
@@ -1948,7 +1948,7 @@ var gobjJs = function(e) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
i.inside_on_open = !1, function(e) {
|
|
1950
1950
|
let t = dt(e, null, null, null);
|
|
1951
|
-
for (let n = 0; n < t.length; n++)
|
|
1951
|
+
for (let n = 0; n < t.length; n++) Er(e, t[n]);
|
|
1952
1952
|
}(e);
|
|
1953
1953
|
}
|
|
1954
1954
|
return 0;
|
|
@@ -1971,8 +1971,8 @@ var gobjJs = function(e) {
|
|
|
1971
1971
|
kw: i || {}
|
|
1972
1972
|
} : (Ot("parsing inter_event: kw not a json object"), null) : (Ot("parsing inter_kw: no kw"), null);
|
|
1973
1973
|
}(0, n.data);
|
|
1974
|
-
if (Be(
|
|
1975
|
-
let e = Se(
|
|
1974
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1975
|
+
let e = Se(Te()) + " <== " + i, t = n.data.length, r = Ye(Te(), "trace_ievent_callback");
|
|
1976
1976
|
r ? r(e, l, 2, t) : dr(0, e, l);
|
|
1977
1977
|
}
|
|
1978
1978
|
let o = l.event, s = l.kw;
|
|
@@ -2062,7 +2062,7 @@ var gobjJs = function(e) {
|
|
|
2062
2062
|
},
|
|
2063
2063
|
mt_subscription_added: function(e, t) {
|
|
2064
2064
|
let n = e.priv;
|
|
2065
|
-
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 :
|
|
2065
|
+
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 : Er(e, t);
|
|
2066
2066
|
},
|
|
2067
2067
|
mt_subscription_deleted: function(e, t) {
|
|
2068
2068
|
let n = e.priv;
|
|
@@ -2110,20 +2110,20 @@ var gobjJs = function(e) {
|
|
|
2110
2110
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2111
2111
|
n[e] = dn(null, t, e, dn(r, "default"));
|
|
2112
2112
|
}), n;
|
|
2113
|
-
}, e.current_timestamp = Fn, e.data_type_t =
|
|
2113
|
+
}, e.current_timestamp = Fn, e.data_type_t = E, e.db_list_persistent_attrs = function(e, t) {
|
|
2114
2114
|
let n = yn(Kn(e), null, !1), r = {};
|
|
2115
|
-
return n && xt(n) && (r =
|
|
2115
|
+
return n && xt(n) && (r = En(e, n, t, !1)), r;
|
|
2116
2116
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2117
|
-
let n = xe(e,
|
|
2117
|
+
let n = xe(e, T.SDF_PERSIST), r = yn(Kn(e), null, !1);
|
|
2118
2118
|
if (r && xt(r)) {
|
|
2119
|
-
let i =
|
|
2120
|
-
i =
|
|
2119
|
+
let i = En(e, r, t, !1);
|
|
2120
|
+
i = En(e, i, n, !1), He(e, i, T.SDF_PERSIST);
|
|
2121
2121
|
}
|
|
2122
2122
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2123
|
-
let n =
|
|
2123
|
+
let n = Tn(e, yn(Kn(e), null, !1), t, !1);
|
|
2124
2124
|
0 === Mt(n) ? jn(Kn(e)) : vn(Kn(e), n);
|
|
2125
2125
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2126
|
-
let n =
|
|
2126
|
+
let n = En(e, xe(e, T.SDF_PERSIST), t, !1), r = yn(Kn(e), null, !1);
|
|
2127
2127
|
r && xt(r) && Lt(n, r), vn(Kn(e), n);
|
|
2128
2128
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2129
2129
|
let r = null, i = null, l = null;
|
|
@@ -2190,7 +2190,7 @@ var gobjJs = function(e) {
|
|
|
2190
2190
|
if (Zt(t)) return null;
|
|
2191
2191
|
const n = t.toLowerCase();
|
|
2192
2192
|
return "__default_service__" === n ? m : "__yuno__" === n || "__root__" === n ? p : Me(p, t);
|
|
2193
|
-
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata = G, e.gobj_is_destroying = $e, e.gobj_is_playing =
|
|
2193
|
+
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata = G, e.gobj_is_destroying = $e, e.gobj_is_playing = Ee, e.gobj_is_pure_child = ke, e.gobj_is_running = pe, e.gobj_is_service = he, e.gobj_is_volatil = Re, e.gobj_list_persistent_attrs = function(e, t) {
|
|
2194
2194
|
return u ? u(e, t) : null;
|
|
2195
2195
|
}, e.gobj_list_subscriptions = function(e) {
|
|
2196
2196
|
let t = dt(e, null, null, null);
|
|
@@ -2249,7 +2249,7 @@ var gobjJs = function(e) {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
2251
|
return 0;
|
|
2252
|
-
}(e,
|
|
2252
|
+
}(e, T.SDF_VOLATIL, 0);
|
|
2253
2253
|
}, e.gobj_save_persistent_attrs = function(e, t) {
|
|
2254
2254
|
return he(e) ? _ ? _(e, t) : -1 : (Ot(`${Ne(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2255
2255
|
}, e.gobj_search_path = Me, e.gobj_send_event = lt, e.gobj_services = function() {
|
|
@@ -2312,7 +2312,7 @@ var gobjJs = function(e) {
|
|
|
2312
2312
|
break;
|
|
2313
2313
|
}
|
|
2314
2314
|
return Ot(n("gobj_write_attr(%s): attr not found '%s'", Ne(e), l)), -1;
|
|
2315
|
-
}, e.gobj_write_attrs = He, e.gobj_write_bool_attr = qe, e.gobj_write_integer_attr = Xe, e.gobj_write_str_attr = Ze, e.gobj_yuno =
|
|
2315
|
+
}, e.gobj_write_attrs = He, e.gobj_write_bool_attr = qe, e.gobj_write_integer_attr = Xe, e.gobj_write_str_attr = Ze, e.gobj_yuno = Te, e.gobj_yuno_id = je, e.gobj_yuno_name = ye, e.gobj_yuno_role = ve, e.id_index_in_obj_list = Nn, e.index_in_list = Vn, e.is_array = Bt, e.is_boolean = Qt, e.is_date = function(e) {
|
|
2316
2316
|
return e instanceof Date && !isNaN(e);
|
|
2317
2317
|
}, e.is_function = qt, e.is_gobj = Xt, e.is_metadata_key = function(e) {
|
|
2318
2318
|
if (!Jt(e)) return !1;
|
|
@@ -2387,7 +2387,7 @@ var gobjJs = function(e) {
|
|
|
2387
2387
|
} catch (e) {
|
|
2388
2388
|
return null;
|
|
2389
2389
|
}
|
|
2390
|
-
}, e.jwtDecode = Un, e.kw_clone_by_keys =
|
|
2390
|
+
}, e.jwtDecode = Un, e.kw_clone_by_keys = En, e.kw_clone_by_not_keys = Tn, e.kw_collect = function(e, t, n, r) {
|
|
2391
2391
|
if (e && !Xt(e) && Ot("GObj bad instanceof"), !t) return null;
|
|
2392
2392
|
r || (r = hn);
|
|
2393
2393
|
let i = [];
|
|
@@ -2545,7 +2545,7 @@ var gobjJs = function(e) {
|
|
|
2545
2545
|
],
|
|
2546
2546
|
[
|
|
2547
2547
|
"EV_TIMEOUT",
|
|
2548
|
-
|
|
2548
|
+
Tr,
|
|
2549
2549
|
null
|
|
2550
2550
|
],
|
|
2551
2551
|
[
|
|
@@ -2650,7 +2650,7 @@ var gobjJs = function(e) {
|
|
|
2650
2650
|
if (!e) return "";
|
|
2651
2651
|
const t = String(e).trim();
|
|
2652
2652
|
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Cn(t);
|
|
2653
|
-
}, e.sdata_flag_t =
|
|
2653
|
+
}, e.sdata_flag_t = T, e.send_http_json_post = function(e, t, n) {
|
|
2654
2654
|
let r = new XMLHttpRequest();
|
|
2655
2655
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2656
2656
|
4 === r.readyState && n(r.status, r.responseText);
|