@poe-platform/safe-js 0.1.320 → 0.1.322
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-3KICEWDS.js → chunk-CBU6A7YV.js} +2 -2
- package/dist/safe-js/chunks/{chunk-J5UIUYUC.js → chunk-ECGDQJ7F.js} +49 -46
- package/dist/safe-js/chunks/chunk-ECGDQJ7F.js.map +7 -0
- 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-J5UIUYUC.js.map +0 -7
- /package/dist/safe-js/chunks/{chunk-3KICEWDS.js.map → chunk-CBU6A7YV.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateMigrationSemantics,
|
|
28
28
|
validateSnapshotData,
|
|
29
29
|
validateSnapshotMigration
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ECGDQJ7F.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-CBU6A7YV.js.map
|
|
@@ -6886,14 +6886,14 @@ var createValuesIterator = Object.getOwnPropertyDescriptor(typedArrayPrototype,
|
|
|
6886
6886
|
var bufferLength = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
|
|
6887
6887
|
var bufferResizable = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resizable")?.get;
|
|
6888
6888
|
var float32ViewLayouts = /* @__PURE__ */ new WeakMap();
|
|
6889
|
-
var resizeBuffer = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")
|
|
6889
|
+
var resizeBuffer = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")?.value;
|
|
6890
6890
|
function restoreFloat32View(buffer, byteOffset, length, budget) {
|
|
6891
6891
|
const originalLength = arrayBufferLength(buffer);
|
|
6892
6892
|
const required = byteOffset + (length ?? 0) * 4;
|
|
6893
6893
|
const options = arrayBufferOptions(buffer);
|
|
6894
6894
|
const grow = required > originalLength;
|
|
6895
6895
|
if (grow) {
|
|
6896
|
-
if (options === void 0 || required > options.maxByteLength)
|
|
6896
|
+
if (resizeBuffer === void 0 || options === void 0 || required > options.maxByteLength)
|
|
6897
6897
|
throw new RangeError("Float32Array layout exceeds backing capacity.");
|
|
6898
6898
|
budget?.allocateArrayLength(Math.ceil(required / 4));
|
|
6899
6899
|
budget?.provisionDataUsage(required - originalLength)();
|
|
@@ -11947,42 +11947,43 @@ function defineArrayResult(result, index, value, options) {
|
|
|
11947
11947
|
var arrayLikeSources = /* @__PURE__ */ new WeakMap();
|
|
11948
11948
|
var activeArrayCallbacks = /* @__PURE__ */ new WeakMap();
|
|
11949
11949
|
var localeArrays = /* @__PURE__ */ new WeakSet();
|
|
11950
|
-
var
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11950
|
+
var arrayMethodLengths = {
|
|
11951
|
+
map: 1,
|
|
11952
|
+
filter: 1,
|
|
11953
|
+
find: 1,
|
|
11954
|
+
findIndex: 1,
|
|
11955
|
+
findLast: 1,
|
|
11956
|
+
findLastIndex: 1,
|
|
11957
|
+
some: 1,
|
|
11958
|
+
every: 1,
|
|
11959
|
+
reduce: 1,
|
|
11960
|
+
reduceRight: 1,
|
|
11961
|
+
forEach: 1,
|
|
11962
|
+
flatMap: 1,
|
|
11963
|
+
flat: 0,
|
|
11964
|
+
includes: 1,
|
|
11965
|
+
indexOf: 1,
|
|
11966
|
+
lastIndexOf: 1,
|
|
11967
|
+
join: 1,
|
|
11968
|
+
toLocaleString: 0,
|
|
11969
|
+
slice: 2,
|
|
11970
|
+
concat: 1,
|
|
11971
|
+
splice: 2,
|
|
11972
|
+
fill: 1,
|
|
11973
|
+
copyWithin: 2,
|
|
11974
|
+
at: 1,
|
|
11975
|
+
sort: 1,
|
|
11976
|
+
reverse: 0,
|
|
11977
|
+
toSorted: 1,
|
|
11978
|
+
toReversed: 0,
|
|
11979
|
+
toSpliced: 2,
|
|
11980
|
+
with: 2,
|
|
11981
|
+
push: 1,
|
|
11982
|
+
pop: 0,
|
|
11983
|
+
shift: 0,
|
|
11984
|
+
unshift: 1
|
|
11985
|
+
};
|
|
11986
|
+
var arrayMethodNames = new Set(Object.keys(arrayMethodLengths));
|
|
11986
11987
|
function getArrayMember(value, property, options) {
|
|
11987
11988
|
const index = getArrayIndex(property);
|
|
11988
11989
|
if (index !== void 0) {
|
|
@@ -13503,7 +13504,7 @@ function createArrayGlobal(budget) {
|
|
|
13503
13504
|
guest: true,
|
|
13504
13505
|
sandbox: true,
|
|
13505
13506
|
name,
|
|
13506
|
-
length:
|
|
13507
|
+
length: arrayMethodLengths[name],
|
|
13507
13508
|
call: (args, context) => callArrayMethod(context?.thisValue, name, args, {
|
|
13508
13509
|
budget,
|
|
13509
13510
|
context,
|
|
@@ -25122,8 +25123,7 @@ function createBigIntGlobal(budget) {
|
|
|
25122
25123
|
}
|
|
25123
25124
|
|
|
25124
25125
|
// packages/safe-js/src/interp/globals/array-buffer.ts
|
|
25125
|
-
var resizeBuffer2 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")
|
|
25126
|
-
var detachedBuffer = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "detached").get;
|
|
25126
|
+
var resizeBuffer2 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "resize")?.value;
|
|
25127
25127
|
function createArrayBufferGlobal(budget) {
|
|
25128
25128
|
const prototype = /* @__PURE__ */ Object.create(null);
|
|
25129
25129
|
const constructor = createSandboxClosure({
|
|
@@ -25164,6 +25164,8 @@ function createArrayBufferGlobal(budget) {
|
|
|
25164
25164
|
}
|
|
25165
25165
|
const target = context?.newTarget ?? constructor;
|
|
25166
25166
|
selected = await bridge.getProperty(target, "prototype");
|
|
25167
|
+
if (maxByteLength !== void 0 && resizeBuffer2 === void 0)
|
|
25168
|
+
throw new TypeError("Resizable ArrayBuffer requires host runtime support.");
|
|
25167
25169
|
budget.allocateArrayLength(maxByteLength ?? length);
|
|
25168
25170
|
budget.provisionDataUsage(length + 1)();
|
|
25169
25171
|
const result = Reflect.construct(ArrayBuffer, [length, maxByteLength === void 0 ? void 0 : { maxByteLength }]);
|
|
@@ -25214,7 +25216,7 @@ function createArrayBufferGlobal(budget) {
|
|
|
25214
25216
|
call: async (args, context) => {
|
|
25215
25217
|
const receiver = context?.thisValue;
|
|
25216
25218
|
if (!isSandboxArrayBuffer(receiver)) throw new TypeError("ArrayBuffer slice requires a buffer receiver.");
|
|
25217
|
-
|
|
25219
|
+
new Uint8Array(receiver, 0, 0);
|
|
25218
25220
|
const length = arrayBufferLength(receiver);
|
|
25219
25221
|
let candidate;
|
|
25220
25222
|
let result;
|
|
@@ -25251,9 +25253,10 @@ function createArrayBufferGlobal(budget) {
|
|
|
25251
25253
|
result = new ArrayBuffer(size);
|
|
25252
25254
|
setSandboxPrototype(result, prototype, budget);
|
|
25253
25255
|
} else result = await invokeBuiltinClosure(candidate, [size], budget, bridge, void 0, true);
|
|
25254
|
-
if (!isSandboxArrayBuffer(result) ||
|
|
25256
|
+
if (!isSandboxArrayBuffer(result) || result === receiver || arrayBufferLength(result) < size)
|
|
25255
25257
|
throw new TypeError("ArrayBuffer species must return distinct sufficient buffer storage.");
|
|
25256
|
-
|
|
25258
|
+
new Uint8Array(result, 0, 0);
|
|
25259
|
+
new Uint8Array(receiver, 0, 0);
|
|
25257
25260
|
const count = Math.min(size, Math.max(arrayBufferLength(receiver) - start, 0));
|
|
25258
25261
|
if (count > 0) new Uint8Array(result, 0, count).set(new Uint8Array(receiver, start, count));
|
|
25259
25262
|
return result;
|
|
@@ -25273,7 +25276,7 @@ function createArrayBufferGlobal(budget) {
|
|
|
25273
25276
|
length: 1,
|
|
25274
25277
|
call: async (args, context) => {
|
|
25275
25278
|
const receiver = context?.thisValue;
|
|
25276
|
-
if (!isSandboxArrayBuffer(receiver) || arrayBufferOptions(receiver) === void 0)
|
|
25279
|
+
if (resizeBuffer2 === void 0 || !isSandboxArrayBuffer(receiver) || arrayBufferOptions(receiver) === void 0)
|
|
25277
25280
|
throw new TypeError("ArrayBuffer resize requires a resizable buffer receiver.");
|
|
25278
25281
|
const release = retainValues(budget, () => [receiver, ...args]);
|
|
25279
25282
|
try {
|
|
@@ -42338,4 +42341,4 @@ export {
|
|
|
42338
42341
|
FileSnapshotBackend,
|
|
42339
42342
|
run
|
|
42340
42343
|
};
|
|
42341
|
-
//# sourceMappingURL=chunk-
|
|
42344
|
+
//# sourceMappingURL=chunk-ECGDQJ7F.js.map
|