Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mShan0 committed Oct 11, 2023
1 parent df2a6fa commit e180c39
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/metadata-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ function metadataParse(parser: Parser, options: ParserOptions, callback: (metada
result = readMetadata(parser.buffer, parser.position, options);
} catch (err: any) {
if (err instanceof NotEnoughDataError) {
await parser.streamBuffer.waitForChunk();
await parser.waitForChunk();
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/token/colmetadata-token-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async function colMetadataParser(parser: Parser): Promise<ColMetadataToken> {
({ offset, value: columnCount } = readUInt16LE(parser.buffer, parser.position));
} catch (err) {
if (err instanceof NotEnoughDataError) {
await parser.streamBuffer.waitForChunk();
await parser.waitForChunk();
continue;
}

Expand All @@ -111,7 +111,7 @@ async function colMetadataParser(parser: Parser): Promise<ColMetadataToken> {
({ offset, value: column } = readColumn(parser.buffer, parser.position, parser.options, i));
} catch (err: any) {
if (err instanceof NotEnoughDataError) {
await parser.streamBuffer.waitForChunk();
await parser.waitForChunk();
continue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/token/infoerror-token-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function readToken(buf: Buffer | BufferList, offset: number, options: ParserOpti
let tokenLength;
({ offset, value: tokenLength } = readUInt16LE(buf, offset));

if (buf.length < tokenLength + offset){
if (buf.length < tokenLength + offset) {
throw new NotEnoughDataError(tokenLength + offset);
}

Expand All @@ -33,7 +33,7 @@ function readToken(buf: Buffer | BufferList, offset: number, options: ParserOpti

let message;
({ offset, value: message } = readUsVarChar(buf, offset));
console.log(message);

let serverName;
({ offset, value: serverName } = readBVarChar(buf, offset));

Expand Down
2 changes: 0 additions & 2 deletions src/token/loginack-token-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ function loginAckParser(buf: Buffer | BufferList, offset: number, _options: Pars
let buildNumLow;
({ offset, value: buildNumLow } = readUInt8(buf, offset));

console.log("offset: ", offset);

return {
value: new LoginAckToken({
interface: interfaceType,
Expand Down
4 changes: 2 additions & 2 deletions src/token/returnvalue-token-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function returnParser(parser: Parser): Promise<ReturnValueToken> {
}
} catch (err) {
if (err instanceof NotEnoughDataError) {
await parser.streamBuffer.waitForChunk();
await parser.waitForChunk();
continue;
}

Expand Down Expand Up @@ -63,7 +63,7 @@ async function returnParser(parser: Parser): Promise<ReturnValueToken> {
({ value, offset } = readValue(buf, offset, metadata, parser.options));
} catch (err) {
if (err instanceof NotEnoughDataError) {
await parser.streamBuffer.waitForChunk();
await parser.waitForChunk();
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/value-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function readValue(buf: Buffer | BufferList, offset: number, metadata: Metadata,
return { value: null, offset };
}

console.log(metadata, dataLength);
// console.log(metadata, dataLength);

return _readChars(buf, offset, dataLength, codepage);
}
Expand Down

0 comments on commit e180c39

Please sign in to comment.