poe-code 12.0.9 → 12.0.11
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/README.md +7 -0
- package/dist/index.js +14 -2
- package/dist/index.js.map +2 -2
- package/dist/metafile.json +1 -1
- package/package.json +1 -1
- package/packages/safe-js/dist/chunks/{chunk-4D75HUZZ.js → chunk-DALBPQDZ.js} +14 -2
- package/packages/safe-js/dist/chunks/{chunk-4D75HUZZ.js.map → chunk-DALBPQDZ.js.map} +2 -2
- package/packages/safe-js/dist/chunks/{chunk-ETVJF5BE.js → chunk-HCODJUGF.js} +2 -2
- package/packages/safe-js/dist/cli.js +2 -2
- package/packages/safe-js/dist/core.js +1 -1
- package/packages/safe-js/dist/index.js +2 -2
- package/packages/safe-js/dist/interp/exceptions.js +3 -0
- package/packages/safe-js/dist/interp/host-bridge.js +3 -0
- package/packages/safe-js/dist/interp/host-call.d.ts +2 -0
- package/packages/safe-js/dist/interp/host-call.js +7 -0
- package/packages/safe-js/dist/interp/values.js +1 -1
- /package/packages/safe-js/dist/chunks/{chunk-ETVJF5BE.js.map → chunk-HCODJUGF.js.map} +0 -0
package/package.json
CHANGED
|
@@ -18291,6 +18291,9 @@ function isCapturedException(value) {
|
|
|
18291
18291
|
return typeof value === "object" && value !== null && capturedExceptionBrand in value;
|
|
18292
18292
|
}
|
|
18293
18293
|
function coerceThrownValue(reason, budget, stackFrames, span, sandbox = false) {
|
|
18294
|
+
if (reason instanceof HostCallResumabilityError) {
|
|
18295
|
+
throw reason;
|
|
18296
|
+
}
|
|
18294
18297
|
if (isSubsetErrorValue(reason)) {
|
|
18295
18298
|
attachErrorSpan(reason, readErrorSpan(reason) ?? span);
|
|
18296
18299
|
return reason;
|
|
@@ -20191,7 +20194,9 @@ function copyToSandbox(value, state, path = "<root>", cloneSandboxCollections =
|
|
|
20191
20194
|
if (existing !== void 0) {
|
|
20192
20195
|
return existing;
|
|
20193
20196
|
}
|
|
20194
|
-
const copy = createPlainObject(
|
|
20197
|
+
const copy = createPlainObject(
|
|
20198
|
+
!cloneSandboxCollections || Object.getPrototypeOf(value) === null
|
|
20199
|
+
);
|
|
20195
20200
|
state.seen.set(value, copy);
|
|
20196
20201
|
const errorType = sandboxErrorTypes.get(value);
|
|
20197
20202
|
if (errorType !== void 0) sandboxErrorTypes.set(copy, errorType);
|
|
@@ -20779,9 +20784,13 @@ function own(value, key) {
|
|
|
20779
20784
|
|
|
20780
20785
|
// packages/safe-js/src/interp/host-call.ts
|
|
20781
20786
|
var HostCallResumabilityError = class extends Error {
|
|
20787
|
+
#nativeInstance = true;
|
|
20782
20788
|
action;
|
|
20783
20789
|
callId;
|
|
20784
20790
|
lifecycle;
|
|
20791
|
+
static [Symbol.hasInstance](value) {
|
|
20792
|
+
return typeof value === "object" && value !== null && #nativeInstance in value && Function.prototype[Symbol.hasInstance].call(this, value);
|
|
20793
|
+
}
|
|
20785
20794
|
constructor(record2, action, message) {
|
|
20786
20795
|
super(message);
|
|
20787
20796
|
this.name = "HostCallResumabilityError";
|
|
@@ -22516,6 +22525,9 @@ function executeHostCall(record2, restored, invoke, stackFrames, options, span,
|
|
|
22516
22525
|
try {
|
|
22517
22526
|
result = invoke();
|
|
22518
22527
|
} catch (error) {
|
|
22528
|
+
if (error instanceof HostCallResumabilityError) {
|
|
22529
|
+
throw error;
|
|
22530
|
+
}
|
|
22519
22531
|
const reason = createHostErrorValue(error, stackFrames, options.budget, span);
|
|
22520
22532
|
hostCalls.settle(record2, { status: "rejected", reason });
|
|
22521
22533
|
throw error;
|
|
@@ -29751,4 +29763,4 @@ export {
|
|
|
29751
29763
|
FileSnapshotBackend,
|
|
29752
29764
|
run
|
|
29753
29765
|
};
|
|
29754
|
-
//# sourceMappingURL=chunk-
|
|
29766
|
+
//# sourceMappingURL=chunk-DALBPQDZ.js.map
|