@enclave-vm/core 2.15.0 → 2.15.2
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/enclave.d.ts +1 -0
- package/esm/index.mjs +941 -699
- package/esm/worker.mjs +5 -1
- package/index.js +1011 -774
- package/package.json +3 -3
- package/secure-proxy.d.ts +28 -0
- package/src/adapters/worker-pool/package.json +3 -3
- package/worker.js +5 -1
package/esm/worker.mjs
CHANGED
|
@@ -526,7 +526,11 @@ var Interpreter = class {
|
|
|
526
526
|
const obj = value ?? {};
|
|
527
527
|
for (const prop of pattern.properties) {
|
|
528
528
|
if (prop.type === "RestElement") continue;
|
|
529
|
-
|
|
529
|
+
if (prop.computed) throw new InterpreterError("Computed destructuring keys are not allowed");
|
|
530
|
+
let key;
|
|
531
|
+
if (prop.key.type === "Identifier") key = prop.key.name;
|
|
532
|
+
else if (prop.key.type === "Literal") key = String(prop.key.value);
|
|
533
|
+
else throw new InterpreterError("Unsupported destructuring key");
|
|
530
534
|
if (BLOCKED_KEYS.has(key)) throw new InterpreterError(`Forbidden destructured key: ${key}`);
|
|
531
535
|
this.bindPattern(prop.value, obj[key], scope, mutable);
|
|
532
536
|
}
|