Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
83 changes: 73 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/FileUtils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as sinonActual from 'sinon';
import { SourceNode } from 'source-map';
import { fileUtils, standardizePath as s } from './FileUtils';
import { SourceMapManager } from './managers/SourceMapManager';
import { logger } from './logging';

let sinon = sinonActual.createSandbox();
const rootDir = path.normalize(path.dirname(__dirname));
Expand Down Expand Up @@ -78,7 +79,7 @@ describe('FileUtils', () => {
});

it('returns first result when multiple matches are found', async () => {
let stub = sinon.stub(console, 'warn').returns(undefined);
let stub = sinon.stub(logger, 'warn').returns(undefined);

expect(await fileUtils.findPartialFileInDirectory('...lib.brs', 'SomeAppDir')).to.equal('source/lib1/lib.brs');

Expand Down
3 changes: 2 additions & 1 deletion src/FileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as glob from 'glob';
import * as path from 'path';
import { promisify } from 'util';
import { util as rokuDeployUtil } from 'roku-deploy';
import { logger } from './logging';
const globp = promisify(glob);

export class FileUtils {
Expand Down Expand Up @@ -89,7 +90,7 @@ export class FileUtils {

//TODO is there something more we should do about finding multiple matches?
if (results.length > 1) {
console.warn(
logger.warn(
`Found multiple paths in '${directoryPath}' that match '${partialFilePath}'. Returning the first result, but you should consider renaming files in longer file paths to something unique`
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/RendezvousTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class RendezvousTracker {
}
} catch (e) {
//if there was an error pinging rendezvous, log the error but don't bring down the app
console.error('There was an error fetching rendezvous data', e?.stack);
this.logger.error('There was an error fetching rendezvous data', e?.stack);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/SceneGraphDebugCommandController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export class SceneGraphDebugCommandController {
this.removeConnection();
} catch (error) {
this.removeConnection();
console.log(error, this.connection);
this.logger.error(error, this.connection);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/DebugProtocolAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class DebugProtocolAdapter {
});

this.client.on('runtime-error', (data) => {
console.debug('hasRuntimeError!!', data);
this.logger.debug('hasRuntimeError!!', data);
this.emit('runtime-error', <BrightScriptRuntimeError>{
message: data.data.stopReasonDetail,
errorCode: data.data.stopReason
Expand Down
3 changes: 0 additions & 3 deletions src/adapters/TelnetRequestPipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ export class TelnetCommand {


public handleData(pipeline: TelnetRequestPipeline) {
if (this.deferred.isCompleted) {
console.log('stop here');
}
//get the first response
const match = /Brightscript Debugger>\s*/is.exec(pipeline.unhandledText);
if (match) {
Expand Down
4 changes: 2 additions & 2 deletions src/bsc/threading/WorkerPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export class WorkerPool {
public dispose() {
for (const worker of this.allWorkers) {
try {
void worker.terminate().catch((e) => console.error(e));
void worker.terminate().catch((e) => this.logger.error(e));
} catch (e) {
console.error(e);
this.logger.error(e);
}
}
this.allWorkers = [];
Expand Down
Loading