@stoplight/json-ref-resolver
Advanced tools
Comparing version 1.5.2 to 1.5.3
{ | ||
"name": "@stoplight/json-ref-resolver", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Recursively resolve JSON pointers and remote authorities.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -55,18 +55,3 @@ "use strict"; | ||
} | ||
let result = yield reader.read(ref, this.ctx); | ||
if (this.parseAuthorityResult) { | ||
try { | ||
const parsed = yield this.parseAuthorityResult({ | ||
authorityResult: result, | ||
result, | ||
targetAuthority: ref, | ||
parentAuthority: this.authority, | ||
parentPath: [], | ||
}); | ||
result = parsed.result; | ||
} | ||
catch (e) { | ||
throw new Error(`Could not parse remote reference response for '${ref.toString()}' - ${String(e)}`); | ||
} | ||
} | ||
const result = yield reader.read(ref, this.ctx); | ||
return new ResolveRunner(result, { | ||
@@ -146,2 +131,25 @@ depth: this.depth + 1, | ||
} | ||
if (this.parseAuthorityResult) { | ||
try { | ||
const parsed = yield this.parseAuthorityResult({ | ||
authorityResult: lookupResult, | ||
result: lookupResult.resolved.result, | ||
targetAuthority: ref, | ||
parentAuthority: this.authority, | ||
parentPath, | ||
}); | ||
lookupResult.resolved.result = parsed.result; | ||
} | ||
catch (e) { | ||
lookupResult.resolved.result = val; | ||
lookupResult.error = { | ||
code: 'PARSE_AUTHORITY', | ||
message: `Error parsing lookup result for '${ref.toString()}': ${String(e)}`, | ||
authority: ref, | ||
authorityStack: this.authorityStack, | ||
pointerStack, | ||
path: parentPath, | ||
}; | ||
} | ||
} | ||
} | ||
@@ -148,0 +156,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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
67931
741
0