poe-code 11.0.8 → 11.0.9

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.8",
3
+ "version": "11.0.9",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23946,6 +23946,9 @@ function getArrayMember(value, property, options) {
23946
23946
  if (property === "length") {
23947
23947
  return value.length;
23948
23948
  }
23949
+ if (Object.hasOwn(value, property)) {
23950
+ return value[String(property)];
23951
+ }
23949
23952
  if (isArrayMethodName(property)) {
23950
23953
  return createSandboxClosure({
23951
23954
  sandbox: true,
@@ -27336,7 +27339,7 @@ async function evaluateMemberCallExpression(node, context) {
27336
27339
  if (typeof member.object === "number" && isNumberMethodName(member.property)) {
27337
27340
  return evaluateNumberMethodCall(node, member.object, member.property, context);
27338
27341
  }
27339
- if (Array.isArray(member.object) && isArrayMethodName(member.property)) {
27342
+ if (Array.isArray(member.object) && isArrayMethodName(member.property) && !Object.hasOwn(member.object, member.property)) {
27340
27343
  return evaluateArrayMethodCall(node, member.object, member.property, context);
27341
27344
  }
27342
27345
  if (isSandboxMap(member.object) && isMapMethodName(member.property)) {
@@ -27363,7 +27366,7 @@ async function evaluateMemberCallExpression(node, context) {
27363
27366
  context
27364
27367
  );
27365
27368
  }
27366
- if (Array.isArray(member.object)) {
27369
+ if (Array.isArray(member.object) && !Object.hasOwn(member.object, member.property)) {
27367
27370
  return evaluatePrimitiveMemberCall(
27368
27371
  node,
27369
27372
  "Array",
@@ -27835,7 +27838,7 @@ function getMemberValue(target, property, context) {
27835
27838
  return Object.hasOwn(target, String(property)) ? target[String(property)] : void 0;
27836
27839
  }
27837
27840
  function getArrayMemberValue(target, property, context) {
27838
- if (property === "raw") {
27841
+ if (property === "raw" && taggedTemplateRawArrays.has(target)) {
27839
27842
  return taggedTemplateRawArrays.get(target);
27840
27843
  }
27841
27844
  return getArrayMember(target, property, createArrayMethodOptions(context));
@@ -27876,23 +27879,20 @@ function getClosureMemberValue(target, property, context) {
27876
27879
  return getFunctionMember(target, property, createFunctionMethodOptions(context));
27877
27880
  }
27878
27881
  async function evaluateResolvedCallExpression(node, callee, context, thisValue = void 0) {
27879
- if (callee === null || callee === void 0) {
27880
- if (node.optional) {
27881
- return {
27882
- kind: "normal",
27883
- hasValue: true,
27884
- value: void 0
27885
- };
27886
- }
27887
- throw new TypeError("Attempted to call a non-function value.");
27888
- }
27889
- if (!isSandboxClosure(callee)) {
27890
- throw new TypeError("Attempted to call a non-function value.");
27882
+ if ((callee === null || callee === void 0) && node.optional) {
27883
+ return {
27884
+ kind: "normal",
27885
+ hasValue: true,
27886
+ value: void 0
27887
+ };
27891
27888
  }
27892
27889
  const args = await evaluateCallArguments(node.arguments, context);
27893
27890
  if (!args.ok) {
27894
27891
  return args.result;
27895
27892
  }
27893
+ if (!isSandboxClosure(callee)) {
27894
+ throw new TypeError("Attempted to call a non-function value.");
27895
+ }
27896
27896
  return {
27897
27897
  kind: "normal",
27898
27898
  hasValue: true,
@@ -28984,4 +28984,4 @@ export {
28984
28984
  FileSnapshotBackend,
28985
28985
  run
28986
28986
  };
28987
- //# sourceMappingURL=chunk-TVZKHJOO.js.map
28987
+ //# sourceMappingURL=chunk-2GHBBE5J.js.map