@poe-platform/safe-js 0.1.350 → 0.1.351
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/dist/safe-js/chunks/{chunk-QDFP6UGN.js → chunk-AS6HS2LE.js} +13 -2
- package/dist/safe-js/chunks/{chunk-QDFP6UGN.js.map → chunk-AS6HS2LE.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-KCCF2JJV.js → chunk-Z7WNQACZ.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-KCCF2JJV.js.map → chunk-Z7WNQACZ.js.map} +0 -0
|
@@ -25458,6 +25458,7 @@ function createBigIntGlobal(budget) {
|
|
|
25458
25458
|
|
|
25459
25459
|
// packages/safe-js/src/interp/globals/array-buffer.ts
|
|
25460
25460
|
var resizeBuffer2 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")?.value;
|
|
25461
|
+
var readDetached = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "detached")?.get;
|
|
25461
25462
|
function createArrayBufferGlobal(budget) {
|
|
25462
25463
|
const prototype = /* @__PURE__ */ Object.create(null);
|
|
25463
25464
|
const constructor = createSandboxClosure({
|
|
@@ -25628,7 +25629,7 @@ function createArrayBufferGlobal(budget) {
|
|
|
25628
25629
|
}
|
|
25629
25630
|
})
|
|
25630
25631
|
});
|
|
25631
|
-
for (const key of ["byteLength", "maxByteLength", "resizable"]) {
|
|
25632
|
+
for (const key of ["byteLength", "maxByteLength", "resizable", "detached"]) {
|
|
25632
25633
|
const getter = createSandboxClosure({
|
|
25633
25634
|
guest: true,
|
|
25634
25635
|
sandbox: true,
|
|
@@ -25637,6 +25638,16 @@ function createArrayBufferGlobal(budget) {
|
|
|
25637
25638
|
call: (_args, context) => {
|
|
25638
25639
|
if (!isSandboxArrayBuffer(context?.thisValue)) throw new TypeError(`ArrayBuffer ${key} requires a buffer receiver.`);
|
|
25639
25640
|
if (key === "byteLength") return arrayBufferLength(context.thisValue);
|
|
25641
|
+
if (key === "detached") {
|
|
25642
|
+
if (readDetached !== void 0) return Reflect.apply(readDetached, context.thisValue, []);
|
|
25643
|
+
try {
|
|
25644
|
+
new Uint8Array(context.thisValue, 0, 0);
|
|
25645
|
+
return false;
|
|
25646
|
+
} catch (error) {
|
|
25647
|
+
if (error instanceof TypeError) return true;
|
|
25648
|
+
throw error;
|
|
25649
|
+
}
|
|
25650
|
+
}
|
|
25640
25651
|
const options = arrayBufferOptions(context.thisValue);
|
|
25641
25652
|
return key === "resizable" ? options !== void 0 : options?.maxByteLength ?? arrayBufferLength(context.thisValue);
|
|
25642
25653
|
}
|
|
@@ -42677,4 +42688,4 @@ export {
|
|
|
42677
42688
|
FileSnapshotBackend,
|
|
42678
42689
|
run
|
|
42679
42690
|
};
|
|
42680
|
-
//# sourceMappingURL=chunk-
|
|
42691
|
+
//# sourceMappingURL=chunk-AS6HS2LE.js.map
|