Comparing version 1.9.0 to 1.10.0
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var TXNDESCRIPTOR_HEADER_DATA_LEN, TXNDESCRIPTOR_HEADER_LEN, TYPE, WritableTrackingBuffer; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
if (!Buffer.concat) { | ||
@@ -3,0 +3,0 @@ Buffer.concat = function(buffers) { |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var BulkLoad, DONE_STATUS, EventEmitter, FLAGS, TOKEN_TYPE, WritableTrackingBuffer, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -43,6 +43,6 @@ EventEmitter = require('events').EventEmitter; | ||
function BulkLoad(table, options, callback) { | ||
this.table = table; | ||
this.options = options; | ||
this.callback = callback; | ||
function BulkLoad(_at_table, _at_options, _at_callback) { | ||
this.table = _at_table; | ||
this.options = _at_options; | ||
this.callback = _at_callback; | ||
this.columns = []; | ||
@@ -49,0 +49,0 @@ this.columnsByName = {}; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
exports.codepageByLcid = { | ||
@@ -3,0 +3,0 @@ 0x436: 'CP1252', |
@@ -1,6 +0,6 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var BulkLoad, Connection, ConnectionError, DEFAULT_CANCEL_TIMEOUT, DEFAULT_CLIENT_REQUEST_TIMEOUT, DEFAULT_CONNECT_TIMEOUT, DEFAULT_PACKET_SIZE, DEFAULT_PORT, DEFAULT_TDS_VERSION, DEFAULT_TEXTSIZE, Debug, EventEmitter, ISOLATION_LEVEL, KEEP_ALIVE_INITIAL_DELAY, Login7Payload, MessageIO, NTLMResponsePayload, PreloginPayload, Request, RequestError, RpcRequestPayload, Socket, SqlBatchPayload, TYPE, TokenStreamParser, Transaction, crypto, instanceLookup, tls, _ref, | ||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__slice = [].slice; | ||
@@ -332,4 +332,4 @@ | ||
function Connection(config) { | ||
this.config = config; | ||
function Connection(_at_config) { | ||
this.config = _at_config; | ||
this.reset = __bind(this.reset, this); | ||
@@ -359,4 +359,4 @@ this.socketClose = __bind(this.socketClose, this); | ||
Connection.prototype.cleanupConnection = function(redirect) { | ||
this.redirect = redirect; | ||
Connection.prototype.cleanupConnection = function(_at_redirect) { | ||
this.redirect = _at_redirect; | ||
if (!this.closed) { | ||
@@ -446,3 +446,9 @@ this.clearConnectTimer(); | ||
if (_this.request) { | ||
return _this.request.error = RequestError(token.message, 'EREQUEST'); | ||
_this.request.error = RequestError(token.message, 'EREQUEST'); | ||
_this.request.error.number = token.number; | ||
_this.request.error.state = token.state; | ||
_this.request.error["class"] = token["class"]; | ||
_this.request.error.serverName = token.serverName; | ||
_this.request.error.procName = token.procName; | ||
return _this.request.error.lineNumber = token.lineNumber; | ||
} | ||
@@ -511,3 +517,4 @@ } else { | ||
_this.transactionDescriptors.length = 1; | ||
return _this.inTransaction = false; | ||
_this.inTransaction = false; | ||
return _this.emit('rollbackTransaction'); | ||
}; | ||
@@ -755,8 +762,10 @@ })(this)); | ||
var message; | ||
message = "Failed to connect to " + this.config.server + ":" + this.config.options.port + " - " + error.message; | ||
this.debug.log(message); | ||
if (this.state === this.STATE.CONNECTING) { | ||
message = "Failed to connect to " + this.config.server + ":" + this.config.options.port + " - " + error.message; | ||
this.debug.log(message); | ||
this.emit('connect', ConnectionError(message, 'ESOCKET')); | ||
} else { | ||
this.emit('error', ConnectionError(message)); | ||
message = "Connection lost - " + error.message; | ||
this.debug.log(message); | ||
this.emit('error', ConnectionError(message, 'ESOCKET')); | ||
} | ||
@@ -808,3 +817,3 @@ return this.dispatchEvent('socketError', error); | ||
Connection.prototype.processPreLoginResponse = function() { | ||
var preloginPayload; | ||
var preloginPayload, _ref1; | ||
preloginPayload = new PreloginPayload(this.messageBuffer); | ||
@@ -814,3 +823,3 @@ this.debug.payload(function() { | ||
}); | ||
if (preloginPayload.encryptionString === 'ON') { | ||
if ((_ref1 = preloginPayload.encryptionString) === 'ON' || _ref1 === 'REQ') { | ||
return this.dispatchEvent('tls'); | ||
@@ -865,3 +874,3 @@ } else { | ||
var credentials; | ||
credentials = crypto.createCredentials(this.config.options.cryptoCredentialsDetails); | ||
credentials = tls.createSecureContext ? tls.createSecureContext(this.config.options.cryptoCredentialsDetails) : crypto.createCredentials(this.config.options.cryptoCredentialsDetails); | ||
this.securePair = tls.createSecurePair(credentials); | ||
@@ -952,2 +961,10 @@ this.securePair.on('secure', (function(_this) { | ||
request.transformIntoExecuteSqlRpc(); | ||
if (request.error != null) { | ||
return process.nextTick((function(_this) { | ||
return function() { | ||
_this.debug.log(request.error.message); | ||
return request.callback(request.error); | ||
}; | ||
})(this)); | ||
} | ||
return this.makeRequest(request, TYPE.RPC_REQUEST, new RpcRequestPayload(request, this.currentTransactionDescriptor(), this.config.options)); | ||
@@ -990,2 +1007,10 @@ }; | ||
request.transformIntoExecuteRpc(parameters); | ||
if (request.error != null) { | ||
return process.nextTick((function(_this) { | ||
return function() { | ||
_this.debug.log(request.error.message); | ||
return request.callback(request.error); | ||
}; | ||
})(this)); | ||
} | ||
return this.makeRequest(request, TYPE.RPC_REQUEST, new RpcRequestPayload(request, this.currentTransactionDescriptor(), this.config.options)); | ||
@@ -995,2 +1020,11 @@ }; | ||
Connection.prototype.callProcedure = function(request) { | ||
request.validateParameters(); | ||
if (request.error != null) { | ||
return process.nextTick((function(_this) { | ||
return function() { | ||
_this.debug.log(request.error.message); | ||
return request.callback(request.error); | ||
}; | ||
})(this)); | ||
} | ||
return this.makeRequest(request, TYPE.RPC_REQUEST, new RpcRequestPayload(request, this.currentTransactionDescriptor(), this.config.options)); | ||
@@ -997,0 +1031,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
var EPOCH_DATE, MAX, NULL, TYPE, UTC_EPOCH_DATE, YEAR_ONE, alias, guidParser, id, type, typeByName, _i, _len, _ref; | ||
// Generated by CoffeeScript 1.9.0 | ||
var EPOCH_DATE, MAX, NULL, TYPE, UTC_EPOCH_DATE, UTC_YEAR_ONE, YEAR_ONE, alias, guidParser, id, type, typeByName, _i, _len, _ref; | ||
@@ -12,4 +12,6 @@ guidParser = require('./guid-parser'); | ||
YEAR_ONE = Date.UTC(2000, 0, -730118); | ||
YEAR_ONE = new Date(2000, 0, -730118).getTime(); | ||
UTC_YEAR_ONE = Date.UTC(2000, 0, -730118); | ||
MAX = (1 << 16) - 1; | ||
@@ -39,2 +41,15 @@ | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseInt(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
if (value < 0 || value > 255) { | ||
return new TypeError("Value must be between 0 and 255."); | ||
} | ||
return value; | ||
} | ||
@@ -59,2 +74,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
@@ -79,2 +104,15 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseInt(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
if (value < -32768 || value > 32767) { | ||
return new TypeError("Value must be between -32768 and 32767."); | ||
} | ||
return value; | ||
} | ||
@@ -99,2 +137,15 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseInt(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
if (value < -2147483648 || value > 2147483647) { | ||
return new TypeError("Value must be between -2147483648 and 2147483647."); | ||
} | ||
return value; | ||
} | ||
@@ -128,2 +179,15 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid date."); | ||
} | ||
return value; | ||
} | ||
@@ -148,2 +212,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
return value; | ||
} | ||
@@ -168,2 +242,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
return value; | ||
} | ||
@@ -205,2 +289,15 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid date."); | ||
} | ||
return value; | ||
} | ||
@@ -225,2 +322,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
return value; | ||
} | ||
@@ -294,2 +401,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
return value; | ||
} | ||
@@ -363,2 +480,12 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
return value; | ||
} | ||
@@ -383,2 +510,15 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
value = parseFloat(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid number."); | ||
} | ||
if (value < -214748.3648 || value > 214748.3647) { | ||
return new TypeError("Value must be between -214748.3648 and 214748.3647."); | ||
} | ||
return value; | ||
} | ||
@@ -405,2 +545,8 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
return value; | ||
} | ||
@@ -435,2 +581,11 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (!Buffer.isBuffer(value)) { | ||
return new TypeError("Invalid buffer."); | ||
} | ||
return value; | ||
} | ||
@@ -467,2 +622,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -492,2 +659,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -596,2 +775,11 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (!Buffer.isBuffer(value)) { | ||
return new TypeError("Invalid buffer."); | ||
} | ||
return value; | ||
} | ||
@@ -659,2 +847,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -688,2 +888,11 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (!Buffer.isBuffer(value)) { | ||
return new TypeError("Invalid buffer."); | ||
} | ||
return value; | ||
} | ||
@@ -738,2 +947,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -801,2 +1022,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -851,2 +1084,14 @@ }, | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'string') { | ||
if (typeof value.toString !== 'function') { | ||
return TypeError("Invalid string."); | ||
} | ||
value = value.toString(); | ||
} | ||
return value; | ||
} | ||
@@ -896,9 +1141,12 @@ }, | ||
}, | ||
writeParameterData: function(buffer, parameter) { | ||
writeParameterData: function(buffer, parameter, options) { | ||
var time, _ref; | ||
if (parameter.value != null) { | ||
parameter.value.setUTCFullYear(1970); | ||
parameter.value.setUTCMonth(0); | ||
parameter.value.setUTCDate(1); | ||
time = (+parameter.value / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
time = new Date(+parameter.value); | ||
if (options.useUTC) { | ||
time = ((time.getUTCHours() * 60 + time.getUTCMinutes()) * 60 + time.getUTCSeconds()) * 1000 + time.getUTCMilliseconds(); | ||
} else { | ||
time = ((time.getHours() * 60 + time.getMinutes()) * 60 + time.getSeconds()) * 1000 + time.getMilliseconds(); | ||
} | ||
time = (time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
switch (parameter.scale) { | ||
@@ -923,2 +1171,15 @@ case 0: | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid time."); | ||
} | ||
return value; | ||
} | ||
@@ -937,9 +1198,26 @@ }, | ||
}, | ||
writeParameterData: function(buffer, parameter) { | ||
writeParameterData: function(buffer, parameter, options) { | ||
if (parameter.value != null) { | ||
buffer.writeUInt8(3); | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - YEAR_ONE) / 86400000)); | ||
if (options.useUTC) { | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - UTC_YEAR_ONE) / 86400000)); | ||
} else { | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - YEAR_ONE) / 86400000)); | ||
} | ||
} else { | ||
return buffer.writeUInt8(0); | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid date."); | ||
} | ||
return value; | ||
} | ||
@@ -984,10 +1262,12 @@ }, | ||
}, | ||
writeParameterData: function(buffer, parameter) { | ||
writeParameterData: function(buffer, parameter, options) { | ||
var time, _ref; | ||
if (parameter.value != null) { | ||
time = new Date(+parameter.value); | ||
time.setUTCFullYear(1970); | ||
time.setUTCMonth(0); | ||
time.setUTCDate(1); | ||
time = (+time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
if (options.useUTC) { | ||
time = ((time.getUTCHours() * 60 + time.getUTCMinutes()) * 60 + time.getUTCSeconds()) * 1000 + time.getUTCMilliseconds(); | ||
} else { | ||
time = ((time.getHours() * 60 + time.getMinutes()) * 60 + time.getSeconds()) * 1000 + time.getMilliseconds(); | ||
} | ||
time = (time / 1000 + ((_ref = parameter.value.nanosecondDelta) != null ? _ref : 0)) * Math.pow(10, parameter.scale); | ||
switch (parameter.scale) { | ||
@@ -1011,6 +1291,23 @@ case 0: | ||
} | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - YEAR_ONE) / 86400000)); | ||
if (options.useUTC) { | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - UTC_YEAR_ONE) / 86400000)); | ||
} else { | ||
return buffer.writeUInt24LE(Math.floor((+parameter.value - YEAR_ONE) / 86400000)); | ||
} | ||
} else { | ||
return buffer.writeUInt8(0); | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid date."); | ||
} | ||
return value; | ||
} | ||
@@ -1082,3 +1379,3 @@ }, | ||
} | ||
buffer.writeUInt24LE(Math.floor((+parameter.value - YEAR_ONE) / 86400000)); | ||
buffer.writeUInt24LE(Math.floor((+parameter.value - UTC_YEAR_ONE) / 86400000)); | ||
return buffer.writeInt16LE(offset); | ||
@@ -1088,2 +1385,15 @@ } else { | ||
} | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (value instanceof Date) { | ||
return value; | ||
} | ||
value = Date.parse(value); | ||
if (isNaN(value)) { | ||
return new TypeError("Invalid date."); | ||
} | ||
return value; | ||
} | ||
@@ -1100,3 +1410,3 @@ }, | ||
declaration: function(parameter) { | ||
return "" + parameter.value.name + " readonly"; | ||
return parameter.value.name + " readonly"; | ||
}, | ||
@@ -1144,2 +1454,17 @@ writeTypeInfo: function(buffer, parameter) { | ||
return buffer.writeUInt8(0x00); | ||
}, | ||
validate: function(value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
if (typeof value !== 'object') { | ||
return new TypeError("Invalid table."); | ||
} | ||
if (!Array.isArray(value.columns)) { | ||
return new TypeError("Invalid table."); | ||
} | ||
if (!Array.isArray(value.rows)) { | ||
return new TypeError("Invalid table."); | ||
} | ||
return value; | ||
} | ||
@@ -1146,0 +1471,0 @@ } |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var Debug, EventEmitter, util, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -20,4 +20,4 @@ EventEmitter = require('events').EventEmitter; | ||
function Debug(options) { | ||
this.options = options; | ||
function Debug(_at_options) { | ||
this.options = _at_options; | ||
this.options = this.options || {}; | ||
@@ -24,0 +24,0 @@ this.options.data = this.options.data || false; |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var ConnectionError, RequestError, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -6,0 +6,0 @@ ConnectionError = (function(_super) { |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var arrayToGuid, formatHex, guidToArray; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var MYSTERY_HEADER_LENGTH, RETRIES, SQL_SERVER_BROWSER_PORT, TIMEOUT, dgram, parseBrowserResponse; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
exports.name = 'Tedious'; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var FLAGS_1, FLAGS_2, FLAGS_3, Login7Payload, NTLMFlags, TYPE_FLAGS, WritableTrackingBuffer, libraryName, os, sprintf, versions; | ||
@@ -107,5 +107,5 @@ | ||
Login7Payload = (function() { | ||
function Login7Payload(loginData) { | ||
function Login7Payload(_at_loginData) { | ||
var data, fixed, length, lengthLength, variable; | ||
this.loginData = loginData; | ||
this.loginData = _at_loginData; | ||
lengthLength = 4; | ||
@@ -231,7 +231,11 @@ fixed = this.createFixedData(); | ||
Login7Payload.prototype.createNTLMRequest = function(options) { | ||
var BODY_LENGTH, buffer, bufferLength, domain, protocol, type1flags; | ||
var BODY_LENGTH, buffer, bufferLength, domain, protocol, type1flags, workstation; | ||
domain = escape(options.domain.toUpperCase()); | ||
workstation = options.workstation ? escape(options.workstation.toUpperCase()) : ''; | ||
protocol = 'NTLMSSP\u0000'; | ||
BODY_LENGTH = 40; | ||
type1flags = this.getNTLMFlags(); | ||
if (workstation === '') { | ||
type1flags -= NTLMFlags.NTLM_NegotiateOemWorkstationSupplied; | ||
} | ||
bufferLength = BODY_LENGTH + domain.length; | ||
@@ -244,2 +248,5 @@ buffer = new WritableTrackingBuffer(bufferLength); | ||
buffer.writeUInt16LE(domain.length); | ||
buffer.writeUInt32LE(BODY_LENGTH + workstation.length); | ||
buffer.writeUInt16LE(workstation.length); | ||
buffer.writeUInt16LE(workstation.length); | ||
buffer.writeUInt32LE(BODY_LENGTH); | ||
@@ -253,2 +260,3 @@ buffer.writeUInt8(5); | ||
buffer.writeUInt8(15); | ||
buffer.writeString(workstation, 'ascii'); | ||
buffer.writeString(domain, 'ascii'); | ||
@@ -274,3 +282,3 @@ return buffer.data; | ||
Login7Payload.prototype.getNTLMFlags = function() { | ||
return NTLMFlags.NTLM_NegotiateUnicode + NTLMFlags.NTLM_NegotiateOEM + NTLMFlags.NTLM_RequestTarget + NTLMFlags.NTLM_NegotiateNTLM + NTLMFlags.NTLM_NegotiateOemDomainSupplied + NTLMFlags.NTLM_NegotiateAlwaysSign + NTLMFlags.NTLM_NegotiateVersion + NTLMFlags.NTLM_Negotiate128 + NTLMFlags.NTLM_Negotiate56; | ||
return NTLMFlags.NTLM_NegotiateUnicode + NTLMFlags.NTLM_NegotiateOEM + NTLMFlags.NTLM_RequestTarget + NTLMFlags.NTLM_NegotiateNTLM + NTLMFlags.NTLM_NegotiateOemDomainSupplied + NTLMFlags.NTLM_NegotiateOemWorkstationSupplied + NTLMFlags.NTLM_NegotiateAlwaysSign + NTLMFlags.NTLM_NegotiateVersion + NTLMFlags.NTLM_NegotiateExtendedSecurity + NTLMFlags.NTLM_Negotiate128 + NTLMFlags.NTLM_Negotiate56; | ||
}; | ||
@@ -277,0 +285,0 @@ |
@@ -1,6 +0,6 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var EventEmitter, MessageIO, Packet, TYPE, isPacketComplete, packetHeaderLength, packetLength, | ||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -24,6 +24,6 @@ require('./buffertools'); | ||
function MessageIO(socket, _packetSize, debug) { | ||
this.socket = socket; | ||
this._packetSize = _packetSize; | ||
this.debug = debug; | ||
function MessageIO(_at_socket, _at__packetSize, _at_debug) { | ||
this.socket = _at_socket; | ||
this._packetSize = _at__packetSize; | ||
this.debug = _at_debug; | ||
this.sendPacket = __bind(this.sendPacket, this); | ||
@@ -30,0 +30,0 @@ this.eventData = __bind(this.eventData, this); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var TYPE, codepageByLcid, parse, sprintf; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var BigInteger, NTLMResponsePayload, WritableTrackingBuffer, crypto, hex; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var DEFAULT_PACKETID, DEFAULT_SPID, DEFAULT_WINDOW, HEADER_LENGTH, NL, OFFSET, Packet, STATUS, TYPE, isPacketComplete, name, packetLength, sprintf, typeByValue, value; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var ENCRYPT, MARS, PreloginPayload, SUBBUILD, TOKEN, VERSION, WritableTrackingBuffer, encryptByValue, marsByValue, name, optionBufferSize, sprintf, value; | ||
@@ -3,0 +3,0 @@ |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var EventEmitter, Request, RequestError, TYPES, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -19,5 +19,5 @@ EventEmitter = require('events').EventEmitter; | ||
function Request(sqlTextOrProcedure, callback) { | ||
this.sqlTextOrProcedure = sqlTextOrProcedure; | ||
this.callback = callback; | ||
function Request(_at_sqlTextOrProcedure, _at_callback) { | ||
this.sqlTextOrProcedure = _at_sqlTextOrProcedure; | ||
this.callback = _at_callback; | ||
this.parameters = []; | ||
@@ -82,2 +82,5 @@ this.parametersByName = {}; | ||
var parameter, _i, _len, _ref; | ||
if (this.validateParameters()) { | ||
return; | ||
} | ||
this.originalParameters = this.parameters; | ||
@@ -132,5 +135,22 @@ this.parameters = []; | ||
} | ||
if (this.validateParameters()) { | ||
return; | ||
} | ||
return this.sqlTextOrProcedure = 'sp_execute'; | ||
}; | ||
Request.prototype.validateParameters = function() { | ||
var parameter, value, _i, _len, _ref; | ||
_ref = this.parameters; | ||
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | ||
parameter = _ref[_i]; | ||
value = parameter.type.validate(parameter.value); | ||
if (value instanceof TypeError) { | ||
return this.error = new RequestError("Validation failed for parameter '" + parameter.name + "'. " + value.message, "EPARAM"); | ||
} | ||
parameter.value = value; | ||
} | ||
return null; | ||
}; | ||
return Request; | ||
@@ -137,0 +157,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var OPTION, RpcRequestPayload, STATUS, WritableTrackingBuffer, typeByName, writeAllHeaders; | ||
@@ -27,5 +27,5 @@ | ||
RpcRequestPayload = (function() { | ||
function RpcRequestPayload(request, txnDescriptor, options) { | ||
function RpcRequestPayload(_at_request, txnDescriptor, options) { | ||
var buffer, optionFlags, outstandingRequestCount, param, parameter, statusFlags, _base, _base1, _base2, _i, _len, _ref, _ref1, _ref2, _ref3; | ||
this.request = request; | ||
this.request = _at_request; | ||
buffer = new WritableTrackingBuffer(500); | ||
@@ -32,0 +32,0 @@ this.procedure = this.request.sqlTextOrProcedure; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
modules.exports = { | ||
@@ -3,0 +3,0 @@ Sp_Cursor: 1, |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var SqlBatchPayload, WritableTrackingBuffer, writeAllHeaders; | ||
@@ -14,5 +14,5 @@ | ||
SqlBatchPayload = (function() { | ||
function SqlBatchPayload(sqlText, txnDescriptor, options) { | ||
function SqlBatchPayload(_at_sqlText, txnDescriptor, options) { | ||
var buffer, outstandingRequestCount; | ||
this.sqlText = sqlText; | ||
this.sqlText = _at_sqlText; | ||
buffer = new WritableTrackingBuffer(100 + (2 * this.sqlText.length), 'ucs2'); | ||
@@ -19,0 +19,0 @@ if (options.tdsVersion >= '7_2') { |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var name, value, _ref; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
exports.statemachineLogLevel = 0; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var metadataParse, parser; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var STATUS, doneInProcParser, doneParser, doneProcParser, parser, versions; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var EventEmitter, types; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var errorParser, infoParser, parser; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var interfaceTypes, parser, versions; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var parser, sprintf, valueParse; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var parser; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var parser; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var metadataParse, parser, valueParse; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var parser, sprintf, valueParse; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var parseChallenge, parser; | ||
@@ -3,0 +3,0 @@ |
@@ -1,5 +0,5 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var EventEmitter, Parser, ReadableTrackingBuffer, TYPE, tokenParsers, | ||
__hasProp = {}.hasOwnProperty, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -57,6 +57,6 @@ ReadableTrackingBuffer = require('../tracking-buffer/tracking-buffer').ReadableTrackingBuffer; | ||
function Parser(debug, colMetadata, options) { | ||
this.debug = debug; | ||
this.colMetadata = colMetadata; | ||
this.options = options; | ||
function Parser(_at_debug, _at_colMetadata, _at_options) { | ||
this.debug = _at_debug; | ||
this.colMetadata = _at_colMetadata; | ||
this.options = _at_options; | ||
this.buffer = new ReadableTrackingBuffer(new Buffer(0), 'ucs2'); | ||
@@ -63,0 +63,0 @@ this.position = 0; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var TYPE; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var convertLEBytesToString, getNextRemainder, invert, isZero, numberToInt64LE; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var ReadableTrackingBuffer, convertLEBytesToString; | ||
@@ -15,6 +15,6 @@ | ||
ReadableTrackingBuffer = (function() { | ||
function ReadableTrackingBuffer(buffer, encoding) { | ||
this.buffer = buffer; | ||
this.encoding = encoding; | ||
if (!buffer) { | ||
function ReadableTrackingBuffer(_at_buffer, _at_encoding) { | ||
this.buffer = _at_buffer; | ||
this.encoding = _at_encoding; | ||
if (!this.buffer) { | ||
this.buffer = new Buffer(0); | ||
@@ -21,0 +21,0 @@ this.encoding = void 0; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var ReadableTrackingBuffer, WritableTrackingBuffer; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var SHIFT_LEFT_32, SHIFT_RIGHT_32, UNKNOWN_PLP_LEN, WritableTrackingBuffer, bigint, buffertools; | ||
@@ -23,6 +23,6 @@ | ||
WritableTrackingBuffer = (function() { | ||
function WritableTrackingBuffer(initialSize, encoding, doubleSizeGrowth) { | ||
this.initialSize = initialSize; | ||
this.encoding = encoding; | ||
this.doubleSizeGrowth = doubleSizeGrowth; | ||
function WritableTrackingBuffer(_at_initialSize, _at_encoding, _at_doubleSizeGrowth) { | ||
this.initialSize = _at_initialSize; | ||
this.encoding = _at_encoding; | ||
this.doubleSizeGrowth = _at_doubleSizeGrowth; | ||
this.doubleSizeGrowth || (this.doubleSizeGrowth = false); | ||
@@ -261,9 +261,11 @@ this.encoding || (this.encoding = 'ucs2'); | ||
this.writeBuffer(UNKNOWN_PLP_LEN); | ||
this.writeUInt32LE(length); | ||
if (Buffer.isBuffer(value)) { | ||
this.writeBuffer(value); | ||
} else { | ||
this.makeRoomFor(length); | ||
this.buffer.write(value, this.position, encoding); | ||
this.position += length; | ||
if (length > 0) { | ||
this.writeUInt32LE(length); | ||
if (Buffer.isBuffer(value)) { | ||
this.writeBuffer(value); | ||
} else { | ||
this.makeRoomFor(length); | ||
this.buffer.write(value, this.position, encoding); | ||
this.position += length; | ||
} | ||
} | ||
@@ -270,0 +272,0 @@ return this.writeUInt32LE(0); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var ISOLATION_LEVEL, OPERATION_TYPE, Transaction, WritableTrackingBuffer, isolationLevelByValue, name, value, writeAllHeaders; | ||
@@ -40,5 +40,5 @@ | ||
Transaction = (function() { | ||
function Transaction(name, isolationLevel) { | ||
this.name = name; | ||
this.isolationLevel = isolationLevel; | ||
function Transaction(_at_name, _at_isolationLevel) { | ||
this.name = _at_name; | ||
this.isolationLevel = _at_isolationLevel; | ||
this.outstandingRequestCount = 1; | ||
@@ -45,0 +45,0 @@ } |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.9.0 | ||
var DEFAULT_ENCODING, MAX, MONEY_DIVISOR, NULL, PLP_NULL, THREE_AND_A_THIRD, UNKNOWN_PLP_LEN, guidParser, iconv, parse, readBinary, readChars, readDate, readDateTime, readDateTime2, readDateTimeOffset, readMax, readMaxBinary, readMaxChars, readMaxNChars, readNChars, readSmallDateTime, readTime, sprintf; | ||
@@ -232,3 +232,3 @@ | ||
} else { | ||
value = readTime(buffer, dataLength, metaData.scale); | ||
value = readTime(buffer, dataLength, metaData.scale, options.useUTC); | ||
} | ||
@@ -240,3 +240,3 @@ break; | ||
} else { | ||
value = readDate(buffer); | ||
value = readDate(buffer, options.useUTC); | ||
} | ||
@@ -248,3 +248,3 @@ break; | ||
} else { | ||
value = readDateTime2(buffer, dataLength, metaData.scale); | ||
value = readDateTime2(buffer, dataLength, metaData.scale, options.useUTC); | ||
} | ||
@@ -425,3 +425,3 @@ break; | ||
readTime = function(buffer, dataLength, scale) { | ||
readTime = function(buffer, dataLength, scale, useUTC) { | ||
var date, i, value, _i, _ref; | ||
@@ -443,3 +443,7 @@ switch (dataLength) { | ||
} | ||
date = new Date(Date.UTC(1970, 0, 1, 0, 0, 0, value / 10000)); | ||
if (useUTC) { | ||
date = new Date(Date.UTC(1970, 0, 1, 0, 0, 0, value / 10000)); | ||
} else { | ||
date = new Date(1970, 0, 1, 0, 0, 0, value / 10000); | ||
} | ||
Object.defineProperty(date, "nanosecondsDelta", { | ||
@@ -452,13 +456,21 @@ enumerable: false, | ||
readDate = function(buffer) { | ||
readDate = function(buffer, useUTC) { | ||
var days; | ||
days = buffer.readUInt24LE(); | ||
return new Date(Date.UTC(2000, 0, days - 730118)); | ||
if (useUTC) { | ||
return new Date(Date.UTC(2000, 0, days - 730118)); | ||
} else { | ||
return new Date(2000, 0, days - 730118); | ||
} | ||
}; | ||
readDateTime2 = function(buffer, dataLength, scale) { | ||
readDateTime2 = function(buffer, dataLength, scale, useUTC) { | ||
var date, days, time; | ||
time = readTime(buffer, dataLength - 3, scale); | ||
time = readTime(buffer, dataLength - 3, scale, useUTC); | ||
days = buffer.readUInt24LE(); | ||
date = new Date(Date.UTC(2000, 0, days - 730118, 0, 0, 0, +time)); | ||
if (useUTC) { | ||
date = new Date(Date.UTC(2000, 0, days - 730118, 0, 0, 0, +time)); | ||
} else { | ||
date = new Date(2000, 0, days - 730118, time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()); | ||
} | ||
Object.defineProperty(date, "nanosecondsDelta", { | ||
@@ -473,3 +485,3 @@ enumerable: false, | ||
var date, days, offset, time; | ||
time = readTime(buffer, dataLength - 5, scale); | ||
time = readTime(buffer, dataLength - 5, scale, true); | ||
days = buffer.readUInt24LE(); | ||
@@ -476,0 +488,0 @@ offset = buffer.readInt16LE(); |
{ | ||
"author": "Mike D Pilsbury <mike.pilsbury@gmail.com>", | ||
"contributors": [ | ||
"Alex Robson", | ||
"Arthur Schreiber", | ||
"Bret Copeland <bret@atlantisflight.org> (https://github.com/bretcope)", | ||
"Bryan Ross <bryan@rossipedia.com> (https://github.com/rossipedia)", | ||
"Ciaran Jessup <ciaranj@gmail.com>", | ||
@@ -9,5 +13,3 @@ "Cort Fritz <cfritz@caa.com>", | ||
"Phil Dodderidge <pdodde@poyntz.com>", | ||
"Zach Aller", | ||
"Bryan Ross <bryan@rossipedia.com> (https://github.com/rossipedia)", | ||
"Bret Copeland <bret@atlantisflight.org> (https://github.com/bretcope)" | ||
"Zach Aller" | ||
], | ||
@@ -34,3 +36,3 @@ "name": "tedious", | ||
], | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"main": "./lib/tedious.js", | ||
@@ -42,13 +44,13 @@ "repository": { | ||
"engines": { | ||
"node": "0.6 || 0.7 || 0.8 || 0.9 || 0.10 || 0.11" | ||
"node": ">=0.6" | ||
}, | ||
"dependencies": { | ||
"big-number": "0.3.0", | ||
"iconv-lite": "0.4.2", | ||
"sprintf": "0.1.1" | ||
"big-number": "0.3.1", | ||
"iconv-lite": "0.4.7", | ||
"sprintf": "0.1.5" | ||
}, | ||
"devDependencies": { | ||
"async": "0.2.10", | ||
"coffee-script": "1.7.1", | ||
"nodeunit": "0.8.4" | ||
"async": "0.9.0", | ||
"coffee-script": "1.9.0", | ||
"nodeunit": "0.9.0" | ||
}, | ||
@@ -55,0 +57,0 @@ "scripts": { |
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
210376
6152
3
+ Addedbig-number@0.3.1(transitive)
+ Addediconv-lite@0.4.7(transitive)
+ Addedsprintf@0.1.5(transitive)
- Removedbig-number@0.3.0(transitive)
- Removediconv-lite@0.4.2(transitive)
- Removedsprintf@0.1.1(transitive)
Updatedbig-number@0.3.1
Updatediconv-lite@0.4.7
Updatedsprintf@0.1.5