poe-code 11.0.14 → 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/dist/index.js CHANGED
@@ -143119,11 +143119,20 @@ async function callArrayMethod(value, methodName, args, options, stack = []) {
143119
143119
  assertCollectionMutable(value);
143120
143120
  }
143121
143121
  if (isCallbackArrayMethod(methodName)) {
143122
- const leaveCallback = enterCollectionCallback(value);
143122
+ let callbackState = activeArrayCallbacks.get(value);
143123
+ if (callbackState === void 0) {
143124
+ callbackState = { depth: 0, leave: enterCollectionCallback(value) };
143125
+ activeArrayCallbacks.set(value, callbackState);
143126
+ }
143127
+ callbackState.depth += 1;
143123
143128
  try {
143124
143129
  return await callArrayMethodUnlocked(value, methodName, args, options, stack);
143125
143130
  } finally {
143126
- leaveCallback();
143131
+ callbackState.depth -= 1;
143132
+ if (callbackState.depth === 0) {
143133
+ activeArrayCallbacks.delete(value);
143134
+ callbackState.leave();
143135
+ }
143127
143136
  }
143128
143137
  }
143129
143138
  return callArrayMethodUnlocked(value, methodName, args, options, stack);
@@ -143621,12 +143630,13 @@ function toIntegerOrInfinity(value) {
143621
143630
  }
143622
143631
  return Math.trunc(number);
143623
143632
  }
143624
- var arrayMethodNames;
143633
+ var activeArrayCallbacks, arrayMethodNames;
143625
143634
  var init_array = __esm({
143626
143635
  "packages/safejs/src/interp/methods/array.ts"() {
143627
143636
  "use strict";
143628
143637
  init_values();
143629
143638
  init_running_state();
143639
+ activeArrayCallbacks = /* @__PURE__ */ new WeakMap();
143630
143640
  arrayMethodNames = /* @__PURE__ */ new Set([
143631
143641
  "map",
143632
143642
  "filter",
@@ -144195,7 +144205,7 @@ function toMatchArray(match, input) {
144195
144205
  return null;
144196
144206
  }
144197
144207
  const result = [match.text, ...match.captures];
144198
- Object.assign(result, { groups: void 0, index: match.index, input });
144208
+ Object.assign(result, { index: match.index, input, groups: void 0 });
144199
144209
  return result;
144200
144210
  }
144201
144211
  var regexMethodNames;
@@ -155629,7 +155639,7 @@ var init_package2 = __esm({
155629
155639
  "package.json"() {
155630
155640
  package_default2 = {
155631
155641
  name: "poe-code",
155632
- version: "11.0.14",
155642
+ version: "11.0.16",
155633
155643
  description: "CLI tool to configure Poe API for developer workflows.",
155634
155644
  license: "MIT",
155635
155645
  type: "module",