poe-code 11.0.10 → 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.10",
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.");
@@ -28150,14 +28194,16 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
28150
28194
  declaration.source.span
28151
28195
  );
28152
28196
  }
28153
- const wrappedExports = wrappedModules.get(moduleName) ?? wrapCancelableBindings(
28154
- wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
28155
- budget: options.budget,
28156
- hostCalls: options.hostCalls,
28157
- moduleId: moduleName,
28158
- signal: options.signal
28159
- }),
28160
- options.signal
28197
+ const wrappedExports = wrappedModules.get(moduleName) ?? createBindingRecord(
28198
+ wrapCancelableBindings(
28199
+ wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
28200
+ budget: options.budget,
28201
+ hostCalls: options.hostCalls,
28202
+ moduleId: moduleName,
28203
+ signal: options.signal
28204
+ }),
28205
+ options.signal
28206
+ )
28161
28207
  );
28162
28208
  wrappedModules.set(moduleName, wrappedExports);
28163
28209
  for (const specifier of declaration.specifiers) {
@@ -28177,7 +28223,7 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
28177
28223
  }
28178
28224
  function resolveImportSpecifier(moduleName, specifier, wrappedExports) {
28179
28225
  if (specifier.type === "ImportNamespaceSpecifier") {
28180
- return createBindingRecord(wrappedExports);
28226
+ return wrappedExports;
28181
28227
  }
28182
28228
  const exportName = specifier.type === "ImportDefaultSpecifier" ? "default" : specifier.imported.name;
28183
28229
  const exportedValue = wrappedExports[exportName];
@@ -28985,4 +29031,4 @@ export {
28985
29031
  FileSnapshotBackend,
28986
29032
  run
28987
29033
  };
28988
- //# sourceMappingURL=chunk-BESE73VB.js.map
29034
+ //# sourceMappingURL=chunk-5BWI6HAZ.js.map