@stoplight/spectral-core
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -9,3 +9,2 @@ "use strict"; | ||
const json_1 = require("@stoplight/json"); | ||
const isAggregateError_1 = require("../guards/isAggregateError"); | ||
class Runner { | ||
@@ -85,26 +84,16 @@ constructor(runtime, inventory) { | ||
} | ||
try { | ||
const nimma = new legacy_1.default(jsonPathExpressions, { | ||
fallback: fallbacks_1.jsonPathPlus, | ||
unsafe: false, | ||
output: 'auto', | ||
}); | ||
nimma.query(input, Object.entries(callbacks).reduce((mapped, [key, cbs]) => { | ||
mapped[key] = scope => { | ||
for (const cb of cbs) { | ||
cb(scope); | ||
} | ||
}; | ||
return mapped; | ||
}, {})); | ||
} | ||
catch (e) { | ||
if ((0, isAggregateError_1.isAggregateError)(e) && e.errors.length === 1) { | ||
throw e.errors[0]; | ||
} | ||
else { | ||
throw e; | ||
} | ||
} | ||
const nimma = new legacy_1.default(jsonPathExpressions, { | ||
fallback: fallbacks_1.jsonPathPlus, | ||
unsafe: false, | ||
output: 'auto', | ||
}); | ||
nimma.query(input, Object.entries(callbacks).reduce((mapped, [key, cbs]) => { | ||
mapped[key] = scope => { | ||
for (const cb of cbs) { | ||
cb(scope); | ||
} | ||
}; | ||
return mapped; | ||
}, {})); | ||
} | ||
//# sourceMappingURL=runner.js.map |
{ | ||
"name": "@stoplight/spectral-core", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"main": "dist/index.js", | ||
@@ -26,3 +26,3 @@ "types": "dist/index.d.ts", | ||
"@stoplight/better-ajv-errors": "1.0.1", | ||
"@stoplight/json": "3.17.0", | ||
"@stoplight/json": "~3.17.1", | ||
"@stoplight/lifecycle": "2.3.2", | ||
@@ -34,7 +34,7 @@ "@stoplight/path": "1.3.2", | ||
"@stoplight/types": "12.3.0", | ||
"ajv": "~8.6.0", | ||
"ajv": "^8.6.0", | ||
"ajv-errors": "~3.0.0", | ||
"ajv-formats": "~2.1.0", | ||
"blueimp-md5": "2.18.0", | ||
"json-schema": "0.3.0", | ||
"json-schema": "0.4.0", | ||
"jsonpath-plus": "6.0.1", | ||
@@ -44,3 +44,3 @@ "lodash": "~4.17.21", | ||
"minimatch": "3.0.4", | ||
"nimma": "0.1.6", | ||
"nimma": "0.1.7", | ||
"simple-eval": "1.0.0", | ||
@@ -47,0 +47,0 @@ "tslib": "^2.3.0" |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
164473
2497
+ Added@stoplight/json@3.17.2(transitive)
+ Addedajv@8.17.1(transitive)
+ Addedfast-uri@3.0.3(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addednimma@0.1.7(transitive)
- Removed@stoplight/json@3.17.0(transitive)
- Removedajv@8.6.3(transitive)
- Removedjson-schema@0.3.0(transitive)
- Removednimma@0.1.6(transitive)
- Removedpunycode@2.3.1(transitive)
- Removeduri-js@4.4.1(transitive)
Updated@stoplight/json@~3.17.1
Updatedajv@^8.6.0
Updatedjson-schema@0.4.0
Updatednimma@0.1.7