more logging

This commit is contained in:
Moon Man 2024-01-28 12:19:00 -05:00
parent c8cba3c45e
commit 59aa384ec6
4 changed files with 4 additions and 4 deletions

2
dist/bert.js vendored
View File

@ -335,7 +335,7 @@ export class Bert {
}; };
}; };
decode_string = (buffer) => { decode_string = (buffer) => {
const sizeLen = this.convention == Lang.ELIXIR ? 4 : 2; const sizeLen = this.convention === Lang.ELIXIR ? 4 : 2;
const size = this.bytesToInt(buffer, sizeLen, true); const size = this.bytesToInt(buffer, sizeLen, true);
buffer = buffer.subarray(sizeLen); buffer = buffer.subarray(sizeLen);
return { return {

2
dist/main.js vendored
View File

@ -17,7 +17,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4); const lenBytes = process.stdin.read(4);
if (lenBytes) { if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true); const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen}\n`); process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\n`);
const termBytes = process.stdin.read(termLen); const termBytes = process.stdin.read(termLen);
if (termBytes) { if (termBytes) {
const decoded = this.bert.decode(termBytes); const decoded = this.bert.decode(termBytes);

View File

@ -391,7 +391,7 @@ export class Bert {
}; };
decode_string = (buffer: Buffer) => { decode_string = (buffer: Buffer) => {
const sizeLen = this.convention == Lang.ELIXIR ? 4 : 2; const sizeLen = this.convention === Lang.ELIXIR ? 4 : 2;
const size = this.bytesToInt(buffer, sizeLen, true); const size = this.bytesToInt(buffer, sizeLen, true);
buffer = buffer.subarray(sizeLen); buffer = buffer.subarray(sizeLen);

View File

@ -22,7 +22,7 @@ export class Port extends Duplex {
const lenBytes = process.stdin.read(4); const lenBytes = process.stdin.read(4);
if (lenBytes) { if (lenBytes) {
const termLen = this.bert.bytesToInt(lenBytes, 4, true); const termLen = this.bert.bytesToInt(lenBytes, 4, true);
process.stderr.write(`Got incoming term length: ${termLen}\n`); process.stderr.write(`Got incoming term length: ${termLen} (bytes: ${lenBytes})\n`);
const termBytes = process.stdin.read(termLen); const termBytes = process.stdin.read(termLen);
if (termBytes) { if (termBytes) {