@poe-platform/safe-js 0.1.238 → 0.1.240
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/safe-js/chunks/{chunk-74HTYPJQ.js → chunk-IIEGYHM4.js} +21 -15
- package/dist/safe-js/chunks/{chunk-74HTYPJQ.js.map → chunk-IIEGYHM4.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-QTSCRXUU.js → chunk-JD5SV5DJ.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-QTSCRXUU.js.map → chunk-JD5SV5DJ.js.map} +0 -0
|
@@ -16545,20 +16545,24 @@ async function evaluateWhileStatement(node, context) {
|
|
|
16545
16545
|
}
|
|
16546
16546
|
}
|
|
16547
16547
|
async function evaluateDoWhileStatement(node, context) {
|
|
16548
|
+
let resumeTest = context.generatorResume !== void 0 && context.generatorResume.completed !== true && containsResumeTarget(node.test, /* @__PURE__ */ new Set([context.generatorResume.yieldNodeId]));
|
|
16548
16549
|
while (true) {
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
|
|
16560
|
-
|
|
16550
|
+
if (!resumeTest) {
|
|
16551
|
+
const iterationContext = createLoopIterationContext(context, context.scope);
|
|
16552
|
+
emitLoopIterationBreakpoint(node, iterationContext);
|
|
16553
|
+
const result = await evaluateNode(node.body, iterationContext);
|
|
16554
|
+
if (isMatchingBreak(result, loopLabels(node))) {
|
|
16555
|
+
return {
|
|
16556
|
+
kind: "normal",
|
|
16557
|
+
hasValue: false,
|
|
16558
|
+
value: void 0
|
|
16559
|
+
};
|
|
16560
|
+
}
|
|
16561
|
+
if (result.kind !== "normal" && !isMatchingContinue(result, loopLabels(node))) {
|
|
16562
|
+
return result;
|
|
16563
|
+
}
|
|
16561
16564
|
}
|
|
16565
|
+
resumeTest = false;
|
|
16562
16566
|
const test = await evaluateNode(node.test, context);
|
|
16563
16567
|
if (test.kind !== "normal") {
|
|
16564
16568
|
return test;
|
|
@@ -16681,16 +16685,17 @@ async function evaluateYieldExpression(node, context) {
|
|
|
16681
16685
|
if (context.generatorYield === void 0) {
|
|
16682
16686
|
throw new TypeError("yield is only valid inside a generator.");
|
|
16683
16687
|
}
|
|
16684
|
-
if (context.generatorResume !== void 0 && node.nodeId !== context.generatorResume.yieldNodeId) {
|
|
16688
|
+
if (context.generatorResume !== void 0 && node.nodeId !== context.generatorResume.yieldNodeId && (node.argument === void 0 || !containsResumeTarget(node.argument, /* @__PURE__ */ new Set([context.generatorResume.yieldNodeId])))) {
|
|
16685
16689
|
return { kind: "normal", hasValue: true, value: void 0 };
|
|
16686
16690
|
}
|
|
16687
16691
|
if (node.delegate) {
|
|
16688
16692
|
return evaluateYieldDelegate(node, context);
|
|
16689
16693
|
}
|
|
16690
|
-
const argument = context.generatorResume !== void 0 || node.argument === void 0 ? { kind: "normal", hasValue: true, value: void 0 } : await evaluateNode(node.argument, context);
|
|
16694
|
+
const argument = context.generatorResume !== void 0 && node.nodeId === context.generatorResume.yieldNodeId || node.argument === void 0 ? { kind: "normal", hasValue: true, value: void 0 } : await evaluateNode(node.argument, context);
|
|
16691
16695
|
if (argument.kind !== "normal") {
|
|
16692
16696
|
return argument;
|
|
16693
16697
|
}
|
|
16698
|
+
if (context.generatorResume?.completed === true) context.generatorResume = void 0;
|
|
16694
16699
|
const completion = await yieldGeneratorValue(argument.value, node, context);
|
|
16695
16700
|
if (context.generatorResume !== void 0) context.generatorResume.completed = true;
|
|
16696
16701
|
context.generatorResume = void 0;
|
|
@@ -16722,6 +16727,7 @@ async function evaluateYieldDelegate(node, context) {
|
|
|
16722
16727
|
if (argument.kind !== "normal") {
|
|
16723
16728
|
return argument;
|
|
16724
16729
|
}
|
|
16730
|
+
if (context.generatorResume?.completed === true) context.generatorResume = void 0;
|
|
16725
16731
|
const iterator = saved === void 0 ? await acquireSandboxIterator(
|
|
16726
16732
|
argument.value,
|
|
16727
16733
|
context.budget,
|
|
@@ -39286,4 +39292,4 @@ export {
|
|
|
39286
39292
|
FileSnapshotBackend,
|
|
39287
39293
|
run
|
|
39288
39294
|
};
|
|
39289
|
-
//# sourceMappingURL=chunk-
|
|
39295
|
+
//# sourceMappingURL=chunk-IIEGYHM4.js.map
|