Comparing version 4.1.1 to 4.1.2
@@ -78,2 +78,3 @@ /* jshint node: true */ | ||
opts = opts || {}; | ||
var name = attrs.protocol; | ||
@@ -85,6 +86,9 @@ if (!name) { | ||
opts.namespace = attrs.namespace; | ||
} else { | ||
var match = /^(.*)\.[^.]+$/.exec(name); | ||
if (match) { | ||
opts.namespace = match[1]; | ||
} | ||
} | ||
if (opts.namespace && !~name.indexOf('.')) { | ||
name = f('%s.%s', opts.namespace, name); | ||
} | ||
name = types.qualify(name, opts.namespace); | ||
if (attrs.types) { | ||
@@ -986,3 +990,3 @@ attrs.types.forEach(function (obj) { types.createType(obj, opts); }); | ||
type: 'record', | ||
namespace: opts.namespace, | ||
namespace: opts.namespace || '', // Don't leak request namespace. | ||
fields: attrs.request | ||
@@ -989,0 +993,0 @@ }, opts); |
{ | ||
"name": "avsc", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"description": "Avro for JavaScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mtth/avsc", |
Sorry, the diff of this file is too big to display
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
191909
6278