poe-code 11.0.15 → 11.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-code",
3
- "version": "11.0.15",
3
+ "version": "11.0.16",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23959,6 +23959,7 @@ function getTemplateRawParts(template) {
23959
23959
  }
23960
23960
 
23961
23961
  // packages/safejs/src/interp/methods/array.ts
23962
+ var activeArrayCallbacks = /* @__PURE__ */ new WeakMap();
23962
23963
  var arrayMethodNames = /* @__PURE__ */ new Set([
23963
23964
  "map",
23964
23965
  "filter",
@@ -24029,11 +24030,20 @@ async function callArrayMethod(value, methodName, args, options, stack = []) {
24029
24030
  assertCollectionMutable(value);
24030
24031
  }
24031
24032
  if (isCallbackArrayMethod(methodName)) {
24032
- const leaveCallback = enterCollectionCallback(value);
24033
+ let callbackState = activeArrayCallbacks.get(value);
24034
+ if (callbackState === void 0) {
24035
+ callbackState = { depth: 0, leave: enterCollectionCallback(value) };
24036
+ activeArrayCallbacks.set(value, callbackState);
24037
+ }
24038
+ callbackState.depth += 1;
24033
24039
  try {
24034
24040
  return await callArrayMethodUnlocked(value, methodName, args, options, stack);
24035
24041
  } finally {
24036
- leaveCallback();
24042
+ callbackState.depth -= 1;
24043
+ if (callbackState.depth === 0) {
24044
+ activeArrayCallbacks.delete(value);
24045
+ callbackState.leave();
24046
+ }
24037
24047
  }
24038
24048
  }
24039
24049
  return callArrayMethodUnlocked(value, methodName, args, options, stack);
@@ -29052,4 +29062,4 @@ export {
29052
29062
  FileSnapshotBackend,
29053
29063
  run
29054
29064
  };
29055
- //# sourceMappingURL=chunk-CMWFNRW4.js.map
29065
+ //# sourceMappingURL=chunk-KNMVUWS7.js.map