roku-debug 0.21.30 → 0.21.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/adapters/DebugProtocolAdapter.js +3 -2
  3. package/dist/adapters/DebugProtocolAdapter.js.map +1 -1
  4. package/dist/adapters/TelnetAdapter.js +8 -7
  5. package/dist/adapters/TelnetAdapter.js.map +1 -1
  6. package/dist/adapters/TelnetRequestPipeline.js +1 -1
  7. package/dist/adapters/TelnetRequestPipeline.js.map +1 -1
  8. package/dist/debugProtocol/DebugProtocolClientReplaySession.d.ts +1 -0
  9. package/dist/debugProtocol/ProtocolUtil.d.ts +1 -0
  10. package/dist/debugProtocol/client/DebugProtocolClient.d.ts +1 -0
  11. package/dist/debugProtocol/client/DebugProtocolClient.js +2 -3
  12. package/dist/debugProtocol/client/DebugProtocolClient.js.map +1 -1
  13. package/dist/debugProtocol/client/DebugProtocolClientPlugin.d.ts +1 -0
  14. package/dist/debugProtocol/events/ProtocolEvent.d.ts +1 -0
  15. package/dist/debugProtocol/events/requests/AddBreakpointsRequest.d.ts +1 -0
  16. package/dist/debugProtocol/events/requests/AddConditionalBreakpointsRequest.d.ts +1 -0
  17. package/dist/debugProtocol/events/requests/ContinueRequest.d.ts +1 -0
  18. package/dist/debugProtocol/events/requests/ExecuteRequest.d.ts +1 -0
  19. package/dist/debugProtocol/events/requests/ExitChannelRequest.d.ts +1 -0
  20. package/dist/debugProtocol/events/requests/HandshakeRequest.d.ts +1 -0
  21. package/dist/debugProtocol/events/requests/ListBreakpointsRequest.d.ts +1 -0
  22. package/dist/debugProtocol/events/requests/RemoveBreakpointsRequest.d.ts +1 -0
  23. package/dist/debugProtocol/events/requests/SetExceptionBreakpointsRequest.d.ts +1 -0
  24. package/dist/debugProtocol/events/requests/StackTraceRequest.d.ts +1 -0
  25. package/dist/debugProtocol/events/requests/StepRequest.d.ts +1 -0
  26. package/dist/debugProtocol/events/requests/StopRequest.d.ts +1 -0
  27. package/dist/debugProtocol/events/requests/ThreadsRequest.d.ts +1 -0
  28. package/dist/debugProtocol/events/requests/VariablesRequest.d.ts +1 -0
  29. package/dist/debugProtocol/events/responses/ExecuteV3Response.d.ts +1 -0
  30. package/dist/debugProtocol/events/responses/GenericResponse.d.ts +1 -0
  31. package/dist/debugProtocol/events/responses/GenericV3Response.d.ts +1 -0
  32. package/dist/debugProtocol/events/responses/HandshakeResponse.d.ts +1 -0
  33. package/dist/debugProtocol/events/responses/HandshakeV3Response.d.ts +1 -0
  34. package/dist/debugProtocol/events/responses/ListBreakpointsResponse.d.ts +1 -0
  35. package/dist/debugProtocol/events/responses/SetExceptionBreakpointsResponse.d.ts +1 -0
  36. package/dist/debugProtocol/events/responses/StackTraceResponse.d.ts +1 -0
  37. package/dist/debugProtocol/events/responses/StackTraceV3Response.d.ts +1 -0
  38. package/dist/debugProtocol/events/responses/ThreadsResponse.d.ts +1 -0
  39. package/dist/debugProtocol/events/responses/VariablesResponse.d.ts +1 -0
  40. package/dist/debugProtocol/events/updates/AllThreadsStoppedUpdate.d.ts +1 -0
  41. package/dist/debugProtocol/events/updates/BreakpointErrorUpdate.d.ts +1 -0
  42. package/dist/debugProtocol/events/updates/BreakpointVerifiedUpdate.d.ts +1 -0
  43. package/dist/debugProtocol/events/updates/CompileErrorUpdate.d.ts +1 -0
  44. package/dist/debugProtocol/events/updates/ExceptionBreakpointErrorUpdate.d.ts +1 -0
  45. package/dist/debugProtocol/events/updates/IOPortOpenedUpdate.d.ts +1 -0
  46. package/dist/debugProtocol/events/updates/ThreadAttachedUpdate.d.ts +1 -0
  47. package/dist/debugProtocol/server/DebugProtocolServer.d.ts +1 -0
  48. package/dist/debugProtocol/server/DebugProtocolServerPlugin.d.ts +1 -0
  49. package/dist/debugSession/BrightScriptDebugSession.js +7 -1
  50. package/dist/debugSession/BrightScriptDebugSession.js.map +1 -1
  51. package/dist/util.d.ts +11 -0
  52. package/dist/util.js +66 -0
  53. package/dist/util.js.map +1 -1
  54. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
+ /// <reference types="node" />
3
4
  import type { DebugProtocolClient } from './DebugProtocolClient';
4
5
  import type { Socket } from 'net';
5
6
  import type { ProtocolRequest, ProtocolResponse, ProtocolUpdate } from '../events/ProtocolEvent';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { Command, UpdateType } from '../Constants';
