Comparing version 1.2.1 to 1.3.0
{ | ||
"name": "fbp", | ||
"description": "Parser for the .fbp flow definition language", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"scripts": [ | ||
@@ -6,0 +6,0 @@ "lib/fbp.js" |
@@ -1583,3 +1583,24 @@ module.exports = (function() { | ||
parser.getResult = function () { | ||
return {processes:nodes, connections:parser.processEdges(), exports:parser.exports, inports: parser.inports, outports: parser.outports, caseSensitive: options.caseSensitive}; | ||
var result = { | ||
processes: nodes, | ||
connections: parser.processEdges(), | ||
exports: parser.exports, | ||
inports: parser.inports, | ||
outports: parser.outports | ||
}; | ||
var validateSchema = parser.validateSchema; // default | ||
if (typeof(options.validateSchema) !== 'undefined') { validateSchema = options.validateSchema; } // explicit option | ||
if (validateSchema) { | ||
if (typeof(tv4) === 'undefined') { | ||
var tv4 = require("tv4"); | ||
} | ||
var schema = require("../schema/graph.json"); | ||
var validation = tv4.validateMultiple(result, schema); | ||
if (!validation.valid) { | ||
throw new Error("fbp: Did not validate againt graph schema:\n" + JSON.stringify(validation.errors, null, 2)); | ||
} | ||
} | ||
result.caseSensitive = options.caseSensitive; | ||
return result; | ||
} | ||
@@ -1586,0 +1607,0 @@ |
{ | ||
"name": "fbp", | ||
"description": "Parser for the .fbp flow definition language", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"repository": { | ||
@@ -19,3 +19,5 @@ "type": "git", | ||
"grunt-peg": "^2.0.1", | ||
"mocha": "^2.4.4" | ||
"grunt-yaml": "^0.4.2", | ||
"mocha": "^2.4.4", | ||
"tv4": "^1.2.7" | ||
}, | ||
@@ -22,0 +24,0 @@ "keywords": [], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93153
14
1754
11