poe-code 11.0.11 → 11.0.12

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.11",
3
+ "version": "11.0.12",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23673,10 +23673,22 @@ function createObjectArrayGlobals(options) {
23673
23673
  }),
23674
23674
  fromEntries: createSandboxClosure({
23675
23675
  sandbox: true,
23676
- call: ([value]) => allocateProducedSandboxValue(
23677
- Object.setPrototypeOf(Reflect.apply(Object.fromEntries, Object, [value]), null),
23678
- options.budget
23679
- ),
23676
+ call: ([value]) => {
23677
+ const iterator = getSandboxIterator(value);
23678
+ if (iterator === void 0) {
23679
+ throw new TypeError("Object.fromEntries requires an iterable.");
23680
+ }
23681
+ if (!iterator.generator) {
23682
+ return allocateProducedSandboxValue(
23683
+ Object.setPrototypeOf(
23684
+ Reflect.apply(Object.fromEntries, Object, [{ [Symbol.iterator]: () => iterator }]),
23685
+ null
23686
+ ),
23687
+ options.budget
23688
+ );
23689
+ }
23690
+ return objectFromSandboxEntries(iterator, options.budget);
23691
+ },
23680
23692
  name: "fromEntries"
23681
23693
  }),
23682
23694
  freeze: createSandboxClosure({
@@ -23797,6 +23809,38 @@ function createObjectArrayGlobals(options) {
23797
23809
  })
23798
23810
  };
23799
23811
  }
23812
+ async function objectFromSandboxEntries(iterator, budget) {
23813
+ const object = /* @__PURE__ */ Object.create(null);
23814
+ try {
23815
+ while (true) {
23816
+ const result = await iterator.next();
23817
+ if (typeof result !== "object" && typeof result !== "function" || result === null) {
23818
+ throw new TypeError("Iterator result must be an object.");
23819
+ }
23820
+ if (result.done) break;
23821
+ const entry = result.value;
23822
+ if (typeof entry !== "object" && typeof entry !== "function" || entry === null) {
23823
+ throw new TypeError("Object.fromEntries requires entry objects.");
23824
+ }
23825
+ const key = entry[0];
23826
+ const value = entry[1];
23827
+ Object.defineProperty(object, key, {
23828
+ configurable: true,
23829
+ enumerable: true,
23830
+ value,
23831
+ writable: true
23832
+ });
23833
+ }
23834
+ } catch (error) {
23835
+ try {
23836
+ await iterator.return?.();
23837
+ } catch {
23838
+ throw error;
23839
+ }
23840
+ throw error;
23841
+ }
23842
+ return allocateProducedSandboxValue(object, budget);
23843
+ }
23800
23844
  function assignSandboxValues(target, sources) {
23801
23845
  if (target === null || target === void 0) {
23802
23846
  throw new TypeError("Object.assign(target, ...sources) requires a non-null target.");
@@ -28987,4 +29031,4 @@ export {
28987
29031
  FileSnapshotBackend,
28988
29032
  run
28989
29033
  };
28990
- //# sourceMappingURL=chunk-QWNCR7EZ.js.map
29034
+ //# sourceMappingURL=chunk-5BWI6HAZ.js.map