3
4
  export interface ProtocolEvent<TData> {
4
5
  /**
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class AddBreakpointsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class AddConditionalBreakpointsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class ContinueRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class ExecuteRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class ExitChannelRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ProtocolRequest } from '../ProtocolEvent';
3
4
  import type { Command } from '../../Constants';
4
5
  /**
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class ListBreakpointsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class RemoveBreakpointsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class SetExceptionBreakpointsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class StackTraceRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { StepType } from '../../Constants';
3
4
  import { Command } from '../../Constants';
4
5
  import type { ProtocolRequest } from '../ProtocolEvent';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class StopRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class ThreadsRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { Command } from '../../Constants';
3
4
  import type { ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class VariablesRequest implements ProtocolRequest {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { StopReasonCode } from '../../Constants';
3
4
  import { ErrorCode } from '../../Constants';
4
5
  export declare class ExecuteV3Response {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ErrorCode } from '../../Constants';
3
4
  export declare class GenericResponse {
4
5
  static fromJson(data: {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ErrorCode } from '../../Constants';
3
4
  import type { ProtocolResponse, ProtocolResponseData, ProtocolResponseErrorData } from '../ProtocolEvent';
4
5
  export declare class GenericV3Response implements ProtocolResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ProtocolResponse } from '../ProtocolEvent';
3
4
  import { ErrorCode } from '../../Constants';
4
5
  export declare class HandshakeResponse implements ProtocolResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ProtocolResponse } from '../ProtocolEvent';
3
4
  import { ErrorCode } from '../../Constants';
4
5
  export declare class HandshakeV3Response implements ProtocolResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode } from '../../Constants';
3
4
  import type { ProtocolResponse } from '../ProtocolEvent';
4
5
  export declare class ListBreakpointsResponse implements ProtocolResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode } from '../../Constants';
3
4
  import type { ProtocolResponse } from '../ProtocolEvent';
4
5
  export declare class SetExceptionBreakpointsResponse implements ProtocolResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode } from '../../Constants';
3
4
  import type { StackEntry } from './StackTraceV3Response';
4
5
  export declare class StackTraceResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode } from '../../Constants';
3
4
  export declare class StackTraceV3Response {
4
5
  static fromJson(data: {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { StopReason } from '../../Constants';
3
4
  import { ErrorCode } from '../../Constants';
4
5
  export declare class ThreadsResponse {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { ProtocolResponse, ProtocolResponseData, ProtocolResponseErrorData } from '../ProtocolEvent';
3
4
  export declare class VariablesResponse implements ProtocolResponse {
4
5
  static fromJson(data: {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { StopReason } from '../../Constants';
3
4
  import { ErrorCode, UpdateType } from '../../Constants';
4
5
  import type { ProtocolUpdate } from '../ProtocolEvent';
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode, UpdateType } from '../../Constants';
3
4
  /**
4
5
  * Data sent as the data segment of message type: BREAKPOINT_ERROR
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode, UpdateType } from '../../Constants';
3
4
  /**
4
5
  ```
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode, UpdateType } from '../../Constants';
3
4
  /**
4
5
  * A COMPILE_ERROR is sent if a compilation error occurs. In this case, the update_type field in a DebuggerUpdate message is set to
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode, UpdateType } from '../../Constants';
3
4
  /**
4
5
  * Data sent as the data segment of message type: BREAKPOINT_ERROR
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { ErrorCode, UpdateType } from '../../Constants';
3
4
  import type { ProtocolUpdate, ProtocolResponse, ProtocolRequest } from '../ProtocolEvent';
4
5
  export declare class IOPortOpenedUpdate {
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { StopReason } from '../../Constants';
3
4
  import { ErrorCode, UpdateType } from '../../Constants';
4
5
  export declare class ThreadAttachedUpdate {
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
+ /// <reference types="node" />
3
4
  import * as Net from 'net';
4
5
  import type { ProtocolRequest, ProtocolResponse } from '../events/ProtocolEvent';
5
6
  import PluginInterface from '../PluginInterface';
@@ -1,5 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
+ /// <reference types="node" />
3
4
  import type { DebugProtocolServer } from './DebugProtocolServer';
4
5
  import type { Socket } from 'net';
5
6
  import type { ProtocolRequest, ProtocolResponse } from '../events/ProtocolEvent';
@@ -571,11 +571,17 @@ class BrightScriptDebugSession extends debugadapter_1.DebugSession {
571
571
  this.logger.log(`Uploading zip took ${Date.now() - start}ms`);
572
572
  //the channel has been deployed. Wait for the adapter to finish connecting.
573
573
  //if it hasn't connected after 5 seconds, it probably will never connect.
574
+ let didTimeOut = false;
574
575
  await Promise.race([
575
576
  isConnected,
576
- util_1.util.sleep(10000)
577
+ util_1.util.sleep(10000).then(() => {
578
+ didTimeOut = true;
579
+ })
577
580
  ]);
578
581
  this.logger.log('Finished racing promises');
582
+ if (didTimeOut) {
583
+ this.logger.warn('Timed out waiting for roku to connect');
584
+ }
579
585
  //if the adapter is still not connected, then it will probably never connect. Abort.
580
586
  if (packageIsPublished && !this.rokuAdapter.connected) {
581
587
  return this.shutdown('Debug session cancelled: failed to connect to debug protocol control port.');