@dawans/promptshield
Version:
Secure your LLM stack with enterprise-grade RulePacks for AI safety scanning
46 lines (45 loc) • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationOptionsBuilder = void 0;
class ValidationOptionsBuilder {
constructor() {
this.options = {};
}
static default() {
return {
strict: false,
verbose: false,
skipWarnings: false,
maxErrors: 100,
validateRegex: true,
validateSchema: true,
};
}
strict(value = true) {
this.options.strict = value;
return this;
}
verbose(value = true) {
this.options.verbose = value;
return this;
}
skipWarnings(value = true) {
this.options.skipWarnings = value;
return this;
}
maxErrors(value) {
this.options.maxErrors = value;
return this;
}
format(value) {
this.options.format = value;
return this;
}
build() {
return {
...ValidationOptionsBuilder.default(),
...this.options,
};
}
}
exports.ValidationOptionsBuilder = ValidationOptionsBuilder;