@poe-platform/safe-js 0.1.129 → 0.1.130

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.
@@ -27,7 +27,7 @@ import {
27
27
  validateMigrationSemantics,
28
28
  validateSnapshotData,
29
29
  validateSnapshotMigration
30
- } from "./chunk-OM5W7AYB.js";
30
+ } from "./chunk-ZTGKRKQH.js";
31
31
 
32
32
  // packages/safe-js/src/migrate.ts
33
33
  import { createHash } from "node:crypto";
@@ -8245,4 +8245,4 @@ export {
8245
8245
  parseMcpConfig,
8246
8246
  makeMcpModule
8247
8247
  };
8248
- //# sourceMappingURL=chunk-EH4VQYKL.js.map
8248
+ //# sourceMappingURL=chunk-SGKEOIQL.js.map
@@ -25092,6 +25092,9 @@ function isStringMethodName(property) {
25092
25092
  function validateStringMethodArguments(_methodName, _args) {
25093
25093
  }
25094
25094
  function callStringMethod(value, methodName, args, budget, callClosure = async (closure, closureArgs) => await closure.call(closureArgs), parent, context) {
25095
+ if (methodName === "concat" && args.some((argument) => argument !== null && typeof argument === "object")) {
25096
+ return callConcat(value, args, budget, context);
25097
+ }
25095
25098
  if (methodName === "isWellFormed") {
25096
25099
  for (let index = 0; index < value.length; index++) {
25097
25100
  const codeUnit = value.charCodeAt(index);
@@ -25247,6 +25250,19 @@ function callStringMethod(value, methodName, args, budget, callClosure = async (
25247
25250
  operation.release();
25248
25251
  }
25249
25252
  }
25253
+ async function callConcat(value, args, budget, context) {
25254
+ let result = budget.allocateString(value);
25255
+ const release = retainValues(budget, () => [result]);
25256
+ try {
25257
+ for (const argument of args) {
25258
+ const text = sandboxString(argument, budget, context);
25259
+ result = budget.allocateString(result + (typeof text === "string" ? text : await text));
25260
+ }
25261
+ return result;
25262
+ } finally {
25263
+ release();
25264
+ }
25265
+ }
25250
25266
  function callReplaceLikeMethod(value, methodName, args, budget, callClosure, context) {
25251
25267
  const search = args[0];
25252
25268
  const replacement = args[1];
@@ -33484,4 +33500,4 @@ export {
33484
33500
  FileSnapshotBackend,
33485
33501
  run
33486
33502
  };
33487
- //# sourceMappingURL=chunk-OM5W7AYB.js.map
33503
+ //# sourceMappingURL=chunk-ZTGKRKQH.js.map