Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@tests/smoke/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"license": "Apache-2.0",
"dependencies": {
"@fluencelabs/js-client": "workspace:*",
"@test/aqua_for_test": "workspace:../../aqua"
"@test/aqua_for_test": "workspace:*"
}
}
8 changes: 4 additions & 4 deletions packages/core/js-client/src/jsPeer/FluencePeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export abstract class FluencePeer {
// Otherwise the race might occur corrupting the prevData

log_particle.debug('id %s. sending particle to interpreter', item.particle.id);
log_particle.trace('id %s. prevData: %a', item.particle.id, prevData);
log_particle.trace('id %s. prevData: %s', item.particle.id, new TextDecoder().decode(prevData));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest moving this part to a separate function, instead of dublicating this TextDecoder().decode() stuff so when Ivan creates binary data for avm we can change one line instead of changing three or pottentially more

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored this to private method


const args = serializeAvmArgs(
{
Expand Down Expand Up @@ -442,16 +442,16 @@ export abstract class FluencePeer {
item.result.retCode,
item.result.errorMessage,
);
log_particle.trace('id %s. avm data: %a', item.particle.id, item.result.data);
log_particle.trace('id %s. avm data: %s', item.particle.id, new TextDecoder().decode(item.result.data));
item.onStageChange({ stage: 'interpreterError', errorMessage: item.result.errorMessage });
return;
}

log_particle.trace(
'id %s. interpreter result: retCode: %d, avm data: %a',
'id %s. interpreter result: retCode: %d, avm data: %s',
item.particle.id,
item.result.retCode,
item.result.data,
new TextDecoder().decode(item.result.data),
);

setTimeout(() => {
Expand Down
6 changes: 0 additions & 6 deletions packages/core/js-client/src/util/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
*/

import debug from 'debug';
import { Buffer } from 'buffer';

// Format avm data as a string
debug.formatters.a = (avmData: Uint8Array) => {
return new TextDecoder().decode(Buffer.from(avmData));
};

type Logger = (formatter: any, ...args: any[]) => void;

Expand Down