num-client
Advanced tools
Comparing version 2.0.6 to 2.0.7
@@ -19,2 +19,3 @@ import { Context, NumLocation, UserVariable } from './context'; | ||
setTimeoutMillis(t: number): void; | ||
disableSchemaValidation(): void; | ||
} | ||
@@ -21,0 +22,0 @@ export interface CallbackHandler { |
@@ -104,2 +104,3 @@ "use strict"; | ||
function NumClientImpl(resolvers) { | ||
this.schemaValidationIsDisabled = false; | ||
this.dnsServices = | ||
@@ -111,2 +112,5 @@ resolvers && resolvers.length > 0 ? dnsservices_1.createDnsServices(DNS_REQUEST_TIMEOUT_MS, resolvers) : dnsservices_1.createDnsServices(DNS_REQUEST_TIMEOUT_MS, DEFAULT_RESOLVERS); | ||
} | ||
NumClientImpl.prototype.disableSchemaValidation = function () { | ||
this.schemaValidationIsDisabled = true; | ||
}; | ||
NumClientImpl.prototype.setResourceLoader = function (loader) { | ||
@@ -330,3 +334,3 @@ this.resourceLoader = loader; | ||
compactVersion = jsonResult['@v'] ? "" + jsonResult['@v'] : '1'; | ||
if (!moduleConfig.compactSchema) return [3, 3]; | ||
if (!(moduleConfig.compactSchema && !this.schemaValidationIsDisabled)) return [3, 3]; | ||
return [4, this.validateSchema(moduleNumber.n, compactSchemaPathComponent, compactVersion, jsonResult)]; | ||
@@ -365,3 +369,3 @@ case 2: | ||
} | ||
if (!moduleConfig.expandedSchema) return [3, 10]; | ||
if (!(moduleConfig.expandedSchema && !this.schemaValidationIsDisabled)) return [3, 10]; | ||
if (!jsonResult['@version']) { | ||
@@ -368,0 +372,0 @@ throw new exceptions_1.NumProtocolException(exceptions_1.NumProtocolErrorCode.missingExpandedSchemaVersion, JSON.stringify(jsonResult)); |
{ | ||
"name": "num-client", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "A NUM Protocol Client in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
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
527147
3101