Skip to content

Commit

Permalink
Build Files (#228)
Browse files Browse the repository at this point in the history
Co-authored-by: teammemphis <team@memphis.dev>
  • Loading branch information
github-actions[bot] and teammemphis authored Dec 17, 2023
1 parent 582fbf5 commit c461a3f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
24 changes: 21 additions & 3 deletions lib/memphis.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,13 @@ class Memphis {
}
}
_compileJsonSchema(stationName) {
const ajv = new ajv_1.default();
const ajv = new ajv_1.default({
logger: {
log: () => { },
warn: () => { },
error: console.error,
}
});
let stationSchemaData = this.stationSchemaDataMap.get(stationName);
const schema = stationSchemaData['active_version']['schema_content'];
const schemaObj = JSON.parse(schema);
Expand All @@ -346,13 +352,25 @@ class Memphis {
}
catch (ex) {
try {
const ajv = new ajv_draft_04_1.default();
const ajv = new ajv_draft_04_1.default({
logger: {
log: () => { },
warn: () => { },
error: console.error,
}
});
validate = ajv.compile(schemaObj);
return validate;
}
catch (ex) {
try {
const ajv = new _2020_1.default();
const ajv = new _2020_1.default({
logger: {
log: () => { },
warn: () => { },
error: console.error,
}
});
validate = ajv.compile(schemaObj);
return validate;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tsconfig.build.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit c461a3f

Please sign in to comment.