UNPKG

479 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.ChainCondition = void 0;
4const base_1 = require("../base");
5class ChainCondition {
6 constructor(chain) {
7 this.chain = chain;
8 }
9 async run(_context, _value, meta) {
10 const result = await this.chain.run(meta.req, { dryRun: true });
11 if (!result.isEmpty()) {
12 throw new base_1.ValidationHalt();
13 }
14 }
15}
16exports.ChainCondition = ChainCondition;