mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
refactor modes implementation and improve validation handling
refactor `code` and `hybrid` modes for better type safety and configuration flexibility. add `_isProd` helper to standardize environment checks and improve plugin syncing warnings. adjust validation logic for clean JSON schema handling and enhance test coverage for modes.
This commit is contained in:
@@ -26,7 +26,9 @@ export class JsonSchemaField<
|
||||
|
||||
constructor(name: string, config: Partial<JsonSchemaFieldConfig>) {
|
||||
super(name, config);
|
||||
this.validator = new Validator({ ...this.getJsonSchema() });
|
||||
|
||||
// make sure to hand over clean json
|
||||
this.validator = new Validator(JSON.parse(JSON.stringify(this.getJsonSchema())));
|
||||
}
|
||||
|
||||
protected getSchema() {
|
||||
|
||||
Reference in New Issue
Block a user