roku-debug 0.21.13 → 0.21.15
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.
- package/CHANGELOG.md +15 -0
- package/dist/adapters/DebugProtocolAdapter.d.ts +11 -0
- package/dist/adapters/DebugProtocolAdapter.js +46 -16
- package/dist/adapters/DebugProtocolAdapter.js.map +1 -1
- package/dist/adapters/TelnetAdapter.d.ts +6 -0
- package/dist/adapters/TelnetAdapter.js +24 -7
- package/dist/adapters/TelnetAdapter.js.map +1 -1
- package/dist/debugProtocol/Constants.d.ts +44 -5
- package/dist/debugProtocol/Constants.js +39 -4
- package/dist/debugProtocol/Constants.js.map +1 -1
- package/dist/debugProtocol/client/DebugProtocolClient.d.ts +7 -2
- package/dist/debugProtocol/client/DebugProtocolClient.js +44 -18
- package/dist/debugProtocol/client/DebugProtocolClient.js.map +1 -1
- package/dist/debugProtocol/events/requests/SetExceptionBreakpointsRequest.d.ts +33 -0
- package/dist/debugProtocol/events/requests/SetExceptionBreakpointsRequest.js +73 -0
- package/dist/debugProtocol/events/requests/SetExceptionBreakpointsRequest.js.map +1 -0
- package/dist/debugProtocol/events/requests/VariablesRequest.d.ts +27 -1
- package/dist/debugProtocol/events/requests/VariablesRequest.js +47 -4
- package/dist/debugProtocol/events/requests/VariablesRequest.js.map +1 -1
- package/dist/debugProtocol/events/responses/SetExceptionBreakpointsResponse.d.ts +31 -0
- package/dist/debugProtocol/events/responses/SetExceptionBreakpointsResponse.js +59 -0
- package/dist/debugProtocol/events/responses/SetExceptionBreakpointsResponse.js.map +1 -0
- package/dist/debugProtocol/events/responses/VariablesResponse.d.ts +10 -1
- package/dist/debugProtocol/events/responses/VariablesResponse.js +11 -3
- package/dist/debugProtocol/events/responses/VariablesResponse.js.map +1 -1
- package/dist/debugProtocol/events/updates/ExceptionBreakpointErrorUpdate.d.ts +46 -0
- package/dist/debugProtocol/events/updates/ExceptionBreakpointErrorUpdate.js +103 -0
- package/dist/debugProtocol/events/updates/ExceptionBreakpointErrorUpdate.js.map +1 -0
- package/dist/debugProtocol/server/DebugProtocolServer.js +3 -0
- package/dist/debugProtocol/server/DebugProtocolServer.js.map +1 -1
- package/dist/debugSession/BrightScriptDebugSession.d.ts +2 -0
- package/dist/debugSession/BrightScriptDebugSession.js +84 -8
- package/dist/debugSession/BrightScriptDebugSession.js.map +1 -1
- package/dist/util.d.ts +5 -0
- package/dist/util.js +19 -0
- package/dist/util.js.map +1 -1
- package/package.json +2 -2
- package/roku-debug-0.21.15.tgz +0 -0
- package/roku-debug-0.21.13.tgz +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetExceptionBreakpointsRequest = void 0;
|
|
4
|
+
const smart_buffer_1 = require("smart-buffer");
|
|
5
|
+
const Constants_1 = require("../../Constants");
|
|
6
|
+
const ProtocolUtil_1 = require("../../ProtocolUtil");
|
|
7
|
+
const ExceptionBreakpointFilterType = {
|
|
8
|
+
'1': 'caught',
|
|
9
|
+
'2': 'uncaught',
|
|
10
|
+
caught: 1,
|
|
11
|
+
uncaught: 2
|
|
12
|
+
};
|
|
13
|
+
class SetExceptionBreakpointsRequest {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.success = false;
|
|
16
|
+
/**
|
|
17
|
+
* How many bytes were read by the `fromBuffer` method. Only populated when constructed by `fromBuffer`
|
|
18
|
+
*/
|
|
19
|
+
this.readOffset = undefined;
|
|
20
|
+
this.data = {
|
|
21
|
+
breakpoints: undefined,
|
|
22
|
+
//common props
|
|
23
|
+
packetLength: undefined,
|
|
24
|
+
requestId: undefined,
|
|
25
|
+
command: Constants_1.Command.SetExceptionBreakpoints
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static fromJson(data) {
|
|
29
|
+
var _a;
|
|
30
|
+
var _b;
|
|
31
|
+
const request = new SetExceptionBreakpointsRequest();
|
|
32
|
+
ProtocolUtil_1.protocolUtil.loadJson(request, data);
|
|
33
|
+
(_a = (_b = request.data).breakpoints) !== null && _a !== void 0 ? _a : (_b.breakpoints = []);
|
|
34
|
+
return request;
|
|
35
|
+
}
|
|
36
|
+
static fromBuffer(buffer) {
|
|
37
|
+
const request = new SetExceptionBreakpointsRequest();
|
|
38
|
+
ProtocolUtil_1.protocolUtil.bufferLoaderHelper(request, buffer, 12, (smartBuffer) => {
|
|
39
|
+
ProtocolUtil_1.protocolUtil.loadCommonRequestFields(request, smartBuffer);
|
|
40
|
+
const numBreakpoints = smartBuffer.readUInt32LE(); // num_breakpoints
|
|
41
|
+
request.data.breakpoints = [];
|
|
42
|
+
for (let i = 0; i < numBreakpoints; i++) {
|
|
43
|
+
const filterTypeId = smartBuffer.readUInt32LE();
|
|
44
|
+
request.data.breakpoints.push({
|
|
45
|
+
filter: ExceptionBreakpointFilterType[filterTypeId],
|
|
46
|
+
conditionExpression: ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer) // cond_expr
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return request;
|
|
51
|
+
}
|
|
52
|
+
toBuffer() {
|
|
53
|
+
var _a;
|
|
54
|
+
const smartBuffer = new smart_buffer_1.SmartBuffer();
|
|
55
|
+
smartBuffer.writeUInt32LE(this.data.breakpoints.length); // num_breakpoints
|
|
56
|
+
for (const breakpoint of this.data.breakpoints) {
|
|
57
|
+
const filterTypeId = ExceptionBreakpointFilterType[breakpoint.filter];
|
|
58
|
+
smartBuffer.writeUInt32LE(filterTypeId); // filter
|
|
59
|
+
smartBuffer.writeStringNT((_a = breakpoint.conditionExpression) !== null && _a !== void 0 ? _a : ''); // cond_expr
|
|
60
|
+
}
|
|
61
|
+
ProtocolUtil_1.protocolUtil.insertCommonRequestFields(this, smartBuffer);
|
|
62
|
+
return smartBuffer.toBuffer();
|
|
63
|
+
}
|
|
64
|
+
filterToNumber(filter) {
|
|
65
|
+
switch (filter) {
|
|
66
|
+
case 'caught': return 1;
|
|
67
|
+
case 'uncaught': return 2;
|
|
68
|
+
default: throw new Error(`Unknown filter: ${filter}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.SetExceptionBreakpointsRequest = SetExceptionBreakpointsRequest;
|
|
73
|
+
//# sourceMappingURL=SetExceptionBreakpointsRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetExceptionBreakpointsRequest.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/requests/SetExceptionBreakpointsRequest.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,+CAA0C;AAC1C,qDAAkD;AAGlD,MAAM,6BAA6B,GAAG;IAClC,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,UAAU;IACf,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;CACd,CAAC;AAEF,MAAa,8BAA8B;IAA3C;QAoDW,YAAO,GAAG,KAAK,CAAC;QACvB;;WAEG;QACI,eAAU,GAAW,SAAS,CAAC;QAE/B,SAAI,GAAG;YACV,WAAW,EAAE,SAGX;YAEF,cAAc;YACd,YAAY,EAAE,SAAmB;YACjC,SAAS,EAAE,SAAmB;YAC9B,OAAO,EAAE,mBAAO,CAAC,uBAAuB;SAC3C,CAAC;IACN,CAAC;IAnEU,MAAM,CAAC,QAAQ,CAAC,IAGtB;;;QACG,MAAM,OAAO,GAAG,IAAI,8BAA8B,EAAE,CAAC;QACrD,2BAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrC,YAAA,OAAO,CAAC,IAAI,EAAC,WAAW,uCAAX,WAAW,GAAK,EAAE,EAAC;QAChC,OAAO,OAAO,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,MAAc;QACnC,MAAM,OAAO,GAAG,IAAI,8BAA8B,EAAE,CAAC;QACrD,2BAAY,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE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MAAM,EAAE;YACZ,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC;YACxB,KAAK,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;YAC1B,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;SACzD;IACL,CAAC;CAmBJ;AArED,wEAqEC"}
|
|
@@ -6,11 +6,13 @@ export declare class VariablesRequest implements ProtocolRequest {
|
|
|
6
6
|
requestId: number;
|
|
7
7
|
getChildKeys: boolean;
|
|
8
8
|
enableForceCaseInsensitivity: boolean;
|
|
9
|
+
getVirtualKeys: boolean;
|
|
9
10
|
threadIndex: number;
|
|
10
11
|
stackFrameIndex: number;
|
|
11
12
|
variablePathEntries: Array<{
|
|
12
13
|
name: string;
|
|
13
14
|
forceCaseInsensitive: boolean;
|
|
15
|
+
isVirtual: boolean;
|
|
14
16
|
}>;
|
|
15
17
|
}): VariablesRequest;
|
|
16
18
|
static fromBuffer(buffer: Buffer): VariablesRequest;
|
|
@@ -29,6 +31,14 @@ export declare class VariablesRequest implements ProtocolRequest {
|
|
|
29
31
|
* Enables the client application to send path_force_case_insensitive data for each variable
|
|
30
32
|
*/
|
|
31
33
|
enableForceCaseInsensitivity: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Indicates whether the VARIABLES response should include virtual keys for the requested path
|
|
36
|
+
*/
|
|
37
|
+
getVirtualKeys: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Enables the client application to send path_is_virtual data
|
|
40
|
+
*/
|
|
41
|
+
includesVirtualPath: boolean;
|
|
32
42
|
/**
|
|
33
43
|
* The index of the thread containing the variable.
|
|
34
44
|
*/
|
|
@@ -47,6 +57,7 @@ export declare class VariablesRequest implements ProtocolRequest {
|
|
|
47
57
|
variablePathEntries: {
|
|
48
58
|
name: string;
|
|
49
59
|
forceCaseInsensitive: boolean;
|
|
60
|
+
isVirtual?: boolean;
|
|
50
61
|
}[];
|
|
51
62
|
packetLength: number;
|
|
52
63
|
requestId: number;
|
|
@@ -54,6 +65,21 @@ export declare class VariablesRequest implements ProtocolRequest {
|
|
|
54
65
|
};
|
|
55
66
|
}
|
|
56
67
|
export declare enum VariableRequestFlag {
|
|
68
|
+
/**
|
|
69
|
+
* Indicates whether the VARIABLES response includes the child keys for container types like
|
|
70
|
+
* lists and associative arrays. If this is set to true (0x01), the VARIABLES response include the child keys.
|
|
71
|
+
*/
|
|
57
72
|
GetChildKeys = 1,
|
|
58
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Enables the client application to send path_force_case_insensitive data
|
|
75
|
+
*/
|
|
76
|
+
CaseSensitivityOptions = 2,
|
|
77
|
+
/**
|
|
78
|
+
* Indicates whether the VARIABLES response should include virtual keys for the requested path
|
|
79
|
+
*/
|
|
80
|
+
GetVirtualKeys = 4,
|
|
81
|
+
/**
|
|
82
|
+
* Enables the client application to send path_is_virtual data
|
|
83
|
+
*/
|
|
84
|
+
VirtualPathIncluded = 8
|
|
59
85
|
}
|
|
@@ -21,6 +21,14 @@ class VariablesRequest {
|
|
|
21
21
|
* Enables the client application to send path_force_case_insensitive data for each variable
|
|
22
22
|
*/
|
|
23
23
|
enableForceCaseInsensitivity: undefined,
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether the VARIABLES response should include virtual keys for the requested path
|
|
26
|
+
*/
|
|
27
|
+
getVirtualKeys: undefined,
|
|
28
|
+
/**
|
|
29
|
+
* Enables the client application to send path_is_virtual data
|
|
30
|
+
*/
|
|
31
|
+
includesVirtualPath: undefined,
|
|
24
32
|
/**
|
|
25
33
|
* The index of the thread containing the variable.
|
|
26
34
|
*/
|
|
@@ -44,11 +52,12 @@ class VariablesRequest {
|
|
|
44
52
|
};
|
|
45
53
|
}
|
|
46
54
|
static fromJson(data) {
|
|
47
|
-
var _a, _b;
|
|
48
|
-
var
|
|
55
|
+
var _a, _b, _c;
|
|
56
|
+
var _d;
|
|
49
57
|
const request = new VariablesRequest();
|
|
50
58
|
ProtocolUtil_1.protocolUtil.loadJson(request, data);
|
|
51
|
-
(_a = (
|
|
59
|
+
(_a = (_d = request.data).variablePathEntries) !== null && _a !== void 0 ? _a : (_d.variablePathEntries = []);
|
|
60
|
+
request.data.includesVirtualPath = request.data.variablePathEntries.some((entry) => entry.isVirtual);
|
|
52
61
|
// all variables will be case sensitive if the flag is disabled
|
|
53
62
|
for (const entry of request.data.variablePathEntries) {
|
|
54
63
|
if (request.data.enableForceCaseInsensitivity !== true) {
|
|
@@ -58,6 +67,8 @@ class VariablesRequest {
|
|
|
58
67
|
//default any missing values to false
|
|
59
68
|
(_b = entry.forceCaseInsensitive) !== null && _b !== void 0 ? _b : (entry.forceCaseInsensitive = false);
|
|
60
69
|
}
|
|
70
|
+
//default any missing values to false
|
|
71
|
+
(_c = entry.isVirtual) !== null && _c !== void 0 ? _c : (entry.isVirtual = false);
|
|
61
72
|
}
|
|
62
73
|
return request;
|
|
63
74
|
}
|
|
@@ -68,6 +79,8 @@ class VariablesRequest {
|
|
|
68
79
|
const variableRequestFlags = smartBuffer.readUInt8(); // variable_request_flags
|
|
69
80
|
request.data.getChildKeys = !!(variableRequestFlags & VariableRequestFlag.GetChildKeys);
|
|
70
81
|
request.data.enableForceCaseInsensitivity = !!(variableRequestFlags & VariableRequestFlag.CaseSensitivityOptions);
|
|
82
|
+
request.data.getVirtualKeys = !!(variableRequestFlags & VariableRequestFlag.GetVirtualKeys);
|
|
83
|
+
request.data.includesVirtualPath = !!(variableRequestFlags & VariableRequestFlag.VirtualPathIncluded);
|
|
71
84
|
request.data.threadIndex = smartBuffer.readUInt32LE(); // thread_index
|
|
72
85
|
request.data.stackFrameIndex = smartBuffer.readUInt32LE(); // stack_frame_index
|
|
73
86
|
const variablePathLength = smartBuffer.readUInt32LE(); // variable_path_len
|
|
@@ -77,7 +90,8 @@ class VariablesRequest {
|
|
|
77
90
|
request.data.variablePathEntries.push({
|
|
78
91
|
name: ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer),
|
|
79
92
|
//by default, all variable lookups are case SENSITIVE
|
|
80
|
-
forceCaseInsensitive: false
|
|
93
|
+
forceCaseInsensitive: false,
|
|
94
|
+
isVirtual: false
|
|
81
95
|
});
|
|
82
96
|
}
|
|
83
97
|
//get the case sensitive settings for each part of the path
|
|
@@ -87,16 +101,25 @@ class VariablesRequest {
|
|
|
87
101
|
request.data.variablePathEntries[i].forceCaseInsensitive = smartBuffer.readUInt8() === 0 ? false : true;
|
|
88
102
|
}
|
|
89
103
|
}
|
|
104
|
+
if (request.data.includesVirtualPath) {
|
|
105
|
+
for (let i = 0; i < variablePathLength; i++) {
|
|
106
|
+
//0 means this is not a virtual variable, 1 means it's a virtual variable and must be request as such when making a variables request
|
|
107
|
+
request.data.variablePathEntries[i].isVirtual = smartBuffer.readUInt8() === 0 ? false : true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
90
110
|
}
|
|
91
111
|
});
|
|
92
112
|
return request;
|
|
93
113
|
}
|
|
94
114
|
toBuffer() {
|
|
95
115
|
const smartBuffer = new smart_buffer_1.SmartBuffer();
|
|
116
|
+
const includesVirtualPath = this.data.variablePathEntries.some((entry) => entry.isVirtual);
|
|
96
117
|
//build the flags var
|
|
97
118
|
let variableRequestFlags = 0;
|
|
98
119
|
variableRequestFlags |= this.data.getChildKeys ? VariableRequestFlag.GetChildKeys : 0;
|
|
99
120
|
variableRequestFlags |= this.data.enableForceCaseInsensitivity ? VariableRequestFlag.CaseSensitivityOptions : 0;
|
|
121
|
+
variableRequestFlags |= this.data.getVirtualKeys ? VariableRequestFlag.GetVirtualKeys : 0;
|
|
122
|
+
variableRequestFlags |= includesVirtualPath ? VariableRequestFlag.VirtualPathIncluded : 0;
|
|
100
123
|
smartBuffer.writeUInt8(variableRequestFlags); // variable_request_flags
|
|
101
124
|
smartBuffer.writeUInt32LE(this.data.threadIndex); // thread_index
|
|
102
125
|
smartBuffer.writeUInt32LE(this.data.stackFrameIndex); // stack_frame_index
|
|
@@ -110,6 +133,11 @@ class VariablesRequest {
|
|
|
110
133
|
smartBuffer.writeUInt8(entry.forceCaseInsensitive !== true ? 0 : 1);
|
|
111
134
|
}
|
|
112
135
|
}
|
|
136
|
+
if (includesVirtualPath) {
|
|
137
|
+
for (const entry of this.data.variablePathEntries) {
|
|
138
|
+
smartBuffer.writeUInt8(entry.isVirtual !== true ? 0 : 1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
113
141
|
ProtocolUtil_1.protocolUtil.insertCommonRequestFields(this, smartBuffer);
|
|
114
142
|
return smartBuffer.toBuffer();
|
|
115
143
|
}
|
|
@@ -117,7 +145,22 @@ class VariablesRequest {
|
|
|
117
145
|
exports.VariablesRequest = VariablesRequest;
|
|
118
146
|
var VariableRequestFlag;
|
|
119
147
|
(function (VariableRequestFlag) {
|
|
148
|
+
/**
|
|
149
|
+
* Indicates whether the VARIABLES response includes the child keys for container types like
|
|
150
|
+
* lists and associative arrays. If this is set to true (0x01), the VARIABLES response include the child keys.
|
|
151
|
+
*/
|
|
120
152
|
VariableRequestFlag[VariableRequestFlag["GetChildKeys"] = 1] = "GetChildKeys";
|
|
153
|
+
/**
|
|
154
|
+
* Enables the client application to send path_force_case_insensitive data
|
|
155
|
+
*/
|
|
121
156
|
VariableRequestFlag[VariableRequestFlag["CaseSensitivityOptions"] = 2] = "CaseSensitivityOptions";
|
|
157
|
+
/**
|
|
158
|
+
* Indicates whether the VARIABLES response should include virtual keys for the requested path
|
|
159
|
+
*/
|
|
160
|
+
VariableRequestFlag[VariableRequestFlag["GetVirtualKeys"] = 4] = "GetVirtualKeys";
|
|
161
|
+
/**
|
|
162
|
+
* Enables the client application to send path_is_virtual data
|
|
163
|
+
*/
|
|
164
|
+
VariableRequestFlag[VariableRequestFlag["VirtualPathIncluded"] = 8] = "VirtualPathIncluded";
|
|
122
165
|
})(VariableRequestFlag = exports.VariableRequestFlag || (exports.VariableRequestFlag = {}));
|
|
123
166
|
//# sourceMappingURL=VariablesRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariablesRequest.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/requests/VariablesRequest.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA2C;AAC3C,+CAA0C;AAC1C,qDAAkD;AAGlD,MAAa,gBAAgB;IAA7B;
|
|
1
|
+
{"version":3,"file":"VariablesRequest.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/requests/VariablesRequest.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA2C;AAC3C,+CAA0C;AAC1C,qDAAkD;AAGlD,MAAa,gBAAgB;IAA7B;QAkHW,YAAO,GAAG,KAAK,CAAC;QACvB;;WAEG;QACI,eAAU,GAAW,SAAS,CAAC;QAE/B,SAAI,GAAG;YACV;;eAEG;YACH,YAAY,EAAE,SAAoB;YAElC;;eAEG;YACH,4BAA4B,EAAE,SAAoB;YAElD;;eAEG;YACH,cAAc,EAAE,SAAoB;YAEpC;;eAEG;YACH,mBAAmB,EAAE,SAAoB;YAEzC;;eAEG;YACH,WAAW,EAAE,SAAmB;YAChC;;;;eAIG;YACH,eAAe,EAAE,SAAmB;YAEpC;;;;eAIG;YACH,mBAAmB,EAAE,SAInB;YAEF,cAAc;YACd,YAAY,EAAE,SAAmB;YACjC,SAAS,EAAE,SAAmB;YAC9B,OAAO,EAAE,mBAAO,CAAC,SAAS;SAC7B,CAAC;IACN,CAAC;IAtKU,MAAM,CAAC,QAAQ,CAAC,IAYtB;;;QACG,MAAM,OAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;QACvC,2BAAY,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACrC,YAAA,OAAO,CAAC,IAAI,EAAC,mBAAmB,uCAAnB,mBAAmB,GAAK,EAAE,EAAC;QACxC,OAAO,CAAC,IAAI,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK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IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC/C,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,mCAAmC;SAC7E;QACD,IAAI,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE;YACxC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC/C,sEAAsE;gBACtE,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,oBAAoB,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvE;SAEJ;QAED,IAAI,mBAAmB,EAAE;YACrB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;gBAC/C,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC5D;SACJ;QAED,2BAAY,CAAC,yBAAyB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC1D,OAAO,WAAW,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;CAwDJ;AAxKD,4CAwKC;AAED,IAAY,mBAkBX;AAlBD,WAAY,mBAAmB;IAC3B;;;OAGG;IACH,6EAAgB,CAAA;IAChB;;OAEG;IACH,iGAA0B,CAAA;IAC1B;;OAEG;IACH,iFAAkB,CAAA;IAClB;;OAEG;IACH,2FAAuB,CAAA;AAC3B,CAAC,EAlBW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAkB9B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ErrorCode } from '../../Constants';
|
|
3
|
+
import type { ProtocolResponse } from '../ProtocolEvent';
|
|
4
|
+
export declare class SetExceptionBreakpointsResponse implements ProtocolResponse {
|
|
5
|
+
static fromJson(data: {
|
|
6
|
+
requestId: number;
|
|
7
|
+
breakpoints: BreakpointInfo[];
|
|
8
|
+
}): SetExceptionBreakpointsResponse;
|
|
9
|
+
static fromBuffer(buffer: Buffer): SetExceptionBreakpointsResponse;
|
|
10
|
+
toBuffer(): Buffer;
|
|
11
|
+
success: boolean;
|
|
12
|
+
readOffset: number;
|
|
13
|
+
data: {
|
|
14
|
+
breakpoints: BreakpointInfo[];
|
|
15
|
+
packetLength: number;
|
|
16
|
+
requestId: number;
|
|
17
|
+
errorCode: ErrorCode;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface BreakpointInfo {
|
|
21
|
+
/**
|
|
22
|
+
* The filter for the breakpoint
|
|
23
|
+
*/
|
|
24
|
+
filter: number;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates whether the breakpoint was successfully returned. This may be one of the following values:
|
|
27
|
+
* - `0` (`'OK'`) - The breakpoint_id is valid.
|
|
28
|
+
* - `5` (`'INVALID_ARGS'`) - The breakpoint could not be returned.
|
|
29
|
+
*/
|
|
30
|
+
errorCode: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetExceptionBreakpointsResponse = void 0;
|
|
4
|
+
const smart_buffer_1 = require("smart-buffer");
|
|
5
|
+
const Constants_1 = require("../../Constants");
|
|
6
|
+
const ProtocolUtil_1 = require("../../ProtocolUtil");
|
|
7
|
+
class SetExceptionBreakpointsResponse {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.success = false;
|
|
10
|
+
this.readOffset = 0;
|
|
11
|
+
this.data = {
|
|
12
|
+
breakpoints: [],
|
|
13
|
+
// response fields
|
|
14
|
+
packetLength: undefined,
|
|
15
|
+
requestId: undefined,
|
|
16
|
+
errorCode: Constants_1.ErrorCode.OK
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static fromJson(data) {
|
|
20
|
+
var _a;
|
|
21
|
+
var _b;
|
|
22
|
+
const response = new SetExceptionBreakpointsResponse();
|
|
23
|
+
ProtocolUtil_1.protocolUtil.loadJson(response, data);
|
|
24
|
+
(_a = (_b = response.data).breakpoints) !== null && _a !== void 0 ? _a : (_b.breakpoints = []);
|
|
25
|
+
return response;
|
|
26
|
+
}
|
|
27
|
+
static fromBuffer(buffer) {
|
|
28
|
+
const response = new SetExceptionBreakpointsResponse();
|
|
29
|
+
ProtocolUtil_1.protocolUtil.bufferLoaderHelper(response, buffer, 12, (smartBuffer) => {
|
|
30
|
+
ProtocolUtil_1.protocolUtil.loadCommonResponseFields(response, smartBuffer);
|
|
31
|
+
const numBreakpoints = smartBuffer.readUInt32LE(); // num_breakpoints
|
|
32
|
+
response.data.breakpoints = [];
|
|
33
|
+
// build the list of BreakpointInfo
|
|
34
|
+
for (let i = 0; i < numBreakpoints; i++) {
|
|
35
|
+
const breakpoint = {};
|
|
36
|
+
// filter
|
|
37
|
+
breakpoint.filter = smartBuffer.readUInt32LE();
|
|
38
|
+
// error_code - Indicates whether the breakpoint was successfully returned.
|
|
39
|
+
breakpoint.errorCode = smartBuffer.readUInt32LE();
|
|
40
|
+
response.data.breakpoints.push(breakpoint);
|
|
41
|
+
}
|
|
42
|
+
return response.data.breakpoints.length === numBreakpoints;
|
|
43
|
+
});
|
|
44
|
+
return response;
|
|
45
|
+
}
|
|
46
|
+
toBuffer() {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
const smartBuffer = new smart_buffer_1.SmartBuffer();
|
|
49
|
+
smartBuffer.writeUInt32LE((_b = (_a = this.data.breakpoints) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); // num_breakpoints
|
|
50
|
+
for (const breakpoint of (_c = this.data.breakpoints) !== null && _c !== void 0 ? _c : []) {
|
|
51
|
+
smartBuffer.writeUInt32LE(breakpoint.filter); // breakpoint_id
|
|
52
|
+
smartBuffer.writeUInt32LE(breakpoint.errorCode); // error_code
|
|
53
|
+
}
|
|
54
|
+
ProtocolUtil_1.protocolUtil.insertCommonResponseFields(this, smartBuffer);
|
|
55
|
+
return smartBuffer.toBuffer();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.SetExceptionBreakpointsResponse = SetExceptionBreakpointsResponse;
|
|
59
|
+
//# sourceMappingURL=SetExceptionBreakpointsResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetExceptionBreakpointsResponse.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/responses/SetExceptionBreakpointsResponse.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,+CAA4C;AAC5C,qDAAkD;AAGlD,MAAa,+BAA+B;IAA5C;QA8CW,YAAO,GAAG,KAAK,CAAC;QAEhB,eAAU,GAAG,CAAC,CAAC;QAEf,SAAI,GAAG;YACV,WAAW,EAAE,EAAsB;YAEnC,kBAAkB;YAClB,YAAY,EAAE,SAAmB;YACjC,SAAS,EAAE,SAAmB;YAC9B,SAAS,EAAE,qBAAS,CAAC,EAAE;SAC1B,CAAC;IACN,CAAC;IAxDU,MAAM,CAAC,QAAQ,CAAC,IAGtB;;;QACG,MAAM,QAAQ,GAAG,IAAI,+BAA+B,EAAE,CAAC;QACvD,2BAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtC,YAAA,QAAQ,CAAC,IAAI,EAAC,WAAW,uCAAX,WAAW,GAAK,EAAE,EAAC;QACjC,OAAO,QAAQ,CAAC;IACpB,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,MAAc;QACnC,MAAM,QAAQ,GAAG,IAAI,+BAA+B,EAAE,CAAC;QACvD,2BAAY,CAAC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,WAAwB,EAAE,EAAE;YAC/E,2BAAY,CAAC,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;YAC7D,MAAM,cAAc,GAAG,WAAW,CAAC,YAAY,EAAE,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
51
51
|
* @since protocol 3.1.0
|
|
52
52
|
*/
|
|
53
|
-
isKeysCaseSensitive = 64
|
|
53
|
+
isKeysCaseSensitive = 64,
|
|
54
|
+
/**
|
|
55
|
+
* Indicates whether the associated variable is virtual or not.
|
|
56
|
+
* @since protocol 3.3.0
|
|
57
|
+
*/
|
|
58
|
+
isVirtual = 128
|
|
54
59
|
}
|
|
55
60
|
/**
|
|
56
61
|
* Every type of variable supported by the protocol
|
|
@@ -104,6 +109,10 @@ export interface Variable {
|
|
|
104
109
|
* Is this variable a container var (i.e. an array or object with children)
|
|
105
110
|
*/
|
|
106
111
|
isContainer: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Indicates whether the associated variable is virtual or not.
|
|
114
|
+
*/
|
|
115
|
+
isVirtual?: boolean;
|
|
107
116
|
/**
|
|
108
117
|
* If the variable is a container, it will have child elements. this is the number of those children. If `.children` is set, this field will be set to undefined
|
|
109
118
|
* (meaning it will be ignored during serialization)
|
|
@@ -16,11 +16,11 @@ class VariablesResponse {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
static fromJson(data) {
|
|
19
|
-
var _a;
|
|
20
|
-
var
|
|
19
|
+
var _a, _b;
|
|
20
|
+
var _c;
|
|
21
21
|
const response = new VariablesResponse();
|
|
22
22
|
ProtocolUtil_1.protocolUtil.loadJson(response, data);
|
|
23
|
-
(_a = (
|
|
23
|
+
(_a = (_c = response.data).variables) !== null && _a !== void 0 ? _a : (_c.variables = []);
|
|
24
24
|
//validate that any object marked as `isContainer` either has an array of children or has an element count
|
|
25
25
|
for (const variable of response.flattenVariables(response.data.variables)) {
|
|
26
26
|
const hasChildrenArray = Array.isArray(variable.children);
|
|
@@ -36,6 +36,7 @@ class VariablesResponse {
|
|
|
36
36
|
if (variable.isContainer && util_1.util.isNullish(variable.childCount) && !hasChildrenArray) {
|
|
37
37
|
throw new Error('Container variable must have one of these properties defined: childCount, children');
|
|
38
38
|
}
|
|
39
|
+
(_b = variable.isVirtual) !== null && _b !== void 0 ? _b : (variable.isVirtual = false);
|
|
39
40
|
}
|
|
40
41
|
return response;
|
|
41
42
|
}
|
|
@@ -83,6 +84,7 @@ class VariablesResponse {
|
|
|
83
84
|
const isNameHere = (flags & VariableFlags.isNameHere) > 0;
|
|
84
85
|
const isRefCounted = (flags & VariableFlags.isRefCounted) > 0;
|
|
85
86
|
const isValueHere = (flags & VariableFlags.isValueHere) > 0;
|
|
87
|
+
variable.isVirtual = (flags & VariableFlags.isVirtual) > 0;
|
|
86
88
|
const variableTypeCode = smartBuffer.readUInt8();
|
|
87
89
|
variable.type = VariableTypeCode[variableTypeCode]; // variable_type
|
|
88
90
|
if (isNameHere) {
|
|
@@ -181,6 +183,7 @@ class VariablesResponse {
|
|
|
181
183
|
flags |= Array.isArray(variable.children) ? 0 : VariableFlags.isChildKey;
|
|
182
184
|
flags |= variable.isConst ? VariableFlags.isConst : 0;
|
|
183
185
|
flags |= variable.isContainer ? VariableFlags.isContainer : 0;
|
|
186
|
+
flags |= variable.isVirtual ? VariableFlags.isVirtual : 0;
|
|
184
187
|
const isNameHere = !util_1.util.isNullish(variable.name);
|
|
185
188
|
flags |= isNameHere ? VariableFlags.isNameHere : 0;
|
|
186
189
|
const isRefCounted = variable.refCount > 0;
|
|
@@ -285,6 +288,11 @@ var VariableFlags;
|
|
|
285
288
|
* @since protocol 3.1.0
|
|
286
289
|
*/
|
|
287
290
|
VariableFlags[VariableFlags["isKeysCaseSensitive"] = 64] = "isKeysCaseSensitive";
|
|
291
|
+
/**
|
|
292
|
+
* Indicates whether the associated variable is virtual or not.
|
|
293
|
+
* @since protocol 3.3.0
|
|
294
|
+
*/
|
|
295
|
+
VariableFlags[VariableFlags["isVirtual"] = 128] = "isVirtual";
|
|
288
296
|
})(VariableFlags = exports.VariableFlags || (exports.VariableFlags = {}));
|
|
289
297
|
/**
|
|
290
298
|
* Every type of variable supported by the protocol
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariablesResponse.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/responses/VariablesResponse.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA2C;AAC3C,wCAAqC;AACrC,+CAA4C;AAC5C,qDAAkD;AAGlD,MAAa,iBAAiB;IAA9B;
|
|
1
|
+
{"version":3,"file":"VariablesResponse.js","sourceRoot":"","sources":["../../../../src/debugProtocol/events/responses/VariablesResponse.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAA2C;AAC3C,wCAAqC;AACrC,+CAA4C;AAC5C,qDAAkD;AAGlD,MAAa,iBAAiB;IAA9B;QA2QW,YAAO,GAAG,KAAK,CAAC;QAEhB,eAAU,GAAG,CAAC,CAAC;QAEf,SAAI,GAAG;YACV,YAAY,EAAE,SAAmB;YACjC,SAAS,EAAE,qBAAS,CAAC,EAAE;SACD,CAAC;IAC/B,CAAC;IAjRU,MAAM,CAAC,QAAQ,CAAC,IAItB;;;QACG,MAAM,QAAQ,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACzC,2BAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtC,YAAA,QAAQ,CAAC,IAAI,EAAC,SAAS,uCAAT,SAAS,GAAK,EAAE,EAAC;QAC/B,0GAA0G;QAC1G,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;YACvE,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC1D,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,IAAI,gBAAgB,EAAE;gBAC7C,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;aAC/B;YACD,IAAI,gBAAgB,EAAE;gBAClB,OAAO,QAAQ,CAAC,UAAU,CAAC;aAC9B;YACD,IAAI,WAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE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nB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,2CAA2B,CAAA;IAC3B,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;IACzB,iDAAiC,CAAA;IACjC,+CAA+B,CAAA;IAC/B,mCAAmB,CAAA;AACvB,CAAC,EAlBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAkBvB;AAED;;GAEG;AACH,IAAK,gBAkBJ;AAlBD,WAAK,gBAAgB;IACjB,+EAAoB,CAAA;IACpB,yDAAS,CAAA;IACT,6DAAW,CAAA;IACX,2DAAU,CAAA;IACV,yDAAS,CAAA;IACT,+DAAY,CAAA;IACZ,6DAAW,CAAA;IACX,iEAAa,CAAA;IACb,6DAAW,CAAA;IACX,wDAAS,CAAA;IACT,sEAAgB,CAAA;IAChB,4DAAW,CAAA;IACX,4DAAW,CAAA;IACX,oEAAe,CAAA;IACf,4EAAmB,CAAA;IACnB,0EAAkB,CAAA;IAClB,8DAAY,CAAA;AAChB,CAAC,EAlBI,gBAAgB,KAAhB,gBAAgB,QAkBpB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ErrorCode, UpdateType } from '../../Constants';
|
|
3
|
+
/**
|
|
4
|
+
* Data sent as the data segment of message type: BREAKPOINT_ERROR
|
|
5
|
+
```
|
|
6
|
+
struct BreakpointErrorUpdateData {
|
|
7
|
+
uint32 flags; // Always 0, reserved for future use
|
|
8
|
+
uint32 breakpoint_id;
|
|
9
|
+
uint32 num_compile_errors;
|
|
10
|
+
utf8z[num_compile_errors] compile_errors;
|
|
11
|
+
uint32 num_runtime_errors;
|
|
12
|
+
utf8z[num_runtime_errors] runtime_errors;
|
|
13
|
+
uint32 num_other_errors; // E.g., permissions errors
|
|
14
|
+
utf8z[num_other_errors] other_errors;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
*/
|
|
18
|
+
export declare class ExceptionBreakpointErrorUpdate {
|
|
19
|
+
static fromJson(data: {
|
|
20
|
+
filterId: number;
|
|
21
|
+
compileErrors: string[];
|
|
22
|
+
runtimeErrors: string[];
|
|
23
|
+
otherErrors: string[];
|
|
24
|
+
lineNumber: number;
|
|
25
|
+
filePath: string;
|
|
26
|
+
}): ExceptionBreakpointErrorUpdate;
|
|
27
|
+
static fromBuffer(buffer: Buffer): ExceptionBreakpointErrorUpdate;
|
|
28
|
+
toBuffer(): Buffer;
|
|
29
|
+
success: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* How many bytes were read by the `fromBuffer` method. Only populated when constructed by `fromBuffer`
|
|
32
|
+
*/
|
|
33
|
+
readOffset: number;
|
|
34
|
+
data: {
|
|
35
|
+
filterId: number;
|
|
36
|
+
compileErrors: string[];
|
|
37
|
+
runtimeErrors: string[];
|
|
38
|
+
otherErrors: string[];
|
|
39
|
+
lineNumber: number;
|
|
40
|
+
filePath: string;
|
|
41
|
+
packetLength: number;
|
|
42
|
+
requestId: number;
|
|
43
|
+
errorCode: ErrorCode;
|
|
44
|
+
updateType: UpdateType;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExceptionBreakpointErrorUpdate = void 0;
|
|
4
|
+
const smart_buffer_1 = require("smart-buffer");
|
|
5
|
+
const Constants_1 = require("../../Constants");
|
|
6
|
+
const ProtocolUtil_1 = require("../../ProtocolUtil");
|
|
7
|
+
/**
|
|
8
|
+
* Data sent as the data segment of message type: BREAKPOINT_ERROR
|
|
9
|
+
```
|
|
10
|
+
struct BreakpointErrorUpdateData {
|
|
11
|
+
uint32 flags; // Always 0, reserved for future use
|
|
12
|
+
uint32 breakpoint_id;
|
|
13
|
+
uint32 num_compile_errors;
|
|
14
|
+
utf8z[num_compile_errors] compile_errors;
|
|
15
|
+
uint32 num_runtime_errors;
|
|
16
|
+
utf8z[num_runtime_errors] runtime_errors;
|
|
17
|
+
uint32 num_other_errors; // E.g., permissions errors
|
|
18
|
+
utf8z[num_other_errors] other_errors;
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
*/
|
|
22
|
+
class ExceptionBreakpointErrorUpdate {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.success = false;
|
|
25
|
+
/**
|
|
26
|
+
* How many bytes were read by the `fromBuffer` method. Only populated when constructed by `fromBuffer`
|
|
27
|
+
*/
|
|
28
|
+
this.readOffset = undefined;
|
|
29
|
+
this.data = {
|
|
30
|
+
filterId: undefined,
|
|
31
|
+
compileErrors: undefined,
|
|
32
|
+
runtimeErrors: undefined,
|
|
33
|
+
otherErrors: undefined,
|
|
34
|
+
lineNumber: undefined,
|
|
35
|
+
filePath: undefined,
|
|
36
|
+
//common props
|
|
37
|
+
packetLength: undefined,
|
|
38
|
+
requestId: 0,
|
|
39
|
+
errorCode: Constants_1.ErrorCode.OK,
|
|
40
|
+
updateType: Constants_1.UpdateType.BreakpointError
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static fromJson(data) {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
var _d, _e, _f;
|
|
46
|
+
const update = new ExceptionBreakpointErrorUpdate();
|
|
47
|
+
ProtocolUtil_1.protocolUtil.loadJson(update, data);
|
|
48
|
+
(_a = (_d = update.data).compileErrors) !== null && _a !== void 0 ? _a : (_d.compileErrors = []);
|
|
49
|
+
(_b = (_e = update.data).runtimeErrors) !== null && _b !== void 0 ? _b : (_e.runtimeErrors = []);
|
|
50
|
+
(_c = (_f = update.data).otherErrors) !== null && _c !== void 0 ? _c : (_f.otherErrors = []);
|
|
51
|
+
return update;
|
|
52
|
+
}
|
|
53
|
+
static fromBuffer(buffer) {
|
|
54
|
+
const update = new ExceptionBreakpointErrorUpdate();
|
|
55
|
+
ProtocolUtil_1.protocolUtil.bufferLoaderHelper(update, buffer, 20, (smartBuffer) => {
|
|
56
|
+
ProtocolUtil_1.protocolUtil.loadCommonUpdateFields(update, smartBuffer, update.data.updateType);
|
|
57
|
+
smartBuffer.readUInt32LE(); // flags - always 0, reserved for future use
|
|
58
|
+
update.data.filterId = smartBuffer.readUInt32LE(); // filter_id
|
|
59
|
+
const compileErrorCount = smartBuffer.readUInt32LE(); // num_compile_errors
|
|
60
|
+
update.data.compileErrors = [];
|
|
61
|
+
for (let i = 0; i < compileErrorCount; i++) {
|
|
62
|
+
update.data.compileErrors.push(ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer));
|
|
63
|
+
}
|
|
64
|
+
const runtimeErrorCount = smartBuffer.readUInt32LE(); // num_runtime_errors
|
|
65
|
+
update.data.runtimeErrors = [];
|
|
66
|
+
for (let i = 0; i < runtimeErrorCount; i++) {
|
|
67
|
+
update.data.runtimeErrors.push(ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer));
|
|
68
|
+
}
|
|
69
|
+
const otherErrorCount = smartBuffer.readUInt32LE(); // num_other_errors
|
|
70
|
+
update.data.otherErrors = [];
|
|
71
|
+
for (let i = 0; i < otherErrorCount; i++) {
|
|
72
|
+
update.data.otherErrors.push(ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer));
|
|
73
|
+
}
|
|
74
|
+
update.data.lineNumber = smartBuffer.readInt32LE(); // line_number
|
|
75
|
+
update.data.filePath = ProtocolUtil_1.protocolUtil.readStringNT(smartBuffer); //file_path
|
|
76
|
+
});
|
|
77
|
+
return update;
|
|
78
|
+
}
|
|
79
|
+
toBuffer() {
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
81
|
+
let smartBuffer = new smart_buffer_1.SmartBuffer();
|
|
82
|
+
smartBuffer.writeInt32LE(0); // flags - always 0, reserved for future use
|
|
83
|
+
smartBuffer.writeUInt32LE(this.data.filterId); // filter_id
|
|
84
|
+
smartBuffer.writeUInt32LE((_b = (_a = this.data.compileErrors) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0); // num_compile_errors
|
|
85
|
+
for (let error of (_c = this.data.compileErrors) !== null && _c !== void 0 ? _c : []) {
|
|
86
|
+
smartBuffer.writeStringNT(error);
|
|
87
|
+
}
|
|
88
|
+
smartBuffer.writeUInt32LE((_e = (_d = this.data.runtimeErrors) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0); // num_runtime_errors
|
|
89
|
+
for (let error of (_f = this.data.runtimeErrors) !== null && _f !== void 0 ? _f : []) {
|
|
90
|
+
smartBuffer.writeStringNT(error);
|
|
91
|
+
}
|
|
92
|
+
smartBuffer.writeUInt32LE((_h = (_g = this.data.otherErrors) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0); // num_other_errors
|
|
93
|
+
for (let error of (_j = this.data.otherErrors) !== null && _j !== void 0 ? _j : []) {
|
|
94
|
+
smartBuffer.writeStringNT(error);
|
|
95
|
+
}
|
|
96
|
+
smartBuffer.writeInt32LE(this.data.lineNumber); // line_number
|
|
97
|
+
smartBuffer.writeStringNT(this.data.filePath); //file_path
|
|
98
|
+
ProtocolUtil_1.protocolUtil.insertCommonUpdateFields(this, smartBuffer);
|
|
99
|
+
return smartBuffer.toBuffer();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.ExceptionBreakpointErrorUpdate = ExceptionBreakpointErrorUpdate;
|
|
103
|
+
//# sourceMappingURL=ExceptionBreakpointErrorUpdate.js.map
|