@cldmv/slothlet 2.6.0 → 2.6.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.
|
@@ -64,6 +64,23 @@ function runtime_shouldWrapMethod(value, prop) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
function runtime_shouldExcludeFromProxy(val) {
|
|
68
|
+
if (val == null || typeof val !== "object") {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
for (const cls of EXCLUDED_INSTANCEOF_CLASSES) {
|
|
75
|
+
if (typeof cls === "function" && val instanceof cls) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
67
84
|
function runtime_isClassInstance(val) {
|
|
68
85
|
if (
|
|
69
86
|
val == null ||
|
|
@@ -144,6 +161,13 @@ export const makeWrapper = (ctx) => {
|
|
|
144
161
|
if (val == null || (typeof val !== "object" && typeof val !== "function")) return val;
|
|
145
162
|
if (cache.has(val)) return cache.get(val);
|
|
146
163
|
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
if (runtime_shouldExcludeFromProxy(val)) {
|
|
167
|
+
cache.set(val, val);
|
|
168
|
+
return val;
|
|
169
|
+
}
|
|
170
|
+
|
|
147
171
|
const proxied = new Proxy(val, {
|
|
148
172
|
apply(target, thisArg, args) {
|
|
149
173
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-asynclocalstorage.d.mts","sourceRoot":"","sources":["../../../../dist/lib/runtime/runtime-asynclocalstorage.mjs"],"names":[],"mappings":"AAuCA;;;;;GAKG;AACH,wBAHU,qBAAqB,CAGkB;AAsB1C,gCAdI,MAAM,yBAEN,GAAG,gBAED,GAAG,CA6Bf;AAiBM,0BAZM,MAAM,GAAC,IAAI,CAY0B;
|
|
1
|
+
{"version":3,"file":"runtime-asynclocalstorage.d.mts","sourceRoot":"","sources":["../../../../dist/lib/runtime/runtime-asynclocalstorage.mjs"],"names":[],"mappings":"AAuCA;;;;;GAKG;AACH,wBAHU,qBAAqB,CAGkB;AAsB1C,gCAdI,MAAM,yBAEN,GAAG,gBAED,GAAG,CA6Bf;AAiBM,0BAZM,MAAM,GAAC,IAAI,CAY0B;AAkN3C,iCAjBI,MAAM,YAuIhB;AAuSD;;;;;;;;;;;;;GAaG;AACH,mBATU,WAAS,MAAM,CAS6B;AAEtD;;;;;;;;;;;;;GAaG;AACH,sBATU,MAAM,CAS4C;AAE5D;;;;;;;;;;;;;GAaG;AACH,wBATU,MAAM,CASgD;;kCAnuB9B,kBAAkB"}
|