poe-code 11.0.15 → 11.0.17
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 +19 -6
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-RMMJ2USI.js → chunk-COHIMIAF.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-CMWFNRW4.js → chunk-D4DDI3HH.js} +18 -5
- package/packages/safejs/dist/chunks/{chunk-CMWFNRW4.js.map → chunk-D4DDI3HH.js.map} +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/methods/array.js +12 -2
- package/packages/safejs/dist/interp/values.js +8 -3
- /package/packages/safejs/dist/chunks/{chunk-RMMJ2USI.js.map → chunk-COHIMIAF.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -140063,7 +140063,10 @@ function measureSandboxData(values, options = {}) {
|
|
|
140063
140063
|
usage += 1;
|
|
140064
140064
|
if (Array.isArray(value)) {
|
|
140065
140065
|
usage += value.length;
|
|
140066
|
-
for (
|
|
140066
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
140067
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, index);
|
|
140068
|
+
if (descriptor !== void 0 && "value" in descriptor) visit(descriptor.value);
|
|
140069
|
+
}
|
|
140067
140070
|
return;
|
|
140068
140071
|
}
|
|
140069
140072
|
if (isSandboxMap(value)) {
|
|
@@ -140097,7 +140100,7 @@ function measureSandboxData(values, options = {}) {
|
|
|
140097
140100
|
usage += value.source.length + value.flags.length;
|
|
140098
140101
|
return;
|
|
140099
140102
|
}
|
|
140100
|
-
const entries = isSandboxArguments(value) ? getSandboxArgumentEntries(value) : Object.entries(value);
|
|
140103
|
+
const entries = isSandboxArguments(value) ? getSandboxArgumentEntries(value) : Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable).map(([key3, descriptor]) => [key3, "value" in descriptor ? descriptor.value : void 0]);
|
|
140101
140104
|
usage += entries.length;
|
|
140102
140105
|
for (const [key3, entry] of entries) {
|
|
140103
140106
|
usage += key3.length;
|
|
@@ -143119,11 +143122,20 @@ async function callArrayMethod(value, methodName, args, options, stack = []) {
|
|
|
143119
143122
|
assertCollectionMutable(value);
|
|
143120
143123
|
}
|
|
143121
143124
|
if (isCallbackArrayMethod(methodName)) {
|
|
143122
|
-
|
|
143125
|
+
let callbackState = activeArrayCallbacks.get(value);
|
|
143126
|
+
if (callbackState === void 0) {
|
|
143127
|
+
callbackState = { depth: 0, leave: enterCollectionCallback(value) };
|
|
143128
|
+
activeArrayCallbacks.set(value, callbackState);
|
|
143129
|
+
}
|
|
143130
|
+
callbackState.depth += 1;
|
|
143123
143131
|
try {
|
|
143124
143132
|
return await callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
143125
143133
|
} finally {
|
|
143126
|
-
|
|
143134
|
+
callbackState.depth -= 1;
|
|
143135
|
+
if (callbackState.depth === 0) {
|
|
143136
|
+
activeArrayCallbacks.delete(value);
|
|
143137
|
+
callbackState.leave();
|
|
143138
|
+
}
|
|
143127
143139
|
}
|
|
143128
143140
|
}
|
|
143129
143141
|
return callArrayMethodUnlocked(value, methodName, args, options, stack);
|
|
@@ -143621,12 +143633,13 @@ function toIntegerOrInfinity(value) {
|
|
|
143621
143633
|
}
|
|
143622
143634
|
return Math.trunc(number);
|
|
143623
143635
|
}
|
|
143624
|
-
var arrayMethodNames;
|
|
143636
|
+
var activeArrayCallbacks, arrayMethodNames;
|
|
143625
143637
|
var init_array = __esm({
|
|
143626
143638
|
"packages/safejs/src/interp/methods/array.ts"() {
|
|
143627
143639
|
"use strict";
|
|
143628
143640
|
init_values();
|
|
143629
143641
|
init_running_state();
|
|
143642
|
+
activeArrayCallbacks = /* @__PURE__ */ new WeakMap();
|
|
143630
143643
|
arrayMethodNames = /* @__PURE__ */ new Set([
|
|
143631
143644
|
"map",
|
|
143632
143645
|
"filter",
|
|
@@ -155629,7 +155642,7 @@ var init_package2 = __esm({
|
|
|
155629
155642
|
"package.json"() {
|
|
155630
155643
|
package_default2 = {
|
|
155631
155644
|
name: "poe-code",
|
|
155632
|
-
version: "11.0.
|
|
155645
|
+
version: "11.0.17",
|
|
155633
155646
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
155634
155647
|
license: "MIT",
|
|
155635
155648
|
type: "module",
|