Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
index_1.defaultTheme.widgetFactory.add(key, widget);
}
}
for (var key in templates_1.default) {
if (templates_1.default.hasOwnProperty(key)) {
var template = templates_1.default[key];
index_1.defaultTheme.tempFactory.add(key, template);
}
}
for (var key in templates_2.default) {
if (templates_2.default.hasOwnProperty(key)) {
var template = templates_2.default[key];
index_1.defaultTheme.tempFactory.add(key, template);
}
}
var curAjv = new ajv_1.default({
allErrors: true,
removeAdditional: false,
jsonPointers: true,
extendRefs: true,
inlineRefs: true,
format: "full",
multipleOfPrecision: 12,
transpile: "nodent",
loopRequired: Infinity,
sourceCode: true,
coerceTypes: true,
missingRefs: true,
// inlineRefs: false,
// v5: true,
async: "es7",
useDefaults: true,
(response) => {
if(response.status === 200) {
var ajv = Ajv.default();
var compare = ajv.compile(response.data);
var valid = compare(data);
valid &= ctx.uniqueName(data);
if (valid) {
resolve({valid: true, errors: []});
} else {
reject({valid: false, errors: compare.errors});
}
} else {
reject({valid: false, errors: [{
"message":response.status,
"dataPath": "http"
}]});
}