surrogate
Version:
Object method hooks made easy
24 lines (18 loc) • 917 B
JavaScript
import {BailProvider as $hVaQ4$BailProvider} from "./surrogate.7156328e.js";
import {RecoverableRule as $93dab2273f477ac3$export$77a30a1c4c68ceb} from "./surrogate.40a6c999.js";
class $b4282eec55975de5$export$f08e3b44b0faa4e6 extends (0, $93dab2273f477ac3$export$77a30a1c4c68ceb) {
shouldRun() {
return Boolean(this.nextOptions.bail);
}
run(node) {
const { options: options } = node.container;
const { using: using, bailWith: bailWith } = this.nextOptions;
const provider = new (0, $hVaQ4$BailProvider)(node, using, bailWith);
const shouldRecover = this.attemptRecovery(provider, options.runOnBail, node.useContext);
shouldRecover ? this.recover(node, {
bail: false
}) : node.controller.bail(provider.bailUsing);
}
}
export {$b4282eec55975de5$export$f08e3b44b0faa4e6 as BailRule};
//# sourceMappingURL=surrogate.5e5a6514.js.map