Comparing version 0.0.118 to 0.0.119
{ | ||
"name": "webdetta", | ||
"version": "0.0.118", | ||
"version": "0.0.119", | ||
"author": "Fedot Kriutchenko <fodyadev@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -113,2 +113,3 @@ // MIT License | ||
return Object.assign(self, { | ||
get ws() { return ws; }, | ||
isOpen: rVal(false), | ||
@@ -115,0 +116,0 @@ onClose: Chain(), |
@@ -36,3 +36,3 @@ import { parseFn } from './common.js'; | ||
value: new Function(...signature, [ | ||
`return this["#internals"].${awaitResult ? 'call' : 'cast'}`, | ||
`return this["#internals"].rpc.${awaitResult ? 'call' : 'cast'}`, | ||
`(${JSON.stringify(handlerId)}, ...arguments);` | ||
@@ -48,3 +48,3 @@ ].join('')) | ||
const init = [ | ||
`const V = this["#internals"]["#vals"] ??= {};`, | ||
`const V = this["#internals"].state ??= {};`, | ||
`const H = ${JSON.stringify(handlerId)};`, | ||
@@ -61,3 +61,3 @@ `if (!(H in V)) V[H] = ${JSON.stringify(initial)};`, | ||
(init + `V[H] = value;`) + | ||
(!sync ? '' : `this["#internals"].cast(H, value);`) | ||
(!sync ? '' : `this["#internals"].rpc.cast(H, value);`) | ||
)), | ||
@@ -64,0 +64,0 @@ } |
@@ -33,3 +33,3 @@ const defineProperty = (instance, path, descriptor) => { | ||
if (rpcInstance) defineProperty(instance, ['#internals'], { | ||
value: rpcInstance, | ||
value: { state: {}, rpc: rpcInstance }, | ||
writable: false | ||
@@ -36,0 +36,0 @@ }); |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
106404
3127