@poe-platform/safe-js 0.1.316 → 0.1.318
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-YBYXFKHK.js → chunk-AXRLZHJU.js} +2 -2
- package/dist/safe-js/chunks/{chunk-G47EGC6S.js → chunk-X4Q4MITB.js} +65 -16
- package/dist/safe-js/chunks/{chunk-G47EGC6S.js.map → chunk-X4Q4MITB.js.map} +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-YBYXFKHK.js.map → chunk-AXRLZHJU.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-X4Q4MITB.js";
|
|
31
31
|
|
|
32
32
|
// packages/safe-js/src/migrate.ts
|
|
33
33
|
import { createHash } from "node:crypto";
|
|
@@ -8249,4 +8249,4 @@ export {
|
|
|
8249
8249
|
parseMcpConfig,
|
|
8250
8250
|
makeMcpModule
|
|
8251
8251
|
};
|
|
8252
|
-
//# sourceMappingURL=chunk-
|
|
8252
|
+
//# sourceMappingURL=chunk-AXRLZHJU.js.map
|
|
@@ -14855,6 +14855,18 @@ function createFloat32ArrayPrototypes(budget, constructor) {
|
|
|
14855
14855
|
setSandboxPrototype(prototype, shared);
|
|
14856
14856
|
setSandboxPrototype(shared, getSandboxPrototype(/* @__PURE__ */ Object.create(null), budget));
|
|
14857
14857
|
const getters = [];
|
|
14858
|
+
const species = createSandboxClosure({
|
|
14859
|
+
guest: true,
|
|
14860
|
+
sandbox: true,
|
|
14861
|
+
name: "get [Symbol.species]",
|
|
14862
|
+
length: 0,
|
|
14863
|
+
call: (_args, context) => context?.thisValue
|
|
14864
|
+
});
|
|
14865
|
+
getters.push(species);
|
|
14866
|
+
Object.defineProperty(materializeFunctionProperties(typedArray), Symbol.species, {
|
|
14867
|
+
get: accessorAdapter(species, "get"),
|
|
14868
|
+
configurable: true
|
|
14869
|
+
});
|
|
14858
14870
|
for (const key of ["length", "byteLength", "byteOffset", "buffer"]) {
|
|
14859
14871
|
const getter = createSandboxClosure({
|
|
14860
14872
|
guest: true,
|
|
@@ -14871,7 +14883,7 @@ function createFloat32ArrayPrototypes(budget, constructor) {
|
|
|
14871
14883
|
Object.defineProperty(shared, key, { get: accessorAdapter(getter, "get"), configurable: true });
|
|
14872
14884
|
}
|
|
14873
14885
|
for (const key of ["set", "slice", "subarray"])
|
|
14874
|
-
Object.defineProperty(shared, key, { value: getFloat32Member(new Float32Array(0), key, budget), writable: true, configurable: true });
|
|
14886
|
+
Object.defineProperty(shared, key, { value: getFloat32Member(new Float32Array(0), key, budget, constructor), writable: true, configurable: true });
|
|
14875
14887
|
const arrayPrototype = resolveIntrinsicIdentity(budget, '["Array","prototype"]');
|
|
14876
14888
|
Object.defineProperty(shared, "toString", { value: getSandboxDataProperty(arrayPrototype, "toString", budget), writable: true, configurable: true });
|
|
14877
14889
|
Object.defineProperty(shared, "join", {
|
|
@@ -14939,7 +14951,7 @@ function createFloat32ArrayPrototypes(budget, constructor) {
|
|
|
14939
14951
|
function isFloat32ArrayConstructor(value) {
|
|
14940
14952
|
return typeof value === "object" && value !== null && constructors.has(value);
|
|
14941
14953
|
}
|
|
14942
|
-
function getFloat32Member(value, property, budget) {
|
|
14954
|
+
function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
14943
14955
|
const key = String(property);
|
|
14944
14956
|
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
14945
14957
|
if (descriptor !== void 0) {
|
|
@@ -15007,25 +15019,62 @@ function getFloat32Member(value, property, budget) {
|
|
|
15007
15019
|
})();
|
|
15008
15020
|
}
|
|
15009
15021
|
return (async () => {
|
|
15010
|
-
|
|
15022
|
+
let candidate;
|
|
15023
|
+
let result;
|
|
15024
|
+
const release = retainValues(budget, () => [receiver, candidate, result, ...args]);
|
|
15011
15025
|
try {
|
|
15012
15026
|
const start = relativeIndex(await sandboxNumber(args[0], budget, bridge), storage2.length);
|
|
15013
15027
|
const end = args[1] === void 0 ? storage2.length : relativeIndex(await sandboxNumber(args[1], budget, bridge), storage2.length);
|
|
15014
15028
|
const length = Math.max(end - start, 0);
|
|
15029
|
+
const layout = float32ViewLayouts.get(receiver);
|
|
15030
|
+
const offset = (layout?.byteOffset ?? storage2.byteOffset) + start * 4;
|
|
15031
|
+
const tracking = layout !== void 0 && layout.length === void 0 && args[1] === void 0;
|
|
15032
|
+
if (defaultConstructor !== void 0) {
|
|
15033
|
+
candidate = await bridge.getProperty(receiver, "constructor");
|
|
15034
|
+
if (candidate !== void 0) {
|
|
15035
|
+
if (candidate === null || typeof candidate !== "object")
|
|
15036
|
+
throw new TypeError("TypedArray constructor must be an object.");
|
|
15037
|
+
candidate = await bridge.getProperty(candidate, Symbol.species);
|
|
15038
|
+
if (candidate !== void 0 && candidate !== null && (!isSandboxClosure(candidate) || candidate.construct === void 0))
|
|
15039
|
+
throw new TypeError("TypedArray species must be a constructor.");
|
|
15040
|
+
}
|
|
15041
|
+
}
|
|
15042
|
+
if (candidate !== void 0 && candidate !== null && candidate !== defaultConstructor) {
|
|
15043
|
+
const values = key === "slice" ? [length] : [storage2.buffer, offset, tracking ? void 0 : length];
|
|
15044
|
+
result = await invokeBuiltinClosure(candidate, values, budget, bridge, void 0, true);
|
|
15045
|
+
if (!isFloat32Array(result)) throw new TypeError("TypedArray species must return typed storage.");
|
|
15046
|
+
const target = float32Storage(result, key === "slice");
|
|
15047
|
+
if (key === "slice" && target.length < length)
|
|
15048
|
+
throw new TypeError("TypedArray species returned insufficient storage.");
|
|
15049
|
+
}
|
|
15015
15050
|
if (key === "subarray") {
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
15051
|
+
if (result === void 0) {
|
|
15052
|
+
result = new Float32Array(storage2.buffer, offset, tracking ? void 0 : length);
|
|
15053
|
+
if (arrayBufferOptions(storage2.buffer) !== void 0)
|
|
15054
|
+
float32ViewLayouts.set(result, { byteOffset: offset, ...tracking ? {} : { length } });
|
|
15055
|
+
}
|
|
15056
|
+
return result;
|
|
15057
|
+
}
|
|
15058
|
+
if (result === void 0) {
|
|
15059
|
+
checkFloat32Allocation(length, budget);
|
|
15060
|
+
result = new Float32Array(length);
|
|
15061
|
+
}
|
|
15062
|
+
if (!isFloat32Array(result)) throw new TypeError("TypedArray species must return typed storage.");
|
|
15063
|
+
if (length > 0) {
|
|
15064
|
+
const current = float32Storage(receiver, true);
|
|
15065
|
+
const target = float32Storage(result, true);
|
|
15066
|
+
const count = Math.min(length, Math.max(current.length - start, 0));
|
|
15067
|
+
if (count > 0) {
|
|
15068
|
+
const sourceBytes = new Uint8Array(current.buffer, current.byteOffset + start * 4, count * 4);
|
|
15069
|
+
const targetBytes = new Uint8Array(target.buffer, target.byteOffset, count * 4);
|
|
15070
|
+
if (current.buffer === target.buffer && targetBytes.byteOffset > sourceBytes.byteOffset && targetBytes.byteOffset < sourceBytes.byteOffset + sourceBytes.length) {
|
|
15071
|
+
for (let index = 0; index < sourceBytes.length; index++) {
|
|
15072
|
+
budget.visitNode();
|
|
15073
|
+
targetBytes[index] = sourceBytes[index];
|
|
15074
|
+
}
|
|
15075
|
+
} else targetBytes.set(sourceBytes);
|
|
15076
|
+
}
|
|
15023
15077
|
}
|
|
15024
|
-
checkFloat32Allocation(length, budget);
|
|
15025
|
-
const result = new Float32Array(length);
|
|
15026
|
-
new Uint8Array(result.buffer).set(
|
|
15027
|
-
new Uint8Array(storage2.buffer, storage2.byteOffset + start * 4, length * 4)
|
|
15028
|
-
);
|
|
15029
15078
|
return result;
|
|
15030
15079
|
} finally {
|
|
15031
15080
|
release();
|
|
@@ -42216,4 +42265,4 @@ export {
|
|
|
42216
42265
|
FileSnapshotBackend,
|
|
42217
42266
|
run
|
|
42218
42267
|
};
|
|
42219
|
-
//# sourceMappingURL=chunk-
|
|
42268
|
+
//# sourceMappingURL=chunk-X4Q4MITB.js.map
|