mol_wire_lib 1.0.381 → 1.0.382
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/node.d.ts +5 -0
- package/node.deps.json +1 -1
- package/node.esm.js +32 -2
- package/node.esm.js.map +1 -1
- package/node.js +32 -2
- package/node.js.map +1 -1
- package/node.test.js +32 -30
- package/node.test.js.map +1 -1
- package/package.json +3 -1
- package/web.d.ts +5 -0
- package/web.deps.json +1 -1
- package/web.esm.js +32 -2
- package/web.esm.js.map +1 -1
- package/web.js +32 -2
- package/web.js.map +1 -1
- package/web.test.js +0 -28
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -927,6 +927,34 @@ var $;
|
|
|
927
927
|
;
|
|
928
928
|
"use strict";
|
|
929
929
|
var $;
|
|
930
|
+
(function ($) {
|
|
931
|
+
function $mol_func_name(func) {
|
|
932
|
+
let name = func.name;
|
|
933
|
+
if (name?.length > 1)
|
|
934
|
+
return name;
|
|
935
|
+
for (let key in this) {
|
|
936
|
+
try {
|
|
937
|
+
if (this[key] !== func)
|
|
938
|
+
continue;
|
|
939
|
+
name = key;
|
|
940
|
+
Object.defineProperty(func, 'name', { value: name });
|
|
941
|
+
break;
|
|
942
|
+
}
|
|
943
|
+
catch { }
|
|
944
|
+
}
|
|
945
|
+
return name;
|
|
946
|
+
}
|
|
947
|
+
$.$mol_func_name = $mol_func_name;
|
|
948
|
+
function $mol_func_name_from(target, source) {
|
|
949
|
+
Object.defineProperty(target, 'name', { value: source.name });
|
|
950
|
+
return target;
|
|
951
|
+
}
|
|
952
|
+
$.$mol_func_name_from = $mol_func_name_from;
|
|
953
|
+
})($ || ($ = {}));
|
|
954
|
+
//mol/func/name/name.ts
|
|
955
|
+
;
|
|
956
|
+
"use strict";
|
|
957
|
+
var $;
|
|
930
958
|
(function ($) {
|
|
931
959
|
function $mol_guid(length = 8, exists = () => false) {
|
|
932
960
|
for (;;) {
|
|
@@ -1012,7 +1040,8 @@ var $;
|
|
|
1012
1040
|
const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1013
1041
|
if (existen)
|
|
1014
1042
|
return existen;
|
|
1015
|
-
const
|
|
1043
|
+
const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
|
|
1044
|
+
const key = `${prefix}.${field}`;
|
|
1016
1045
|
const fiber = new $mol_wire_atom(key, task, host, []);
|
|
1017
1046
|
(host ?? task)[field] = fiber;
|
|
1018
1047
|
return fiber;
|
|
@@ -1020,7 +1049,8 @@ var $;
|
|
|
1020
1049
|
static plex(host, task, key) {
|
|
1021
1050
|
const field = task.name + '()';
|
|
1022
1051
|
let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
|
|
1023
|
-
const
|
|
1052
|
+
const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
|
|
1053
|
+
const id = `${prefix}.${task.name}(${$mol_key(key)})`;
|
|
1024
1054
|
if (dict) {
|
|
1025
1055
|
const existen = dict.get(id);
|
|
1026
1056
|
if (existen)
|
|
@@ -2996,34 +3026,6 @@ var $;
|
|
|
2996
3026
|
;
|
|
2997
3027
|
"use strict";
|
|
2998
3028
|
var $;
|
|
2999
|
-
(function ($) {
|
|
3000
|
-
function $mol_func_name(func) {
|
|
3001
|
-
let name = func.name;
|
|
3002
|
-
if (name?.length > 1)
|
|
3003
|
-
return name;
|
|
3004
|
-
for (let key in this) {
|
|
3005
|
-
try {
|
|
3006
|
-
if (this[key] !== func)
|
|
3007
|
-
continue;
|
|
3008
|
-
name = key;
|
|
3009
|
-
Object.defineProperty(func, 'name', { value: name });
|
|
3010
|
-
break;
|
|
3011
|
-
}
|
|
3012
|
-
catch { }
|
|
3013
|
-
}
|
|
3014
|
-
return name;
|
|
3015
|
-
}
|
|
3016
|
-
$.$mol_func_name = $mol_func_name;
|
|
3017
|
-
function $mol_func_name_from(target, source) {
|
|
3018
|
-
Object.defineProperty(target, 'name', { value: source.name });
|
|
3019
|
-
return target;
|
|
3020
|
-
}
|
|
3021
|
-
$.$mol_func_name_from = $mol_func_name_from;
|
|
3022
|
-
})($ || ($ = {}));
|
|
3023
|
-
//mol/func/name/name.ts
|
|
3024
|
-
;
|
|
3025
|
-
"use strict";
|
|
3026
|
-
var $;
|
|
3027
3029
|
(function ($_1) {
|
|
3028
3030
|
$mol_test({
|
|
3029
3031
|
'Collect deps'() {
|