poe-code 11.0.29 → 11.0.31
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 +28 -7
- package/dist/index.js.map +3 -3
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safejs/dist/chunks/{chunk-DB2DNWCX.js → chunk-5IU6NPGM.js} +2 -2
- package/packages/safejs/dist/chunks/{chunk-HC3QSP5N.js → chunk-NPXVDTLX.js} +28 -7
- package/packages/safejs/dist/chunks/{chunk-HC3QSP5N.js.map → chunk-NPXVDTLX.js.map} +3 -3
- 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/host-call.js +32 -8
- /package/packages/safejs/dist/chunks/{chunk-DB2DNWCX.js.map → chunk-5IU6NPGM.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -137931,17 +137931,38 @@ function stableStringify(value) {
|
|
|
137931
137931
|
return JSON.stringify(normalize2(value, seen));
|
|
137932
137932
|
}
|
|
137933
137933
|
function normalize2(value, seen) {
|
|
137934
|
-
if (value ===
|
|
137934
|
+
if (typeof value === "function") return void 0;
|
|
137935
|
+
if (typeof value === "bigint") throw new TypeError("Do not know how to serialize a BigInt");
|
|
137936
|
+
if (value === void 0) return Object.assign(/* @__PURE__ */ Object.create(null), { $type: "undefined" });
|
|
137935
137937
|
if (typeof value === "number" && !Number.isFinite(value))
|
|
137936
|
-
return { $type: "number", value: String(value) };
|
|
137938
|
+
return Object.assign(/* @__PURE__ */ Object.create(null), { $type: "number", value: String(value) });
|
|
137937
137939
|
if (value === null || typeof value !== "object") return value;
|
|
137938
137940
|
if (seen.has(value)) throw new TypeError("Host call arguments cannot contain cycles.");
|
|
137939
137941
|
seen.add(value);
|
|
137940
137942
|
try {
|
|
137941
|
-
if (Array.isArray(value))
|
|
137942
|
-
|
|
137943
|
-
Object.
|
|
137944
|
-
|
|
137943
|
+
if (Array.isArray(value)) {
|
|
137944
|
+
const normalized2 = new Array(value.length);
|
|
137945
|
+
Object.setPrototypeOf(normalized2, null);
|
|
137946
|
+
for (const [key3, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
|
|
137947
|
+
if (!isArrayIndexKey(key3)) continue;
|
|
137948
|
+
if (!("value" in descriptor)) {
|
|
137949
|
+
throw new TypeError("Host call arguments cannot contain accessor properties.");
|
|
137950
|
+
}
|
|
137951
|
+
defineOwnDataProperty(normalized2, key3, normalize2(descriptor.value, seen));
|
|
137952
|
+
}
|
|
137953
|
+
return normalized2;
|
|
137954
|
+
}
|
|
137955
|
+
const normalized = /* @__PURE__ */ Object.create(null);
|
|
137956
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
137957
|
+
for (const key3 of Object.keys(descriptors).sort()) {
|
|
137958
|
+
const descriptor = descriptors[key3];
|
|
137959
|
+
if (!descriptor.enumerable) continue;
|
|
137960
|
+
if (!("value" in descriptor)) {
|
|
137961
|
+
throw new TypeError("Host call arguments cannot contain accessor properties.");
|
|
137962
|
+
}
|
|
137963
|
+
defineOwnDataProperty(normalized, key3, normalize2(descriptor.value, seen));
|
|
137964
|
+
}
|
|
137965
|
+
return normalized;
|
|
137945
137966
|
} finally {
|
|
137946
137967
|
seen.delete(value);
|
|
137947
137968
|
}
|
|
@@ -155813,7 +155834,7 @@ var init_package2 = __esm({
|
|
|
155813
155834
|
"package.json"() {
|
|
155814
155835
|
package_default2 = {
|
|
155815
155836
|
name: "poe-code",
|
|
155816
|
-
version: "11.0.
|
|
155837
|
+
version: "11.0.31",
|
|
155817
155838
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
155818
155839
|
license: "MIT",
|
|
155819
155840
|
type: "module",
|