poe-code 11.0.7 → 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/dist/index.js +22 -19
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-OPNWSDXC.js → chunk-2GHBBE5J.js} +22 -19
- package/packages/safejs/dist/chunks/{chunk-OPNWSDXC.js.map → chunk-2GHBBE5J.js.map} +2 -2
- package/packages/safejs/dist/chunks/{chunk-M3VDOFN5.js → chunk-APPD5CFI.js} +2 -2
- package/packages/safejs/dist/cli.js +2 -2
- package/packages/safejs/dist/core.js +1 -1
- package/packages/safejs/dist/index.js +2 -2
- package/packages/safejs/dist/interp/globals/object-array.js +3 -3
- package/packages/safejs/dist/interp/interpreter.js +14 -15
- package/packages/safejs/dist/interp/methods/array.js +3 -0
- /package/packages/safejs/dist/chunks/{chunk-M3VDOFN5.js.map → chunk-APPD5CFI.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -142770,12 +142770,12 @@ function createObjectArrayGlobals(options) {
|
|
|
142770
142770
|
}),
|
|
142771
142771
|
values: createSandboxClosure({
|
|
142772
142772
|
sandbox: true,
|
|
142773
|
-
call: ([value]) =>
|
|
142773
|
+
call: ([value]) => allocateProducedSandboxValue(getOwnEnumerableValues(value), options.budget),
|
|
142774
142774
|
name: "values"
|
|
142775
142775
|
}),
|
|
142776
142776
|
entries: createSandboxClosure({
|
|
142777
142777
|
sandbox: true,
|
|
142778
|
-
call: ([value]) =>
|
|
142778
|
+
call: ([value]) => allocateProducedSandboxValue(getOwnEnumerableEntries(value), options.budget),
|
|
142779
142779
|
name: "entries"
|
|
142780
142780
|
}),
|
|
142781
142781
|
hasOwn: createSandboxClosure({
|
|
@@ -142790,7 +142790,10 @@ function createObjectArrayGlobals(options) {
|
|
|
142790
142790
|
}),
|
|
142791
142791
|
fromEntries: createSandboxClosure({
|
|
142792
142792
|
sandbox: true,
|
|
142793
|
-
call: ([value]) =>
|
|
142793
|
+
call: ([value]) => allocateProducedSandboxValue(
|
|
142794
|
+
Object.setPrototypeOf(Reflect.apply(Object.fromEntries, Object, [value]), null),
|
|
142795
|
+
options.budget
|
|
142796
|
+
),
|
|
142794
142797
|
name: "fromEntries"
|
|
142795
142798
|
}),
|
|
142796
142799
|
freeze: createSandboxClosure({
|
|
@@ -143033,6 +143036,9 @@ function getArrayMember(value, property, options) {
|
|
|
143033
143036
|
if (property === "length") {
|
|
143034
143037
|
return value.length;
|
|
143035
143038
|
}
|
|
143039
|
+
if (Object.hasOwn(value, property)) {
|
|
143040
|
+
return value[String(property)];
|
|
143041
|
+
}
|
|
143036
143042
|
if (isArrayMethodName(property)) {
|
|
143037
143043
|
return createSandboxClosure({
|
|
143038
143044
|
sandbox: true,
|
|
@@ -146484,7 +146490,7 @@ async function evaluateMemberCallExpression(node, context) {
|
|
|
146484
146490
|
if (typeof member.object === "number" && isNumberMethodName(member.property)) {
|
|
146485
146491
|
return evaluateNumberMethodCall(node, member.object, member.property, context);
|
|
146486
146492
|
}
|
|
146487
|
-
if (Array.isArray(member.object) && isArrayMethodName(member.property)) {
|
|
146493
|
+
if (Array.isArray(member.object) && isArrayMethodName(member.property) && !Object.hasOwn(member.object, member.property)) {
|
|
146488
146494
|
return evaluateArrayMethodCall(node, member.object, member.property, context);
|
|
146489
146495
|
}
|
|
146490
146496
|
if (isSandboxMap(member.object) && isMapMethodName(member.property)) {
|
|
@@ -146511,7 +146517,7 @@ async function evaluateMemberCallExpression(node, context) {
|
|
|
146511
146517
|
context
|
|
146512
146518
|
);
|
|
146513
146519
|
}
|
|
146514
|
-
if (Array.isArray(member.object)) {
|
|
146520
|
+
if (Array.isArray(member.object) && !Object.hasOwn(member.object, member.property)) {
|
|
146515
146521
|
return evaluatePrimitiveMemberCall(
|
|
146516
146522
|
node,
|
|
146517
146523
|
"Array",
|
|
@@ -146983,7 +146989,7 @@ function getMemberValue(target, property, context) {
|
|
|
146983
146989
|
return Object.hasOwn(target, String(property)) ? target[String(property)] : void 0;
|
|
146984
146990
|
}
|
|
146985
146991
|
function getArrayMemberValue(target, property, context) {
|
|
146986
|
-
if (property === "raw") {
|
|
146992
|
+
if (property === "raw" && taggedTemplateRawArrays.has(target)) {
|
|
146987
146993
|
return taggedTemplateRawArrays.get(target);
|
|
146988
146994
|
}
|
|
146989
146995
|
return getArrayMember(target, property, createArrayMethodOptions(context));
|
|
@@ -147024,23 +147030,20 @@ function getClosureMemberValue(target, property, context) {
|
|
|
147024
147030
|
return getFunctionMember(target, property, createFunctionMethodOptions(context));
|
|
147025
147031
|
}
|
|
147026
147032
|
async function evaluateResolvedCallExpression(node, callee, context, thisValue = void 0) {
|
|
147027
|
-
if (callee === null || callee === void 0) {
|
|
147028
|
-
|
|
147029
|
-
|
|
147030
|
-
|
|
147031
|
-
|
|
147032
|
-
|
|
147033
|
-
};
|
|
147034
|
-
}
|
|
147035
|
-
throw new TypeError("Attempted to call a non-function value.");
|
|
147036
|
-
}
|
|
147037
|
-
if (!isSandboxClosure(callee)) {
|
|
147038
|
-
throw new TypeError("Attempted to call a non-function value.");
|
|
147033
|
+
if ((callee === null || callee === void 0) && node.optional) {
|
|
147034
|
+
return {
|
|
147035
|
+
kind: "normal",
|
|
147036
|
+
hasValue: true,
|
|
147037
|
+
value: void 0
|
|
147038
|
+
};
|
|
147039
147039
|
}
|
|
147040
147040
|
const args = await evaluateCallArguments(node.arguments, context);
|
|
147041
147041
|
if (!args.ok) {
|
|
147042
147042
|
return args.result;
|
|
147043
147043
|
}
|
|
147044
|
+
if (!isSandboxClosure(callee)) {
|
|
147045
|
+
throw new TypeError("Attempted to call a non-function value.");
|
|
147046
|
+
}
|
|
147044
147047
|
return {
|
|
147045
147048
|
kind: "normal",
|
|
147046
147049
|
hasValue: true,
|
|
@@ -155559,7 +155562,7 @@ var init_package2 = __esm({
|
|
|
155559
155562
|
"package.json"() {
|
|
155560
155563
|
package_default2 = {
|
|
155561
155564
|
name: "poe-code",
|
|
155562
|
-
version: "11.0.
|
|
155565
|
+
version: "11.0.9",
|
|
155563
155566
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
155564
155567
|
license: "MIT",
|
|
155565
155568
|
type: "module",
|