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/dist/index.js CHANGED
@@ -142791,10 +142791,22 @@ function createObjectArrayGlobals(options) {
142791
142791
  }),
142792
142792
  fromEntries: createSandboxClosure({
142793
142793
  sandbox: true,
142794
- call: ([value]) => allocateProducedSandboxValue(
142795
- Object.setPrototypeOf(Reflect.apply(Object.fromEntries, Object, [value]), null),
142796
- options.budget
142797
- ),
142794
+ call: ([value]) => {
142795
+ const iterator = getSandboxIterator(value);
142796
+ if (iterator === void 0) {
142797
+ throw new TypeError("Object.fromEntries requires an iterable.");
142798
+ }
142799
+ if (!iterator.generator) {
142800
+ return allocateProducedSandboxValue(
142801
+ Object.setPrototypeOf(
142802
+ Reflect.apply(Object.fromEntries, Object, [{ [Symbol.iterator]: () => iterator }]),
142803
+ null
142804
+ ),
142805
+ options.budget
142806
+ );
142807
+ }
142808
+ return objectFromSandboxEntries(iterator, options.budget);
142809
+ },
142798
142810
  name: "fromEntries"
142799
142811
  }),
142800
142812
  freeze: createSandboxClosure({
@@ -142915,6 +142927,38 @@ function createObjectArrayGlobals(options) {
142915
142927
  })
142916
142928
  };
142917
142929
  }
142930
+ async function objectFromSandboxEntries(iterator, budget) {
142931
+ const object = /* @__PURE__ */ Object.create(null);
142932
+ try {
142933
+ while (true) {
142934
+ const result = await iterator.next();
142935
+ if (typeof result !== "object" && typeof result !== "function" || result === null) {
142936
+ throw new TypeError("Iterator result must be an object.");
142937
+ }
142938
+ if (result.done) break;
142939
+ const entry = result.value;
142940
+ if (typeof entry !== "object" && typeof entry !== "function" || entry === null) {
142941
+ throw new TypeError("Object.fromEntries requires entry objects.");
142942
+ }
142943
+ const key3 = entry[0];
142944
+ const value = entry[1];
142945
+ Object.defineProperty(object, key3, {
142946
+ configurable: true,
142947
+ enumerable: true,
142948
+ value,
142949
+ writable: true
142950
+ });
142951
+ }
142952
+ } catch (error3) {
142953
+ try {
142954
+ await iterator.return?.();
142955
+ } catch {
142956
+ throw error3;
142957
+ }
142958
+ throw error3;
142959
+ }
142960
+ return allocateProducedSandboxValue(object, budget);
142961
+ }
142918
142962
  function assignSandboxValues(target, sources) {
142919
142963
  if (target === null || target === void 0) {
142920
142964
  throw new TypeError("Object.assign(target, ...sources) requires a non-null target.");
@@ -147383,14 +147427,16 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
147383
147427
  declaration.source.span
147384
147428
  );
147385
147429
  }
147386
- const wrappedExports = wrappedModules.get(moduleName) ?? wrapCancelableBindings(
147387
- wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
147388
- budget: options.budget,
147389
- hostCalls: options.hostCalls,
147390
- moduleId: moduleName,
147391
- signal: options.signal
147392
- }),
147393
- options.signal
147430
+ const wrappedExports = wrappedModules.get(moduleName) ?? createBindingRecord(
147431
+ wrapCancelableBindings(
147432
+ wrapCallerInjectedBindings(Object.fromEntries(moduleExports), {
147433
+ budget: options.budget,
147434
+ hostCalls: options.hostCalls,
147435
+ moduleId: moduleName,
147436
+ signal: options.signal
147437
+ }),
147438
+ options.signal
147439
+ )
147394
147440
  );
147395
147441
  wrappedModules.set(moduleName, wrappedExports);
147396
147442
  for (const specifier of declaration.specifiers) {
@@ -147410,7 +147456,7 @@ function bindImportDeclaration(declaration, registry, wrappedModules, bindings,
147410
147456
  }
147411
147457
  function resolveImportSpecifier(moduleName, specifier, wrappedExports) {
147412
147458
  if (specifier.type === "ImportNamespaceSpecifier") {
147413
- return createBindingRecord(wrappedExports);
147459
+ return wrappedExports;
147414
147460
  }
147415
147461
  const exportName = specifier.type === "ImportDefaultSpecifier" ? "default" : specifier.imported.name;
147416
147462
  const exportedValue = wrappedExports[exportName];
@@ -155563,7 +155609,7 @@ var init_package2 = __esm({
155563
155609
  "package.json"() {
155564
155610
  package_default2 = {
155565
155611
  name: "poe-code",
155566
- version: "11.0.10",
155612
+ version: "11.0.12",
155567
155613
  description: "CLI tool to configure Poe API for developer workflows.",
155568
155614
  license: "MIT",
155569
155615
  type: "module",