@rstreamlabs/webtty 1.7.0 → 1.9.0
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/README.md +218 -8
- package/dist/chunk-7OHAFDJE.mjs +10679 -0
- package/dist/index.d.mts +5157 -5
- package/dist/index.d.ts +5157 -5
- package/dist/index.js +7989 -669
- package/dist/index.mjs +66 -3372
- package/dist/node.d.mts +38 -0
- package/dist/node.d.ts +38 -0
- package/dist/node.js +11129 -0
- package/dist/node.mjs +451 -0
- package/package.json +14 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3384 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (message.sendHeartbeat != null && Object.hasOwnProperty.call(message, "sendHeartbeat"))
|
|
41
|
-
writer.uint32(
|
|
42
|
-
/* id 3, wireType 0 =*/
|
|
43
|
-
24
|
|
44
|
-
).bool(message.sendHeartbeat);
|
|
45
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
46
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
47
|
-
writer.raw(message.$unknowns[i]);
|
|
48
|
-
return writer;
|
|
49
|
-
};
|
|
50
|
-
Options.encodeDelimited = function encodeDelimited(message, writer) {
|
|
51
|
-
return this.encode(message, writer).ldelim();
|
|
52
|
-
};
|
|
53
|
-
Options.decode = function decode(reader, length, _end, _depth, _target) {
|
|
54
|
-
if (!(reader instanceof $Reader))
|
|
55
|
-
reader = $Reader.create(reader);
|
|
56
|
-
if (_depth === void 0)
|
|
57
|
-
_depth = 0;
|
|
58
|
-
if (_depth > $Reader.recursionLimit)
|
|
59
|
-
throw Error("max depth exceeded");
|
|
60
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Options(), value;
|
|
61
|
-
while (reader.pos < end) {
|
|
62
|
-
let start = reader.pos;
|
|
63
|
-
let tag = reader.tag();
|
|
64
|
-
if (tag === _end) {
|
|
65
|
-
_end = void 0;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
let wireType = tag & 7;
|
|
69
|
-
switch (tag >>>= 3) {
|
|
70
|
-
case 1: {
|
|
71
|
-
if (wireType !== 0)
|
|
72
|
-
break;
|
|
73
|
-
if (value = reader.bool())
|
|
74
|
-
message.interactive = value;
|
|
75
|
-
else
|
|
76
|
-
delete message.interactive;
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
case 2: {
|
|
80
|
-
if (wireType !== 0)
|
|
81
|
-
break;
|
|
82
|
-
if (value = reader.bool())
|
|
83
|
-
message.allocateTty = value;
|
|
84
|
-
else
|
|
85
|
-
delete message.allocateTty;
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
case 3: {
|
|
89
|
-
if (wireType !== 0)
|
|
90
|
-
break;
|
|
91
|
-
if (value = reader.bool())
|
|
92
|
-
message.sendHeartbeat = value;
|
|
93
|
-
else
|
|
94
|
-
delete message.sendHeartbeat;
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
reader.skipType(wireType, _depth, tag);
|
|
99
|
-
$util.makeProp(message, "$unknowns", false);
|
|
100
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
101
|
-
}
|
|
102
|
-
if (_end !== void 0)
|
|
103
|
-
throw Error("missing end group");
|
|
104
|
-
return message;
|
|
105
|
-
};
|
|
106
|
-
Options.decodeDelimited = function decodeDelimited(reader) {
|
|
107
|
-
if (!(reader instanceof $Reader))
|
|
108
|
-
reader = new $Reader(reader);
|
|
109
|
-
return this.decode(reader, reader.uint32());
|
|
110
|
-
};
|
|
111
|
-
Options.verify = function verify(message, _depth) {
|
|
112
|
-
if (typeof message !== "object" || message === null)
|
|
113
|
-
return "object expected";
|
|
114
|
-
if (_depth === void 0)
|
|
115
|
-
_depth = 0;
|
|
116
|
-
if (_depth > $util.recursionLimit)
|
|
117
|
-
return "max depth exceeded";
|
|
118
|
-
if (message.interactive != null && message.hasOwnProperty("interactive")) {
|
|
119
|
-
if (typeof message.interactive !== "boolean")
|
|
120
|
-
return "interactive: boolean expected";
|
|
121
|
-
}
|
|
122
|
-
if (message.allocateTty != null && message.hasOwnProperty("allocateTty")) {
|
|
123
|
-
if (typeof message.allocateTty !== "boolean")
|
|
124
|
-
return "allocateTty: boolean expected";
|
|
125
|
-
}
|
|
126
|
-
if (message.sendHeartbeat != null && message.hasOwnProperty("sendHeartbeat")) {
|
|
127
|
-
if (typeof message.sendHeartbeat !== "boolean")
|
|
128
|
-
return "sendHeartbeat: boolean expected";
|
|
129
|
-
}
|
|
130
|
-
return null;
|
|
131
|
-
};
|
|
132
|
-
Options.fromObject = function fromObject(object, _depth) {
|
|
133
|
-
if (object instanceof $root.rstream.webtty.protobuf.Options)
|
|
134
|
-
return object;
|
|
135
|
-
if (_depth === void 0)
|
|
136
|
-
_depth = 0;
|
|
137
|
-
if (_depth > $util.recursionLimit)
|
|
138
|
-
throw Error("max depth exceeded");
|
|
139
|
-
let message = new $root.rstream.webtty.protobuf.Options();
|
|
140
|
-
if (object.interactive != null) {
|
|
141
|
-
if (object.interactive)
|
|
142
|
-
message.interactive = Boolean(object.interactive);
|
|
143
|
-
}
|
|
144
|
-
if (object.allocateTty != null) {
|
|
145
|
-
if (object.allocateTty)
|
|
146
|
-
message.allocateTty = Boolean(object.allocateTty);
|
|
147
|
-
}
|
|
148
|
-
if (object.sendHeartbeat != null) {
|
|
149
|
-
if (object.sendHeartbeat)
|
|
150
|
-
message.sendHeartbeat = Boolean(object.sendHeartbeat);
|
|
151
|
-
}
|
|
152
|
-
return message;
|
|
153
|
-
};
|
|
154
|
-
Options.toObject = function toObject(message, options) {
|
|
155
|
-
if (!options)
|
|
156
|
-
options = {};
|
|
157
|
-
let object = {};
|
|
158
|
-
if (options.defaults) {
|
|
159
|
-
object.interactive = false;
|
|
160
|
-
object.allocateTty = false;
|
|
161
|
-
object.sendHeartbeat = false;
|
|
162
|
-
}
|
|
163
|
-
if (message.interactive != null && message.hasOwnProperty("interactive"))
|
|
164
|
-
object.interactive = message.interactive;
|
|
165
|
-
if (message.allocateTty != null && message.hasOwnProperty("allocateTty"))
|
|
166
|
-
object.allocateTty = message.allocateTty;
|
|
167
|
-
if (message.sendHeartbeat != null && message.hasOwnProperty("sendHeartbeat"))
|
|
168
|
-
object.sendHeartbeat = message.sendHeartbeat;
|
|
169
|
-
return object;
|
|
170
|
-
};
|
|
171
|
-
Options.prototype.toJSON = function toJSON() {
|
|
172
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
173
|
-
};
|
|
174
|
-
Options.getTypeUrl = function getTypeUrl(prefix) {
|
|
175
|
-
if (prefix === void 0)
|
|
176
|
-
prefix = "type.googleapis.com";
|
|
177
|
-
return prefix + "/rstream.webtty.protobuf.Options";
|
|
178
|
-
};
|
|
179
|
-
return Options;
|
|
180
|
-
})();
|
|
181
|
-
protobuf.Environment = (function() {
|
|
182
|
-
function Environment(properties) {
|
|
183
|
-
if (properties) {
|
|
184
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
185
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
186
|
-
this[keys[i]] = properties[keys[i]];
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
Environment.prototype.key = "";
|
|
190
|
-
Environment.prototype.value = "";
|
|
191
|
-
Environment.create = function create(properties) {
|
|
192
|
-
return new Environment(properties);
|
|
193
|
-
};
|
|
194
|
-
Environment.encode = function encode(message, writer) {
|
|
195
|
-
if (!writer)
|
|
196
|
-
writer = $Writer.create();
|
|
197
|
-
if (message.key != null && Object.hasOwnProperty.call(message, "key"))
|
|
198
|
-
writer.uint32(
|
|
199
|
-
/* id 1, wireType 2 =*/
|
|
200
|
-
10
|
|
201
|
-
).string(message.key);
|
|
202
|
-
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
203
|
-
writer.uint32(
|
|
204
|
-
/* id 2, wireType 2 =*/
|
|
205
|
-
18
|
|
206
|
-
).string(message.value);
|
|
207
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
208
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
209
|
-
writer.raw(message.$unknowns[i]);
|
|
210
|
-
return writer;
|
|
211
|
-
};
|
|
212
|
-
Environment.encodeDelimited = function encodeDelimited(message, writer) {
|
|
213
|
-
return this.encode(message, writer).ldelim();
|
|
214
|
-
};
|
|
215
|
-
Environment.decode = function decode(reader, length, _end, _depth, _target) {
|
|
216
|
-
if (!(reader instanceof $Reader))
|
|
217
|
-
reader = $Reader.create(reader);
|
|
218
|
-
if (_depth === void 0)
|
|
219
|
-
_depth = 0;
|
|
220
|
-
if (_depth > $Reader.recursionLimit)
|
|
221
|
-
throw Error("max depth exceeded");
|
|
222
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Environment(), value;
|
|
223
|
-
while (reader.pos < end) {
|
|
224
|
-
let start = reader.pos;
|
|
225
|
-
let tag = reader.tag();
|
|
226
|
-
if (tag === _end) {
|
|
227
|
-
_end = void 0;
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
let wireType = tag & 7;
|
|
231
|
-
switch (tag >>>= 3) {
|
|
232
|
-
case 1: {
|
|
233
|
-
if (wireType !== 2)
|
|
234
|
-
break;
|
|
235
|
-
if ((value = reader.string()).length)
|
|
236
|
-
message.key = value;
|
|
237
|
-
else
|
|
238
|
-
delete message.key;
|
|
239
|
-
continue;
|
|
240
|
-
}
|
|
241
|
-
case 2: {
|
|
242
|
-
if (wireType !== 2)
|
|
243
|
-
break;
|
|
244
|
-
if ((value = reader.string()).length)
|
|
245
|
-
message.value = value;
|
|
246
|
-
else
|
|
247
|
-
delete message.value;
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
reader.skipType(wireType, _depth, tag);
|
|
252
|
-
$util.makeProp(message, "$unknowns", false);
|
|
253
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
254
|
-
}
|
|
255
|
-
if (_end !== void 0)
|
|
256
|
-
throw Error("missing end group");
|
|
257
|
-
return message;
|
|
258
|
-
};
|
|
259
|
-
Environment.decodeDelimited = function decodeDelimited(reader) {
|
|
260
|
-
if (!(reader instanceof $Reader))
|
|
261
|
-
reader = new $Reader(reader);
|
|
262
|
-
return this.decode(reader, reader.uint32());
|
|
263
|
-
};
|
|
264
|
-
Environment.verify = function verify(message, _depth) {
|
|
265
|
-
if (typeof message !== "object" || message === null)
|
|
266
|
-
return "object expected";
|
|
267
|
-
if (_depth === void 0)
|
|
268
|
-
_depth = 0;
|
|
269
|
-
if (_depth > $util.recursionLimit)
|
|
270
|
-
return "max depth exceeded";
|
|
271
|
-
if (message.key != null && message.hasOwnProperty("key")) {
|
|
272
|
-
if (!$util.isString(message.key))
|
|
273
|
-
return "key: string expected";
|
|
274
|
-
}
|
|
275
|
-
if (message.value != null && message.hasOwnProperty("value")) {
|
|
276
|
-
if (!$util.isString(message.value))
|
|
277
|
-
return "value: string expected";
|
|
278
|
-
}
|
|
279
|
-
return null;
|
|
280
|
-
};
|
|
281
|
-
Environment.fromObject = function fromObject(object, _depth) {
|
|
282
|
-
if (object instanceof $root.rstream.webtty.protobuf.Environment)
|
|
283
|
-
return object;
|
|
284
|
-
if (_depth === void 0)
|
|
285
|
-
_depth = 0;
|
|
286
|
-
if (_depth > $util.recursionLimit)
|
|
287
|
-
throw Error("max depth exceeded");
|
|
288
|
-
let message = new $root.rstream.webtty.protobuf.Environment();
|
|
289
|
-
if (object.key != null) {
|
|
290
|
-
if (typeof object.key !== "string" || object.key.length)
|
|
291
|
-
message.key = String(object.key);
|
|
292
|
-
}
|
|
293
|
-
if (object.value != null) {
|
|
294
|
-
if (typeof object.value !== "string" || object.value.length)
|
|
295
|
-
message.value = String(object.value);
|
|
296
|
-
}
|
|
297
|
-
return message;
|
|
298
|
-
};
|
|
299
|
-
Environment.toObject = function toObject(message, options) {
|
|
300
|
-
if (!options)
|
|
301
|
-
options = {};
|
|
302
|
-
let object = {};
|
|
303
|
-
if (options.defaults) {
|
|
304
|
-
object.key = "";
|
|
305
|
-
object.value = "";
|
|
306
|
-
}
|
|
307
|
-
if (message.key != null && message.hasOwnProperty("key"))
|
|
308
|
-
object.key = message.key;
|
|
309
|
-
if (message.value != null && message.hasOwnProperty("value"))
|
|
310
|
-
object.value = message.value;
|
|
311
|
-
return object;
|
|
312
|
-
};
|
|
313
|
-
Environment.prototype.toJSON = function toJSON() {
|
|
314
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
315
|
-
};
|
|
316
|
-
Environment.getTypeUrl = function getTypeUrl(prefix) {
|
|
317
|
-
if (prefix === void 0)
|
|
318
|
-
prefix = "type.googleapis.com";
|
|
319
|
-
return prefix + "/rstream.webtty.protobuf.Environment";
|
|
320
|
-
};
|
|
321
|
-
return Environment;
|
|
322
|
-
})();
|
|
323
|
-
protobuf.Username = (function() {
|
|
324
|
-
function Username(properties) {
|
|
325
|
-
if (properties) {
|
|
326
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
327
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
328
|
-
this[keys[i]] = properties[keys[i]];
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
Username.prototype.name = null;
|
|
332
|
-
Username.prototype.id = null;
|
|
333
|
-
let $oneOfFields;
|
|
334
|
-
Object.defineProperty(Username.prototype, "payload", {
|
|
335
|
-
get: $util.oneOfGetter($oneOfFields = ["name", "id"]),
|
|
336
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
337
|
-
});
|
|
338
|
-
Username.create = function create(properties) {
|
|
339
|
-
return new Username(properties);
|
|
340
|
-
};
|
|
341
|
-
Username.encode = function encode(message, writer) {
|
|
342
|
-
if (!writer)
|
|
343
|
-
writer = $Writer.create();
|
|
344
|
-
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
345
|
-
writer.uint32(
|
|
346
|
-
/* id 1, wireType 2 =*/
|
|
347
|
-
10
|
|
348
|
-
).string(message.name);
|
|
349
|
-
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
|
|
350
|
-
writer.uint32(
|
|
351
|
-
/* id 2, wireType 0 =*/
|
|
352
|
-
16
|
|
353
|
-
).uint32(message.id);
|
|
354
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
355
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
356
|
-
writer.raw(message.$unknowns[i]);
|
|
357
|
-
return writer;
|
|
358
|
-
};
|
|
359
|
-
Username.encodeDelimited = function encodeDelimited(message, writer) {
|
|
360
|
-
return this.encode(message, writer).ldelim();
|
|
361
|
-
};
|
|
362
|
-
Username.decode = function decode(reader, length, _end, _depth, _target) {
|
|
363
|
-
if (!(reader instanceof $Reader))
|
|
364
|
-
reader = $Reader.create(reader);
|
|
365
|
-
if (_depth === void 0)
|
|
366
|
-
_depth = 0;
|
|
367
|
-
if (_depth > $Reader.recursionLimit)
|
|
368
|
-
throw Error("max depth exceeded");
|
|
369
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Username();
|
|
370
|
-
while (reader.pos < end) {
|
|
371
|
-
let start = reader.pos;
|
|
372
|
-
let tag = reader.tag();
|
|
373
|
-
if (tag === _end) {
|
|
374
|
-
_end = void 0;
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
let wireType = tag & 7;
|
|
378
|
-
switch (tag >>>= 3) {
|
|
379
|
-
case 1: {
|
|
380
|
-
if (wireType !== 2)
|
|
381
|
-
break;
|
|
382
|
-
message.name = reader.string();
|
|
383
|
-
message.payload = "name";
|
|
384
|
-
continue;
|
|
385
|
-
}
|
|
386
|
-
case 2: {
|
|
387
|
-
if (wireType !== 0)
|
|
388
|
-
break;
|
|
389
|
-
message.id = reader.uint32();
|
|
390
|
-
message.payload = "id";
|
|
391
|
-
continue;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
reader.skipType(wireType, _depth, tag);
|
|
395
|
-
$util.makeProp(message, "$unknowns", false);
|
|
396
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
397
|
-
}
|
|
398
|
-
if (_end !== void 0)
|
|
399
|
-
throw Error("missing end group");
|
|
400
|
-
return message;
|
|
401
|
-
};
|
|
402
|
-
Username.decodeDelimited = function decodeDelimited(reader) {
|
|
403
|
-
if (!(reader instanceof $Reader))
|
|
404
|
-
reader = new $Reader(reader);
|
|
405
|
-
return this.decode(reader, reader.uint32());
|
|
406
|
-
};
|
|
407
|
-
Username.verify = function verify(message, _depth) {
|
|
408
|
-
if (typeof message !== "object" || message === null)
|
|
409
|
-
return "object expected";
|
|
410
|
-
if (_depth === void 0)
|
|
411
|
-
_depth = 0;
|
|
412
|
-
if (_depth > $util.recursionLimit)
|
|
413
|
-
return "max depth exceeded";
|
|
414
|
-
let properties = {};
|
|
415
|
-
if (message.name != null && message.hasOwnProperty("name")) {
|
|
416
|
-
properties.payload = 1;
|
|
417
|
-
if (!$util.isString(message.name))
|
|
418
|
-
return "name: string expected";
|
|
419
|
-
}
|
|
420
|
-
if (message.id != null && message.hasOwnProperty("id")) {
|
|
421
|
-
if (properties.payload === 1)
|
|
422
|
-
return "payload: multiple values";
|
|
423
|
-
properties.payload = 1;
|
|
424
|
-
if (!$util.isInteger(message.id))
|
|
425
|
-
return "id: integer expected";
|
|
426
|
-
}
|
|
427
|
-
return null;
|
|
428
|
-
};
|
|
429
|
-
Username.fromObject = function fromObject(object, _depth) {
|
|
430
|
-
if (object instanceof $root.rstream.webtty.protobuf.Username)
|
|
431
|
-
return object;
|
|
432
|
-
if (_depth === void 0)
|
|
433
|
-
_depth = 0;
|
|
434
|
-
if (_depth > $util.recursionLimit)
|
|
435
|
-
throw Error("max depth exceeded");
|
|
436
|
-
let message = new $root.rstream.webtty.protobuf.Username();
|
|
437
|
-
if (object.name != null)
|
|
438
|
-
message.name = String(object.name);
|
|
439
|
-
if (object.id != null)
|
|
440
|
-
message.id = object.id >>> 0;
|
|
441
|
-
return message;
|
|
442
|
-
};
|
|
443
|
-
Username.toObject = function toObject(message, options) {
|
|
444
|
-
if (!options)
|
|
445
|
-
options = {};
|
|
446
|
-
let object = {};
|
|
447
|
-
if (message.name != null && message.hasOwnProperty("name")) {
|
|
448
|
-
object.name = message.name;
|
|
449
|
-
if (options.oneofs)
|
|
450
|
-
object.payload = "name";
|
|
451
|
-
}
|
|
452
|
-
if (message.id != null && message.hasOwnProperty("id")) {
|
|
453
|
-
object.id = message.id;
|
|
454
|
-
if (options.oneofs)
|
|
455
|
-
object.payload = "id";
|
|
456
|
-
}
|
|
457
|
-
return object;
|
|
458
|
-
};
|
|
459
|
-
Username.prototype.toJSON = function toJSON() {
|
|
460
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
461
|
-
};
|
|
462
|
-
Username.getTypeUrl = function getTypeUrl(prefix) {
|
|
463
|
-
if (prefix === void 0)
|
|
464
|
-
prefix = "type.googleapis.com";
|
|
465
|
-
return prefix + "/rstream.webtty.protobuf.Username";
|
|
466
|
-
};
|
|
467
|
-
return Username;
|
|
468
|
-
})();
|
|
469
|
-
protobuf.Workdir = (function() {
|
|
470
|
-
function Workdir(properties) {
|
|
471
|
-
if (properties) {
|
|
472
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
473
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
474
|
-
this[keys[i]] = properties[keys[i]];
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
Workdir.prototype.value = "";
|
|
478
|
-
Workdir.create = function create(properties) {
|
|
479
|
-
return new Workdir(properties);
|
|
480
|
-
};
|
|
481
|
-
Workdir.encode = function encode(message, writer) {
|
|
482
|
-
if (!writer)
|
|
483
|
-
writer = $Writer.create();
|
|
484
|
-
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
485
|
-
writer.uint32(
|
|
486
|
-
/* id 1, wireType 2 =*/
|
|
487
|
-
10
|
|
488
|
-
).string(message.value);
|
|
489
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
490
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
491
|
-
writer.raw(message.$unknowns[i]);
|
|
492
|
-
return writer;
|
|
493
|
-
};
|
|
494
|
-
Workdir.encodeDelimited = function encodeDelimited(message, writer) {
|
|
495
|
-
return this.encode(message, writer).ldelim();
|
|
496
|
-
};
|
|
497
|
-
Workdir.decode = function decode(reader, length, _end, _depth, _target) {
|
|
498
|
-
if (!(reader instanceof $Reader))
|
|
499
|
-
reader = $Reader.create(reader);
|
|
500
|
-
if (_depth === void 0)
|
|
501
|
-
_depth = 0;
|
|
502
|
-
if (_depth > $Reader.recursionLimit)
|
|
503
|
-
throw Error("max depth exceeded");
|
|
504
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Workdir(), value;
|
|
505
|
-
while (reader.pos < end) {
|
|
506
|
-
let start = reader.pos;
|
|
507
|
-
let tag = reader.tag();
|
|
508
|
-
if (tag === _end) {
|
|
509
|
-
_end = void 0;
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
let wireType = tag & 7;
|
|
513
|
-
switch (tag >>>= 3) {
|
|
514
|
-
case 1: {
|
|
515
|
-
if (wireType !== 2)
|
|
516
|
-
break;
|
|
517
|
-
if ((value = reader.string()).length)
|
|
518
|
-
message.value = value;
|
|
519
|
-
else
|
|
520
|
-
delete message.value;
|
|
521
|
-
continue;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
reader.skipType(wireType, _depth, tag);
|
|
525
|
-
$util.makeProp(message, "$unknowns", false);
|
|
526
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
527
|
-
}
|
|
528
|
-
if (_end !== void 0)
|
|
529
|
-
throw Error("missing end group");
|
|
530
|
-
return message;
|
|
531
|
-
};
|
|
532
|
-
Workdir.decodeDelimited = function decodeDelimited(reader) {
|
|
533
|
-
if (!(reader instanceof $Reader))
|
|
534
|
-
reader = new $Reader(reader);
|
|
535
|
-
return this.decode(reader, reader.uint32());
|
|
536
|
-
};
|
|
537
|
-
Workdir.verify = function verify(message, _depth) {
|
|
538
|
-
if (typeof message !== "object" || message === null)
|
|
539
|
-
return "object expected";
|
|
540
|
-
if (_depth === void 0)
|
|
541
|
-
_depth = 0;
|
|
542
|
-
if (_depth > $util.recursionLimit)
|
|
543
|
-
return "max depth exceeded";
|
|
544
|
-
if (message.value != null && message.hasOwnProperty("value")) {
|
|
545
|
-
if (!$util.isString(message.value))
|
|
546
|
-
return "value: string expected";
|
|
547
|
-
}
|
|
548
|
-
return null;
|
|
549
|
-
};
|
|
550
|
-
Workdir.fromObject = function fromObject(object, _depth) {
|
|
551
|
-
if (object instanceof $root.rstream.webtty.protobuf.Workdir)
|
|
552
|
-
return object;
|
|
553
|
-
if (_depth === void 0)
|
|
554
|
-
_depth = 0;
|
|
555
|
-
if (_depth > $util.recursionLimit)
|
|
556
|
-
throw Error("max depth exceeded");
|
|
557
|
-
let message = new $root.rstream.webtty.protobuf.Workdir();
|
|
558
|
-
if (object.value != null) {
|
|
559
|
-
if (typeof object.value !== "string" || object.value.length)
|
|
560
|
-
message.value = String(object.value);
|
|
561
|
-
}
|
|
562
|
-
return message;
|
|
563
|
-
};
|
|
564
|
-
Workdir.toObject = function toObject(message, options) {
|
|
565
|
-
if (!options)
|
|
566
|
-
options = {};
|
|
567
|
-
let object = {};
|
|
568
|
-
if (options.defaults)
|
|
569
|
-
object.value = "";
|
|
570
|
-
if (message.value != null && message.hasOwnProperty("value"))
|
|
571
|
-
object.value = message.value;
|
|
572
|
-
return object;
|
|
573
|
-
};
|
|
574
|
-
Workdir.prototype.toJSON = function toJSON() {
|
|
575
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
576
|
-
};
|
|
577
|
-
Workdir.getTypeUrl = function getTypeUrl(prefix) {
|
|
578
|
-
if (prefix === void 0)
|
|
579
|
-
prefix = "type.googleapis.com";
|
|
580
|
-
return prefix + "/rstream.webtty.protobuf.Workdir";
|
|
581
|
-
};
|
|
582
|
-
return Workdir;
|
|
583
|
-
})();
|
|
584
|
-
protobuf.Config = (function() {
|
|
585
|
-
function Config(properties) {
|
|
586
|
-
this.cmdArgs = [];
|
|
587
|
-
this.envVars = [];
|
|
588
|
-
if (properties) {
|
|
589
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
590
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
591
|
-
this[keys[i]] = properties[keys[i]];
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
Config.prototype.options = null;
|
|
595
|
-
Config.prototype.cmdArgs = $util.emptyArray;
|
|
596
|
-
Config.prototype.envVars = $util.emptyArray;
|
|
597
|
-
Config.prototype.workdir = null;
|
|
598
|
-
Config.prototype.username = null;
|
|
599
|
-
Config.create = function create(properties) {
|
|
600
|
-
return new Config(properties);
|
|
601
|
-
};
|
|
602
|
-
Config.encode = function encode(message, writer) {
|
|
603
|
-
if (!writer)
|
|
604
|
-
writer = $Writer.create();
|
|
605
|
-
if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
|
606
|
-
$root.rstream.webtty.protobuf.Options.encode(message.options, writer.uint32(
|
|
607
|
-
/* id 1, wireType 2 =*/
|
|
608
|
-
10
|
|
609
|
-
).fork()).ldelim();
|
|
610
|
-
if (message.cmdArgs != null && message.cmdArgs.length)
|
|
611
|
-
for (let i = 0; i < message.cmdArgs.length; ++i)
|
|
612
|
-
writer.uint32(
|
|
613
|
-
/* id 2, wireType 2 =*/
|
|
614
|
-
18
|
|
615
|
-
).string(message.cmdArgs[i]);
|
|
616
|
-
if (message.envVars != null && message.envVars.length)
|
|
617
|
-
for (let i = 0; i < message.envVars.length; ++i)
|
|
618
|
-
$root.rstream.webtty.protobuf.Environment.encode(message.envVars[i], writer.uint32(
|
|
619
|
-
/* id 3, wireType 2 =*/
|
|
620
|
-
26
|
|
621
|
-
).fork()).ldelim();
|
|
622
|
-
if (message.workdir != null && Object.hasOwnProperty.call(message, "workdir"))
|
|
623
|
-
$root.rstream.webtty.protobuf.Workdir.encode(message.workdir, writer.uint32(
|
|
624
|
-
/* id 4, wireType 2 =*/
|
|
625
|
-
34
|
|
626
|
-
).fork()).ldelim();
|
|
627
|
-
if (message.username != null && Object.hasOwnProperty.call(message, "username"))
|
|
628
|
-
$root.rstream.webtty.protobuf.Username.encode(message.username, writer.uint32(
|
|
629
|
-
/* id 5, wireType 2 =*/
|
|
630
|
-
42
|
|
631
|
-
).fork()).ldelim();
|
|
632
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
633
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
634
|
-
writer.raw(message.$unknowns[i]);
|
|
635
|
-
return writer;
|
|
636
|
-
};
|
|
637
|
-
Config.encodeDelimited = function encodeDelimited(message, writer) {
|
|
638
|
-
return this.encode(message, writer).ldelim();
|
|
639
|
-
};
|
|
640
|
-
Config.decode = function decode(reader, length, _end, _depth, _target) {
|
|
641
|
-
if (!(reader instanceof $Reader))
|
|
642
|
-
reader = $Reader.create(reader);
|
|
643
|
-
if (_depth === void 0)
|
|
644
|
-
_depth = 0;
|
|
645
|
-
if (_depth > $Reader.recursionLimit)
|
|
646
|
-
throw Error("max depth exceeded");
|
|
647
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Config(), value;
|
|
648
|
-
while (reader.pos < end) {
|
|
649
|
-
let start = reader.pos;
|
|
650
|
-
let tag = reader.tag();
|
|
651
|
-
if (tag === _end) {
|
|
652
|
-
_end = void 0;
|
|
653
|
-
break;
|
|
654
|
-
}
|
|
655
|
-
let wireType = tag & 7;
|
|
656
|
-
switch (tag >>>= 3) {
|
|
657
|
-
case 1: {
|
|
658
|
-
if (wireType !== 2)
|
|
659
|
-
break;
|
|
660
|
-
message.options = $root.rstream.webtty.protobuf.Options.decode(reader, reader.uint32(), void 0, _depth + 1, message.options);
|
|
661
|
-
continue;
|
|
662
|
-
}
|
|
663
|
-
case 2: {
|
|
664
|
-
if (wireType !== 2)
|
|
665
|
-
break;
|
|
666
|
-
if (!(message.cmdArgs && message.cmdArgs.length))
|
|
667
|
-
message.cmdArgs = [];
|
|
668
|
-
message.cmdArgs.push(reader.string());
|
|
669
|
-
continue;
|
|
670
|
-
}
|
|
671
|
-
case 3: {
|
|
672
|
-
if (wireType !== 2)
|
|
673
|
-
break;
|
|
674
|
-
if (!(message.envVars && message.envVars.length))
|
|
675
|
-
message.envVars = [];
|
|
676
|
-
message.envVars.push($root.rstream.webtty.protobuf.Environment.decode(reader, reader.uint32(), void 0, _depth + 1));
|
|
677
|
-
continue;
|
|
678
|
-
}
|
|
679
|
-
case 4: {
|
|
680
|
-
if (wireType !== 2)
|
|
681
|
-
break;
|
|
682
|
-
message.workdir = $root.rstream.webtty.protobuf.Workdir.decode(reader, reader.uint32(), void 0, _depth + 1, message.workdir);
|
|
683
|
-
continue;
|
|
684
|
-
}
|
|
685
|
-
case 5: {
|
|
686
|
-
if (wireType !== 2)
|
|
687
|
-
break;
|
|
688
|
-
message.username = $root.rstream.webtty.protobuf.Username.decode(reader, reader.uint32(), void 0, _depth + 1, message.username);
|
|
689
|
-
continue;
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
reader.skipType(wireType, _depth, tag);
|
|
693
|
-
$util.makeProp(message, "$unknowns", false);
|
|
694
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
695
|
-
}
|
|
696
|
-
if (_end !== void 0)
|
|
697
|
-
throw Error("missing end group");
|
|
698
|
-
return message;
|
|
699
|
-
};
|
|
700
|
-
Config.decodeDelimited = function decodeDelimited(reader) {
|
|
701
|
-
if (!(reader instanceof $Reader))
|
|
702
|
-
reader = new $Reader(reader);
|
|
703
|
-
return this.decode(reader, reader.uint32());
|
|
704
|
-
};
|
|
705
|
-
Config.verify = function verify(message, _depth) {
|
|
706
|
-
if (typeof message !== "object" || message === null)
|
|
707
|
-
return "object expected";
|
|
708
|
-
if (_depth === void 0)
|
|
709
|
-
_depth = 0;
|
|
710
|
-
if (_depth > $util.recursionLimit)
|
|
711
|
-
return "max depth exceeded";
|
|
712
|
-
if (message.options != null && message.hasOwnProperty("options")) {
|
|
713
|
-
let error = $root.rstream.webtty.protobuf.Options.verify(message.options, _depth + 1);
|
|
714
|
-
if (error)
|
|
715
|
-
return "options." + error;
|
|
716
|
-
}
|
|
717
|
-
if (message.cmdArgs != null && message.hasOwnProperty("cmdArgs")) {
|
|
718
|
-
if (!Array.isArray(message.cmdArgs))
|
|
719
|
-
return "cmdArgs: array expected";
|
|
720
|
-
for (let i = 0; i < message.cmdArgs.length; ++i)
|
|
721
|
-
if (!$util.isString(message.cmdArgs[i]))
|
|
722
|
-
return "cmdArgs: string[] expected";
|
|
723
|
-
}
|
|
724
|
-
if (message.envVars != null && message.hasOwnProperty("envVars")) {
|
|
725
|
-
if (!Array.isArray(message.envVars))
|
|
726
|
-
return "envVars: array expected";
|
|
727
|
-
for (let i = 0; i < message.envVars.length; ++i) {
|
|
728
|
-
let error = $root.rstream.webtty.protobuf.Environment.verify(message.envVars[i], _depth + 1);
|
|
729
|
-
if (error)
|
|
730
|
-
return "envVars." + error;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
if (message.workdir != null && message.hasOwnProperty("workdir")) {
|
|
734
|
-
let error = $root.rstream.webtty.protobuf.Workdir.verify(message.workdir, _depth + 1);
|
|
735
|
-
if (error)
|
|
736
|
-
return "workdir." + error;
|
|
737
|
-
}
|
|
738
|
-
if (message.username != null && message.hasOwnProperty("username")) {
|
|
739
|
-
let error = $root.rstream.webtty.protobuf.Username.verify(message.username, _depth + 1);
|
|
740
|
-
if (error)
|
|
741
|
-
return "username." + error;
|
|
742
|
-
}
|
|
743
|
-
return null;
|
|
744
|
-
};
|
|
745
|
-
Config.fromObject = function fromObject(object, _depth) {
|
|
746
|
-
if (object instanceof $root.rstream.webtty.protobuf.Config)
|
|
747
|
-
return object;
|
|
748
|
-
if (_depth === void 0)
|
|
749
|
-
_depth = 0;
|
|
750
|
-
if (_depth > $util.recursionLimit)
|
|
751
|
-
throw Error("max depth exceeded");
|
|
752
|
-
let message = new $root.rstream.webtty.protobuf.Config();
|
|
753
|
-
if (object.options != null) {
|
|
754
|
-
if (typeof object.options !== "object")
|
|
755
|
-
throw TypeError(".rstream.webtty.protobuf.Config.options: object expected");
|
|
756
|
-
message.options = $root.rstream.webtty.protobuf.Options.fromObject(object.options, _depth + 1);
|
|
757
|
-
}
|
|
758
|
-
if (object.cmdArgs) {
|
|
759
|
-
if (!Array.isArray(object.cmdArgs))
|
|
760
|
-
throw TypeError(".rstream.webtty.protobuf.Config.cmdArgs: array expected");
|
|
761
|
-
message.cmdArgs = Array(object.cmdArgs.length);
|
|
762
|
-
for (let i = 0; i < object.cmdArgs.length; ++i)
|
|
763
|
-
message.cmdArgs[i] = String(object.cmdArgs[i]);
|
|
764
|
-
}
|
|
765
|
-
if (object.envVars) {
|
|
766
|
-
if (!Array.isArray(object.envVars))
|
|
767
|
-
throw TypeError(".rstream.webtty.protobuf.Config.envVars: array expected");
|
|
768
|
-
message.envVars = Array(object.envVars.length);
|
|
769
|
-
for (let i = 0; i < object.envVars.length; ++i) {
|
|
770
|
-
if (typeof object.envVars[i] !== "object")
|
|
771
|
-
throw TypeError(".rstream.webtty.protobuf.Config.envVars: object expected");
|
|
772
|
-
message.envVars[i] = $root.rstream.webtty.protobuf.Environment.fromObject(object.envVars[i], _depth + 1);
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
if (object.workdir != null) {
|
|
776
|
-
if (typeof object.workdir !== "object")
|
|
777
|
-
throw TypeError(".rstream.webtty.protobuf.Config.workdir: object expected");
|
|
778
|
-
message.workdir = $root.rstream.webtty.protobuf.Workdir.fromObject(object.workdir, _depth + 1);
|
|
779
|
-
}
|
|
780
|
-
if (object.username != null) {
|
|
781
|
-
if (typeof object.username !== "object")
|
|
782
|
-
throw TypeError(".rstream.webtty.protobuf.Config.username: object expected");
|
|
783
|
-
message.username = $root.rstream.webtty.protobuf.Username.fromObject(object.username, _depth + 1);
|
|
784
|
-
}
|
|
785
|
-
return message;
|
|
786
|
-
};
|
|
787
|
-
Config.toObject = function toObject(message, options) {
|
|
788
|
-
if (!options)
|
|
789
|
-
options = {};
|
|
790
|
-
let object = {};
|
|
791
|
-
if (options.arrays || options.defaults) {
|
|
792
|
-
object.cmdArgs = [];
|
|
793
|
-
object.envVars = [];
|
|
794
|
-
}
|
|
795
|
-
if (options.defaults) {
|
|
796
|
-
object.options = null;
|
|
797
|
-
object.workdir = null;
|
|
798
|
-
object.username = null;
|
|
799
|
-
}
|
|
800
|
-
if (message.options != null && message.hasOwnProperty("options"))
|
|
801
|
-
object.options = $root.rstream.webtty.protobuf.Options.toObject(message.options, options);
|
|
802
|
-
if (message.cmdArgs && message.cmdArgs.length) {
|
|
803
|
-
object.cmdArgs = Array(message.cmdArgs.length);
|
|
804
|
-
for (let j = 0; j < message.cmdArgs.length; ++j)
|
|
805
|
-
object.cmdArgs[j] = message.cmdArgs[j];
|
|
806
|
-
}
|
|
807
|
-
if (message.envVars && message.envVars.length) {
|
|
808
|
-
object.envVars = Array(message.envVars.length);
|
|
809
|
-
for (let j = 0; j < message.envVars.length; ++j)
|
|
810
|
-
object.envVars[j] = $root.rstream.webtty.protobuf.Environment.toObject(message.envVars[j], options);
|
|
811
|
-
}
|
|
812
|
-
if (message.workdir != null && message.hasOwnProperty("workdir"))
|
|
813
|
-
object.workdir = $root.rstream.webtty.protobuf.Workdir.toObject(message.workdir, options);
|
|
814
|
-
if (message.username != null && message.hasOwnProperty("username"))
|
|
815
|
-
object.username = $root.rstream.webtty.protobuf.Username.toObject(message.username, options);
|
|
816
|
-
return object;
|
|
817
|
-
};
|
|
818
|
-
Config.prototype.toJSON = function toJSON() {
|
|
819
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
820
|
-
};
|
|
821
|
-
Config.getTypeUrl = function getTypeUrl(prefix) {
|
|
822
|
-
if (prefix === void 0)
|
|
823
|
-
prefix = "type.googleapis.com";
|
|
824
|
-
return prefix + "/rstream.webtty.protobuf.Config";
|
|
825
|
-
};
|
|
826
|
-
return Config;
|
|
827
|
-
})();
|
|
828
|
-
protobuf.Open = (function() {
|
|
829
|
-
function Open(properties) {
|
|
830
|
-
if (properties) {
|
|
831
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
832
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
833
|
-
this[keys[i]] = properties[keys[i]];
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
Open.prototype.config = null;
|
|
837
|
-
Open.create = function create(properties) {
|
|
838
|
-
return new Open(properties);
|
|
839
|
-
};
|
|
840
|
-
Open.encode = function encode(message, writer) {
|
|
841
|
-
if (!writer)
|
|
842
|
-
writer = $Writer.create();
|
|
843
|
-
if (message.config != null && Object.hasOwnProperty.call(message, "config"))
|
|
844
|
-
$root.rstream.webtty.protobuf.Config.encode(message.config, writer.uint32(
|
|
845
|
-
/* id 1, wireType 2 =*/
|
|
846
|
-
10
|
|
847
|
-
).fork()).ldelim();
|
|
848
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
849
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
850
|
-
writer.raw(message.$unknowns[i]);
|
|
851
|
-
return writer;
|
|
852
|
-
};
|
|
853
|
-
Open.encodeDelimited = function encodeDelimited(message, writer) {
|
|
854
|
-
return this.encode(message, writer).ldelim();
|
|
855
|
-
};
|
|
856
|
-
Open.decode = function decode(reader, length, _end, _depth, _target) {
|
|
857
|
-
if (!(reader instanceof $Reader))
|
|
858
|
-
reader = $Reader.create(reader);
|
|
859
|
-
if (_depth === void 0)
|
|
860
|
-
_depth = 0;
|
|
861
|
-
if (_depth > $Reader.recursionLimit)
|
|
862
|
-
throw Error("max depth exceeded");
|
|
863
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Open(), value;
|
|
864
|
-
while (reader.pos < end) {
|
|
865
|
-
let start = reader.pos;
|
|
866
|
-
let tag = reader.tag();
|
|
867
|
-
if (tag === _end) {
|
|
868
|
-
_end = void 0;
|
|
869
|
-
break;
|
|
870
|
-
}
|
|
871
|
-
let wireType = tag & 7;
|
|
872
|
-
switch (tag >>>= 3) {
|
|
873
|
-
case 1: {
|
|
874
|
-
if (wireType !== 2)
|
|
875
|
-
break;
|
|
876
|
-
message.config = $root.rstream.webtty.protobuf.Config.decode(reader, reader.uint32(), void 0, _depth + 1, message.config);
|
|
877
|
-
continue;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
reader.skipType(wireType, _depth, tag);
|
|
881
|
-
$util.makeProp(message, "$unknowns", false);
|
|
882
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
883
|
-
}
|
|
884
|
-
if (_end !== void 0)
|
|
885
|
-
throw Error("missing end group");
|
|
886
|
-
return message;
|
|
887
|
-
};
|
|
888
|
-
Open.decodeDelimited = function decodeDelimited(reader) {
|
|
889
|
-
if (!(reader instanceof $Reader))
|
|
890
|
-
reader = new $Reader(reader);
|
|
891
|
-
return this.decode(reader, reader.uint32());
|
|
892
|
-
};
|
|
893
|
-
Open.verify = function verify(message, _depth) {
|
|
894
|
-
if (typeof message !== "object" || message === null)
|
|
895
|
-
return "object expected";
|
|
896
|
-
if (_depth === void 0)
|
|
897
|
-
_depth = 0;
|
|
898
|
-
if (_depth > $util.recursionLimit)
|
|
899
|
-
return "max depth exceeded";
|
|
900
|
-
if (message.config != null && message.hasOwnProperty("config")) {
|
|
901
|
-
let error = $root.rstream.webtty.protobuf.Config.verify(message.config, _depth + 1);
|
|
902
|
-
if (error)
|
|
903
|
-
return "config." + error;
|
|
904
|
-
}
|
|
905
|
-
return null;
|
|
906
|
-
};
|
|
907
|
-
Open.fromObject = function fromObject(object, _depth) {
|
|
908
|
-
if (object instanceof $root.rstream.webtty.protobuf.Open)
|
|
909
|
-
return object;
|
|
910
|
-
if (_depth === void 0)
|
|
911
|
-
_depth = 0;
|
|
912
|
-
if (_depth > $util.recursionLimit)
|
|
913
|
-
throw Error("max depth exceeded");
|
|
914
|
-
let message = new $root.rstream.webtty.protobuf.Open();
|
|
915
|
-
if (object.config != null) {
|
|
916
|
-
if (typeof object.config !== "object")
|
|
917
|
-
throw TypeError(".rstream.webtty.protobuf.Open.config: object expected");
|
|
918
|
-
message.config = $root.rstream.webtty.protobuf.Config.fromObject(object.config, _depth + 1);
|
|
919
|
-
}
|
|
920
|
-
return message;
|
|
921
|
-
};
|
|
922
|
-
Open.toObject = function toObject(message, options) {
|
|
923
|
-
if (!options)
|
|
924
|
-
options = {};
|
|
925
|
-
let object = {};
|
|
926
|
-
if (options.defaults)
|
|
927
|
-
object.config = null;
|
|
928
|
-
if (message.config != null && message.hasOwnProperty("config"))
|
|
929
|
-
object.config = $root.rstream.webtty.protobuf.Config.toObject(message.config, options);
|
|
930
|
-
return object;
|
|
931
|
-
};
|
|
932
|
-
Open.prototype.toJSON = function toJSON() {
|
|
933
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
934
|
-
};
|
|
935
|
-
Open.getTypeUrl = function getTypeUrl(prefix) {
|
|
936
|
-
if (prefix === void 0)
|
|
937
|
-
prefix = "type.googleapis.com";
|
|
938
|
-
return prefix + "/rstream.webtty.protobuf.Open";
|
|
939
|
-
};
|
|
940
|
-
return Open;
|
|
941
|
-
})();
|
|
942
|
-
protobuf.Ack = (function() {
|
|
943
|
-
function Ack(properties) {
|
|
944
|
-
if (properties) {
|
|
945
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
946
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
947
|
-
this[keys[i]] = properties[keys[i]];
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
Ack.create = function create(properties) {
|
|
951
|
-
return new Ack(properties);
|
|
952
|
-
};
|
|
953
|
-
Ack.encode = function encode(message, writer) {
|
|
954
|
-
if (!writer)
|
|
955
|
-
writer = $Writer.create();
|
|
956
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
957
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
958
|
-
writer.raw(message.$unknowns[i]);
|
|
959
|
-
return writer;
|
|
960
|
-
};
|
|
961
|
-
Ack.encodeDelimited = function encodeDelimited(message, writer) {
|
|
962
|
-
return this.encode(message, writer).ldelim();
|
|
963
|
-
};
|
|
964
|
-
Ack.decode = function decode(reader, length, _end, _depth, _target) {
|
|
965
|
-
if (!(reader instanceof $Reader))
|
|
966
|
-
reader = $Reader.create(reader);
|
|
967
|
-
if (_depth === void 0)
|
|
968
|
-
_depth = 0;
|
|
969
|
-
if (_depth > $Reader.recursionLimit)
|
|
970
|
-
throw Error("max depth exceeded");
|
|
971
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Ack();
|
|
972
|
-
while (reader.pos < end) {
|
|
973
|
-
let start = reader.pos;
|
|
974
|
-
let tag = reader.tag();
|
|
975
|
-
if (tag === _end) {
|
|
976
|
-
_end = void 0;
|
|
977
|
-
break;
|
|
978
|
-
}
|
|
979
|
-
reader.skipType(tag & 7, _depth, tag);
|
|
980
|
-
$util.makeProp(message, "$unknowns", false);
|
|
981
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
982
|
-
}
|
|
983
|
-
if (_end !== void 0)
|
|
984
|
-
throw Error("missing end group");
|
|
985
|
-
return message;
|
|
986
|
-
};
|
|
987
|
-
Ack.decodeDelimited = function decodeDelimited(reader) {
|
|
988
|
-
if (!(reader instanceof $Reader))
|
|
989
|
-
reader = new $Reader(reader);
|
|
990
|
-
return this.decode(reader, reader.uint32());
|
|
991
|
-
};
|
|
992
|
-
Ack.verify = function verify(message, _depth) {
|
|
993
|
-
if (typeof message !== "object" || message === null)
|
|
994
|
-
return "object expected";
|
|
995
|
-
if (_depth === void 0)
|
|
996
|
-
_depth = 0;
|
|
997
|
-
if (_depth > $util.recursionLimit)
|
|
998
|
-
return "max depth exceeded";
|
|
999
|
-
return null;
|
|
1000
|
-
};
|
|
1001
|
-
Ack.fromObject = function fromObject(object, _depth) {
|
|
1002
|
-
if (object instanceof $root.rstream.webtty.protobuf.Ack)
|
|
1003
|
-
return object;
|
|
1004
|
-
if (_depth === void 0)
|
|
1005
|
-
_depth = 0;
|
|
1006
|
-
if (_depth > $util.recursionLimit)
|
|
1007
|
-
throw Error("max depth exceeded");
|
|
1008
|
-
return new $root.rstream.webtty.protobuf.Ack();
|
|
1009
|
-
};
|
|
1010
|
-
Ack.toObject = function toObject() {
|
|
1011
|
-
return {};
|
|
1012
|
-
};
|
|
1013
|
-
Ack.prototype.toJSON = function toJSON() {
|
|
1014
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1015
|
-
};
|
|
1016
|
-
Ack.getTypeUrl = function getTypeUrl(prefix) {
|
|
1017
|
-
if (prefix === void 0)
|
|
1018
|
-
prefix = "type.googleapis.com";
|
|
1019
|
-
return prefix + "/rstream.webtty.protobuf.Ack";
|
|
1020
|
-
};
|
|
1021
|
-
return Ack;
|
|
1022
|
-
})();
|
|
1023
|
-
protobuf.Error = (function() {
|
|
1024
|
-
function Error2(properties) {
|
|
1025
|
-
if (properties) {
|
|
1026
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1027
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1028
|
-
this[keys[i]] = properties[keys[i]];
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
Error2.prototype.msg = "";
|
|
1032
|
-
Error2.create = function create(properties) {
|
|
1033
|
-
return new Error2(properties);
|
|
1034
|
-
};
|
|
1035
|
-
Error2.encode = function encode(message, writer) {
|
|
1036
|
-
if (!writer)
|
|
1037
|
-
writer = $Writer.create();
|
|
1038
|
-
if (message.msg != null && Object.hasOwnProperty.call(message, "msg"))
|
|
1039
|
-
writer.uint32(
|
|
1040
|
-
/* id 1, wireType 2 =*/
|
|
1041
|
-
10
|
|
1042
|
-
).string(message.msg);
|
|
1043
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1044
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1045
|
-
writer.raw(message.$unknowns[i]);
|
|
1046
|
-
return writer;
|
|
1047
|
-
};
|
|
1048
|
-
Error2.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1049
|
-
return this.encode(message, writer).ldelim();
|
|
1050
|
-
};
|
|
1051
|
-
Error2.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1052
|
-
if (!(reader instanceof $Reader))
|
|
1053
|
-
reader = $Reader.create(reader);
|
|
1054
|
-
if (_depth === void 0)
|
|
1055
|
-
_depth = 0;
|
|
1056
|
-
if (_depth > $Reader.recursionLimit)
|
|
1057
|
-
throw Error2("max depth exceeded");
|
|
1058
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Error(), value;
|
|
1059
|
-
while (reader.pos < end) {
|
|
1060
|
-
let start = reader.pos;
|
|
1061
|
-
let tag = reader.tag();
|
|
1062
|
-
if (tag === _end) {
|
|
1063
|
-
_end = void 0;
|
|
1064
|
-
break;
|
|
1065
|
-
}
|
|
1066
|
-
let wireType = tag & 7;
|
|
1067
|
-
switch (tag >>>= 3) {
|
|
1068
|
-
case 1: {
|
|
1069
|
-
if (wireType !== 2)
|
|
1070
|
-
break;
|
|
1071
|
-
if ((value = reader.string()).length)
|
|
1072
|
-
message.msg = value;
|
|
1073
|
-
else
|
|
1074
|
-
delete message.msg;
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
reader.skipType(wireType, _depth, tag);
|
|
1079
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1080
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1081
|
-
}
|
|
1082
|
-
if (_end !== void 0)
|
|
1083
|
-
throw Error2("missing end group");
|
|
1084
|
-
return message;
|
|
1085
|
-
};
|
|
1086
|
-
Error2.decodeDelimited = function decodeDelimited(reader) {
|
|
1087
|
-
if (!(reader instanceof $Reader))
|
|
1088
|
-
reader = new $Reader(reader);
|
|
1089
|
-
return this.decode(reader, reader.uint32());
|
|
1090
|
-
};
|
|
1091
|
-
Error2.verify = function verify(message, _depth) {
|
|
1092
|
-
if (typeof message !== "object" || message === null)
|
|
1093
|
-
return "object expected";
|
|
1094
|
-
if (_depth === void 0)
|
|
1095
|
-
_depth = 0;
|
|
1096
|
-
if (_depth > $util.recursionLimit)
|
|
1097
|
-
return "max depth exceeded";
|
|
1098
|
-
if (message.msg != null && message.hasOwnProperty("msg")) {
|
|
1099
|
-
if (!$util.isString(message.msg))
|
|
1100
|
-
return "msg: string expected";
|
|
1101
|
-
}
|
|
1102
|
-
return null;
|
|
1103
|
-
};
|
|
1104
|
-
Error2.fromObject = function fromObject(object, _depth) {
|
|
1105
|
-
if (object instanceof $root.rstream.webtty.protobuf.Error)
|
|
1106
|
-
return object;
|
|
1107
|
-
if (_depth === void 0)
|
|
1108
|
-
_depth = 0;
|
|
1109
|
-
if (_depth > $util.recursionLimit)
|
|
1110
|
-
throw Error2("max depth exceeded");
|
|
1111
|
-
let message = new $root.rstream.webtty.protobuf.Error();
|
|
1112
|
-
if (object.msg != null) {
|
|
1113
|
-
if (typeof object.msg !== "string" || object.msg.length)
|
|
1114
|
-
message.msg = String(object.msg);
|
|
1115
|
-
}
|
|
1116
|
-
return message;
|
|
1117
|
-
};
|
|
1118
|
-
Error2.toObject = function toObject(message, options) {
|
|
1119
|
-
if (!options)
|
|
1120
|
-
options = {};
|
|
1121
|
-
let object = {};
|
|
1122
|
-
if (options.defaults)
|
|
1123
|
-
object.msg = "";
|
|
1124
|
-
if (message.msg != null && message.hasOwnProperty("msg"))
|
|
1125
|
-
object.msg = message.msg;
|
|
1126
|
-
return object;
|
|
1127
|
-
};
|
|
1128
|
-
Error2.prototype.toJSON = function toJSON() {
|
|
1129
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1130
|
-
};
|
|
1131
|
-
Error2.getTypeUrl = function getTypeUrl(prefix) {
|
|
1132
|
-
if (prefix === void 0)
|
|
1133
|
-
prefix = "type.googleapis.com";
|
|
1134
|
-
return prefix + "/rstream.webtty.protobuf.Error";
|
|
1135
|
-
};
|
|
1136
|
-
return Error2;
|
|
1137
|
-
})();
|
|
1138
|
-
protobuf.Close = (function() {
|
|
1139
|
-
function Close(properties) {
|
|
1140
|
-
if (properties) {
|
|
1141
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1142
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1143
|
-
this[keys[i]] = properties[keys[i]];
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
Close.prototype.returnCode = 0;
|
|
1147
|
-
Close.create = function create(properties) {
|
|
1148
|
-
return new Close(properties);
|
|
1149
|
-
};
|
|
1150
|
-
Close.encode = function encode(message, writer) {
|
|
1151
|
-
if (!writer)
|
|
1152
|
-
writer = $Writer.create();
|
|
1153
|
-
if (message.returnCode != null && Object.hasOwnProperty.call(message, "returnCode"))
|
|
1154
|
-
writer.uint32(
|
|
1155
|
-
/* id 1, wireType 0 =*/
|
|
1156
|
-
8
|
|
1157
|
-
).int32(message.returnCode);
|
|
1158
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1159
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1160
|
-
writer.raw(message.$unknowns[i]);
|
|
1161
|
-
return writer;
|
|
1162
|
-
};
|
|
1163
|
-
Close.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1164
|
-
return this.encode(message, writer).ldelim();
|
|
1165
|
-
};
|
|
1166
|
-
Close.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1167
|
-
if (!(reader instanceof $Reader))
|
|
1168
|
-
reader = $Reader.create(reader);
|
|
1169
|
-
if (_depth === void 0)
|
|
1170
|
-
_depth = 0;
|
|
1171
|
-
if (_depth > $Reader.recursionLimit)
|
|
1172
|
-
throw Error("max depth exceeded");
|
|
1173
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Close(), value;
|
|
1174
|
-
while (reader.pos < end) {
|
|
1175
|
-
let start = reader.pos;
|
|
1176
|
-
let tag = reader.tag();
|
|
1177
|
-
if (tag === _end) {
|
|
1178
|
-
_end = void 0;
|
|
1179
|
-
break;
|
|
1180
|
-
}
|
|
1181
|
-
let wireType = tag & 7;
|
|
1182
|
-
switch (tag >>>= 3) {
|
|
1183
|
-
case 1: {
|
|
1184
|
-
if (wireType !== 0)
|
|
1185
|
-
break;
|
|
1186
|
-
if (value = reader.int32())
|
|
1187
|
-
message.returnCode = value;
|
|
1188
|
-
else
|
|
1189
|
-
delete message.returnCode;
|
|
1190
|
-
continue;
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
reader.skipType(wireType, _depth, tag);
|
|
1194
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1195
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1196
|
-
}
|
|
1197
|
-
if (_end !== void 0)
|
|
1198
|
-
throw Error("missing end group");
|
|
1199
|
-
return message;
|
|
1200
|
-
};
|
|
1201
|
-
Close.decodeDelimited = function decodeDelimited(reader) {
|
|
1202
|
-
if (!(reader instanceof $Reader))
|
|
1203
|
-
reader = new $Reader(reader);
|
|
1204
|
-
return this.decode(reader, reader.uint32());
|
|
1205
|
-
};
|
|
1206
|
-
Close.verify = function verify(message, _depth) {
|
|
1207
|
-
if (typeof message !== "object" || message === null)
|
|
1208
|
-
return "object expected";
|
|
1209
|
-
if (_depth === void 0)
|
|
1210
|
-
_depth = 0;
|
|
1211
|
-
if (_depth > $util.recursionLimit)
|
|
1212
|
-
return "max depth exceeded";
|
|
1213
|
-
if (message.returnCode != null && message.hasOwnProperty("returnCode")) {
|
|
1214
|
-
if (!$util.isInteger(message.returnCode))
|
|
1215
|
-
return "returnCode: integer expected";
|
|
1216
|
-
}
|
|
1217
|
-
return null;
|
|
1218
|
-
};
|
|
1219
|
-
Close.fromObject = function fromObject(object, _depth) {
|
|
1220
|
-
if (object instanceof $root.rstream.webtty.protobuf.Close)
|
|
1221
|
-
return object;
|
|
1222
|
-
if (_depth === void 0)
|
|
1223
|
-
_depth = 0;
|
|
1224
|
-
if (_depth > $util.recursionLimit)
|
|
1225
|
-
throw Error("max depth exceeded");
|
|
1226
|
-
let message = new $root.rstream.webtty.protobuf.Close();
|
|
1227
|
-
if (object.returnCode != null) {
|
|
1228
|
-
if (Number(object.returnCode) !== 0)
|
|
1229
|
-
message.returnCode = object.returnCode | 0;
|
|
1230
|
-
}
|
|
1231
|
-
return message;
|
|
1232
|
-
};
|
|
1233
|
-
Close.toObject = function toObject(message, options) {
|
|
1234
|
-
if (!options)
|
|
1235
|
-
options = {};
|
|
1236
|
-
let object = {};
|
|
1237
|
-
if (options.defaults)
|
|
1238
|
-
object.returnCode = 0;
|
|
1239
|
-
if (message.returnCode != null && message.hasOwnProperty("returnCode"))
|
|
1240
|
-
object.returnCode = message.returnCode;
|
|
1241
|
-
return object;
|
|
1242
|
-
};
|
|
1243
|
-
Close.prototype.toJSON = function toJSON() {
|
|
1244
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1245
|
-
};
|
|
1246
|
-
Close.getTypeUrl = function getTypeUrl(prefix) {
|
|
1247
|
-
if (prefix === void 0)
|
|
1248
|
-
prefix = "type.googleapis.com";
|
|
1249
|
-
return prefix + "/rstream.webtty.protobuf.Close";
|
|
1250
|
-
};
|
|
1251
|
-
return Close;
|
|
1252
|
-
})();
|
|
1253
|
-
protobuf.EndOfStream = (function() {
|
|
1254
|
-
function EndOfStream(properties) {
|
|
1255
|
-
if (properties) {
|
|
1256
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1257
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1258
|
-
this[keys[i]] = properties[keys[i]];
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
EndOfStream.create = function create(properties) {
|
|
1262
|
-
return new EndOfStream(properties);
|
|
1263
|
-
};
|
|
1264
|
-
EndOfStream.encode = function encode(message, writer) {
|
|
1265
|
-
if (!writer)
|
|
1266
|
-
writer = $Writer.create();
|
|
1267
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1268
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1269
|
-
writer.raw(message.$unknowns[i]);
|
|
1270
|
-
return writer;
|
|
1271
|
-
};
|
|
1272
|
-
EndOfStream.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1273
|
-
return this.encode(message, writer).ldelim();
|
|
1274
|
-
};
|
|
1275
|
-
EndOfStream.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1276
|
-
if (!(reader instanceof $Reader))
|
|
1277
|
-
reader = $Reader.create(reader);
|
|
1278
|
-
if (_depth === void 0)
|
|
1279
|
-
_depth = 0;
|
|
1280
|
-
if (_depth > $Reader.recursionLimit)
|
|
1281
|
-
throw Error("max depth exceeded");
|
|
1282
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.EndOfStream();
|
|
1283
|
-
while (reader.pos < end) {
|
|
1284
|
-
let start = reader.pos;
|
|
1285
|
-
let tag = reader.tag();
|
|
1286
|
-
if (tag === _end) {
|
|
1287
|
-
_end = void 0;
|
|
1288
|
-
break;
|
|
1289
|
-
}
|
|
1290
|
-
reader.skipType(tag & 7, _depth, tag);
|
|
1291
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1292
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1293
|
-
}
|
|
1294
|
-
if (_end !== void 0)
|
|
1295
|
-
throw Error("missing end group");
|
|
1296
|
-
return message;
|
|
1297
|
-
};
|
|
1298
|
-
EndOfStream.decodeDelimited = function decodeDelimited(reader) {
|
|
1299
|
-
if (!(reader instanceof $Reader))
|
|
1300
|
-
reader = new $Reader(reader);
|
|
1301
|
-
return this.decode(reader, reader.uint32());
|
|
1302
|
-
};
|
|
1303
|
-
EndOfStream.verify = function verify(message, _depth) {
|
|
1304
|
-
if (typeof message !== "object" || message === null)
|
|
1305
|
-
return "object expected";
|
|
1306
|
-
if (_depth === void 0)
|
|
1307
|
-
_depth = 0;
|
|
1308
|
-
if (_depth > $util.recursionLimit)
|
|
1309
|
-
return "max depth exceeded";
|
|
1310
|
-
return null;
|
|
1311
|
-
};
|
|
1312
|
-
EndOfStream.fromObject = function fromObject(object, _depth) {
|
|
1313
|
-
if (object instanceof $root.rstream.webtty.protobuf.EndOfStream)
|
|
1314
|
-
return object;
|
|
1315
|
-
if (_depth === void 0)
|
|
1316
|
-
_depth = 0;
|
|
1317
|
-
if (_depth > $util.recursionLimit)
|
|
1318
|
-
throw Error("max depth exceeded");
|
|
1319
|
-
return new $root.rstream.webtty.protobuf.EndOfStream();
|
|
1320
|
-
};
|
|
1321
|
-
EndOfStream.toObject = function toObject() {
|
|
1322
|
-
return {};
|
|
1323
|
-
};
|
|
1324
|
-
EndOfStream.prototype.toJSON = function toJSON() {
|
|
1325
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1326
|
-
};
|
|
1327
|
-
EndOfStream.getTypeUrl = function getTypeUrl(prefix) {
|
|
1328
|
-
if (prefix === void 0)
|
|
1329
|
-
prefix = "type.googleapis.com";
|
|
1330
|
-
return prefix + "/rstream.webtty.protobuf.EndOfStream";
|
|
1331
|
-
};
|
|
1332
|
-
return EndOfStream;
|
|
1333
|
-
})();
|
|
1334
|
-
protobuf.Data = (function() {
|
|
1335
|
-
function Data(properties) {
|
|
1336
|
-
if (properties) {
|
|
1337
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1338
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1339
|
-
this[keys[i]] = properties[keys[i]];
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
Data.prototype.type = 0;
|
|
1343
|
-
Data.prototype.data = null;
|
|
1344
|
-
Data.prototype.eos = null;
|
|
1345
|
-
let $oneOfFields;
|
|
1346
|
-
Object.defineProperty(Data.prototype, "payload", {
|
|
1347
|
-
get: $util.oneOfGetter($oneOfFields = ["data", "eos"]),
|
|
1348
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
1349
|
-
});
|
|
1350
|
-
Data.create = function create(properties) {
|
|
1351
|
-
return new Data(properties);
|
|
1352
|
-
};
|
|
1353
|
-
Data.encode = function encode(message, writer) {
|
|
1354
|
-
if (!writer)
|
|
1355
|
-
writer = $Writer.create();
|
|
1356
|
-
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
1357
|
-
writer.uint32(
|
|
1358
|
-
/* id 1, wireType 0 =*/
|
|
1359
|
-
8
|
|
1360
|
-
).int32(message.type);
|
|
1361
|
-
if (message.data != null && Object.hasOwnProperty.call(message, "data"))
|
|
1362
|
-
writer.uint32(
|
|
1363
|
-
/* id 2, wireType 2 =*/
|
|
1364
|
-
18
|
|
1365
|
-
).bytes(message.data);
|
|
1366
|
-
if (message.eos != null && Object.hasOwnProperty.call(message, "eos"))
|
|
1367
|
-
$root.rstream.webtty.protobuf.EndOfStream.encode(message.eos, writer.uint32(
|
|
1368
|
-
/* id 3, wireType 2 =*/
|
|
1369
|
-
26
|
|
1370
|
-
).fork()).ldelim();
|
|
1371
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1372
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1373
|
-
writer.raw(message.$unknowns[i]);
|
|
1374
|
-
return writer;
|
|
1375
|
-
};
|
|
1376
|
-
Data.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1377
|
-
return this.encode(message, writer).ldelim();
|
|
1378
|
-
};
|
|
1379
|
-
Data.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1380
|
-
if (!(reader instanceof $Reader))
|
|
1381
|
-
reader = $Reader.create(reader);
|
|
1382
|
-
if (_depth === void 0)
|
|
1383
|
-
_depth = 0;
|
|
1384
|
-
if (_depth > $Reader.recursionLimit)
|
|
1385
|
-
throw Error("max depth exceeded");
|
|
1386
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Data(), value;
|
|
1387
|
-
while (reader.pos < end) {
|
|
1388
|
-
let start = reader.pos;
|
|
1389
|
-
let tag = reader.tag();
|
|
1390
|
-
if (tag === _end) {
|
|
1391
|
-
_end = void 0;
|
|
1392
|
-
break;
|
|
1393
|
-
}
|
|
1394
|
-
let wireType = tag & 7;
|
|
1395
|
-
switch (tag >>>= 3) {
|
|
1396
|
-
case 1: {
|
|
1397
|
-
if (wireType !== 0)
|
|
1398
|
-
break;
|
|
1399
|
-
if (value = reader.int32())
|
|
1400
|
-
message.type = value;
|
|
1401
|
-
else
|
|
1402
|
-
delete message.type;
|
|
1403
|
-
continue;
|
|
1404
|
-
}
|
|
1405
|
-
case 2: {
|
|
1406
|
-
if (wireType !== 2)
|
|
1407
|
-
break;
|
|
1408
|
-
message.data = reader.bytes();
|
|
1409
|
-
message.payload = "data";
|
|
1410
|
-
continue;
|
|
1411
|
-
}
|
|
1412
|
-
case 3: {
|
|
1413
|
-
if (wireType !== 2)
|
|
1414
|
-
break;
|
|
1415
|
-
message.eos = $root.rstream.webtty.protobuf.EndOfStream.decode(reader, reader.uint32(), void 0, _depth + 1, message.eos);
|
|
1416
|
-
message.payload = "eos";
|
|
1417
|
-
continue;
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
reader.skipType(wireType, _depth, tag);
|
|
1421
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1422
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1423
|
-
}
|
|
1424
|
-
if (_end !== void 0)
|
|
1425
|
-
throw Error("missing end group");
|
|
1426
|
-
return message;
|
|
1427
|
-
};
|
|
1428
|
-
Data.decodeDelimited = function decodeDelimited(reader) {
|
|
1429
|
-
if (!(reader instanceof $Reader))
|
|
1430
|
-
reader = new $Reader(reader);
|
|
1431
|
-
return this.decode(reader, reader.uint32());
|
|
1432
|
-
};
|
|
1433
|
-
Data.verify = function verify(message, _depth) {
|
|
1434
|
-
if (typeof message !== "object" || message === null)
|
|
1435
|
-
return "object expected";
|
|
1436
|
-
if (_depth === void 0)
|
|
1437
|
-
_depth = 0;
|
|
1438
|
-
if (_depth > $util.recursionLimit)
|
|
1439
|
-
return "max depth exceeded";
|
|
1440
|
-
let properties = {};
|
|
1441
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
1442
|
-
switch (message.type) {
|
|
1443
|
-
default:
|
|
1444
|
-
return "type: enum value expected";
|
|
1445
|
-
case 0:
|
|
1446
|
-
case 1:
|
|
1447
|
-
case 2:
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
if (message.data != null && message.hasOwnProperty("data")) {
|
|
1451
|
-
properties.payload = 1;
|
|
1452
|
-
if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
|
|
1453
|
-
return "data: buffer expected";
|
|
1454
|
-
}
|
|
1455
|
-
if (message.eos != null && message.hasOwnProperty("eos")) {
|
|
1456
|
-
if (properties.payload === 1)
|
|
1457
|
-
return "payload: multiple values";
|
|
1458
|
-
properties.payload = 1;
|
|
1459
|
-
{
|
|
1460
|
-
let error = $root.rstream.webtty.protobuf.EndOfStream.verify(message.eos, _depth + 1);
|
|
1461
|
-
if (error)
|
|
1462
|
-
return "eos." + error;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
return null;
|
|
1466
|
-
};
|
|
1467
|
-
Data.fromObject = function fromObject(object, _depth) {
|
|
1468
|
-
if (object instanceof $root.rstream.webtty.protobuf.Data)
|
|
1469
|
-
return object;
|
|
1470
|
-
if (_depth === void 0)
|
|
1471
|
-
_depth = 0;
|
|
1472
|
-
if (_depth > $util.recursionLimit)
|
|
1473
|
-
throw Error("max depth exceeded");
|
|
1474
|
-
let message = new $root.rstream.webtty.protobuf.Data();
|
|
1475
|
-
if (object.type !== 0 && (typeof object.type !== "string" || $root.rstream.webtty.protobuf.Data.Type[object.type] !== 0))
|
|
1476
|
-
switch (object.type) {
|
|
1477
|
-
default:
|
|
1478
|
-
if (typeof object.type === "number") {
|
|
1479
|
-
message.type = object.type;
|
|
1480
|
-
break;
|
|
1481
|
-
}
|
|
1482
|
-
break;
|
|
1483
|
-
case "TYPE_STDIN":
|
|
1484
|
-
case 0:
|
|
1485
|
-
message.type = 0;
|
|
1486
|
-
break;
|
|
1487
|
-
case "TYPE_STDOUT":
|
|
1488
|
-
case 1:
|
|
1489
|
-
message.type = 1;
|
|
1490
|
-
break;
|
|
1491
|
-
case "TYPE_STDERR":
|
|
1492
|
-
case 2:
|
|
1493
|
-
message.type = 2;
|
|
1494
|
-
break;
|
|
1495
|
-
}
|
|
1496
|
-
if (object.data != null) {
|
|
1497
|
-
if (typeof object.data === "string")
|
|
1498
|
-
$util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
|
|
1499
|
-
else if (object.data.length >= 0)
|
|
1500
|
-
message.data = object.data;
|
|
1501
|
-
}
|
|
1502
|
-
if (object.eos != null) {
|
|
1503
|
-
if (typeof object.eos !== "object")
|
|
1504
|
-
throw TypeError(".rstream.webtty.protobuf.Data.eos: object expected");
|
|
1505
|
-
message.eos = $root.rstream.webtty.protobuf.EndOfStream.fromObject(object.eos, _depth + 1);
|
|
1506
|
-
}
|
|
1507
|
-
return message;
|
|
1508
|
-
};
|
|
1509
|
-
Data.toObject = function toObject(message, options) {
|
|
1510
|
-
if (!options)
|
|
1511
|
-
options = {};
|
|
1512
|
-
let object = {};
|
|
1513
|
-
if (options.defaults)
|
|
1514
|
-
object.type = options.enums === String ? "TYPE_STDIN" : 0;
|
|
1515
|
-
if (message.type != null && message.hasOwnProperty("type"))
|
|
1516
|
-
object.type = options.enums === String ? $root.rstream.webtty.protobuf.Data.Type[message.type] === void 0 ? message.type : $root.rstream.webtty.protobuf.Data.Type[message.type] : message.type;
|
|
1517
|
-
if (message.data != null && message.hasOwnProperty("data")) {
|
|
1518
|
-
object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
|
|
1519
|
-
if (options.oneofs)
|
|
1520
|
-
object.payload = "data";
|
|
1521
|
-
}
|
|
1522
|
-
if (message.eos != null && message.hasOwnProperty("eos")) {
|
|
1523
|
-
object.eos = $root.rstream.webtty.protobuf.EndOfStream.toObject(message.eos, options);
|
|
1524
|
-
if (options.oneofs)
|
|
1525
|
-
object.payload = "eos";
|
|
1526
|
-
}
|
|
1527
|
-
return object;
|
|
1528
|
-
};
|
|
1529
|
-
Data.prototype.toJSON = function toJSON() {
|
|
1530
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1531
|
-
};
|
|
1532
|
-
Data.getTypeUrl = function getTypeUrl(prefix) {
|
|
1533
|
-
if (prefix === void 0)
|
|
1534
|
-
prefix = "type.googleapis.com";
|
|
1535
|
-
return prefix + "/rstream.webtty.protobuf.Data";
|
|
1536
|
-
};
|
|
1537
|
-
Data.Type = (function() {
|
|
1538
|
-
const valuesById = {}, values = Object.create(valuesById);
|
|
1539
|
-
values[valuesById[0] = "TYPE_STDIN"] = 0;
|
|
1540
|
-
values[valuesById[1] = "TYPE_STDOUT"] = 1;
|
|
1541
|
-
values[valuesById[2] = "TYPE_STDERR"] = 2;
|
|
1542
|
-
return values;
|
|
1543
|
-
})();
|
|
1544
|
-
return Data;
|
|
1545
|
-
})();
|
|
1546
|
-
protobuf.TerminalSize = (function() {
|
|
1547
|
-
function TerminalSize(properties) {
|
|
1548
|
-
if (properties) {
|
|
1549
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1550
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1551
|
-
this[keys[i]] = properties[keys[i]];
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
TerminalSize.prototype.row = 0;
|
|
1555
|
-
TerminalSize.prototype.col = 0;
|
|
1556
|
-
TerminalSize.prototype.xpixel = 0;
|
|
1557
|
-
TerminalSize.prototype.ypixel = 0;
|
|
1558
|
-
TerminalSize.create = function create(properties) {
|
|
1559
|
-
return new TerminalSize(properties);
|
|
1560
|
-
};
|
|
1561
|
-
TerminalSize.encode = function encode(message, writer) {
|
|
1562
|
-
if (!writer)
|
|
1563
|
-
writer = $Writer.create();
|
|
1564
|
-
if (message.row != null && Object.hasOwnProperty.call(message, "row"))
|
|
1565
|
-
writer.uint32(
|
|
1566
|
-
/* id 1, wireType 0 =*/
|
|
1567
|
-
8
|
|
1568
|
-
).uint32(message.row);
|
|
1569
|
-
if (message.col != null && Object.hasOwnProperty.call(message, "col"))
|
|
1570
|
-
writer.uint32(
|
|
1571
|
-
/* id 2, wireType 0 =*/
|
|
1572
|
-
16
|
|
1573
|
-
).uint32(message.col);
|
|
1574
|
-
if (message.xpixel != null && Object.hasOwnProperty.call(message, "xpixel"))
|
|
1575
|
-
writer.uint32(
|
|
1576
|
-
/* id 3, wireType 0 =*/
|
|
1577
|
-
24
|
|
1578
|
-
).uint32(message.xpixel);
|
|
1579
|
-
if (message.ypixel != null && Object.hasOwnProperty.call(message, "ypixel"))
|
|
1580
|
-
writer.uint32(
|
|
1581
|
-
/* id 4, wireType 0 =*/
|
|
1582
|
-
32
|
|
1583
|
-
).uint32(message.ypixel);
|
|
1584
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1585
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1586
|
-
writer.raw(message.$unknowns[i]);
|
|
1587
|
-
return writer;
|
|
1588
|
-
};
|
|
1589
|
-
TerminalSize.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1590
|
-
return this.encode(message, writer).ldelim();
|
|
1591
|
-
};
|
|
1592
|
-
TerminalSize.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1593
|
-
if (!(reader instanceof $Reader))
|
|
1594
|
-
reader = $Reader.create(reader);
|
|
1595
|
-
if (_depth === void 0)
|
|
1596
|
-
_depth = 0;
|
|
1597
|
-
if (_depth > $Reader.recursionLimit)
|
|
1598
|
-
throw Error("max depth exceeded");
|
|
1599
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.TerminalSize(), value;
|
|
1600
|
-
while (reader.pos < end) {
|
|
1601
|
-
let start = reader.pos;
|
|
1602
|
-
let tag = reader.tag();
|
|
1603
|
-
if (tag === _end) {
|
|
1604
|
-
_end = void 0;
|
|
1605
|
-
break;
|
|
1606
|
-
}
|
|
1607
|
-
let wireType = tag & 7;
|
|
1608
|
-
switch (tag >>>= 3) {
|
|
1609
|
-
case 1: {
|
|
1610
|
-
if (wireType !== 0)
|
|
1611
|
-
break;
|
|
1612
|
-
if (value = reader.uint32())
|
|
1613
|
-
message.row = value;
|
|
1614
|
-
else
|
|
1615
|
-
delete message.row;
|
|
1616
|
-
continue;
|
|
1617
|
-
}
|
|
1618
|
-
case 2: {
|
|
1619
|
-
if (wireType !== 0)
|
|
1620
|
-
break;
|
|
1621
|
-
if (value = reader.uint32())
|
|
1622
|
-
message.col = value;
|
|
1623
|
-
else
|
|
1624
|
-
delete message.col;
|
|
1625
|
-
continue;
|
|
1626
|
-
}
|
|
1627
|
-
case 3: {
|
|
1628
|
-
if (wireType !== 0)
|
|
1629
|
-
break;
|
|
1630
|
-
if (value = reader.uint32())
|
|
1631
|
-
message.xpixel = value;
|
|
1632
|
-
else
|
|
1633
|
-
delete message.xpixel;
|
|
1634
|
-
continue;
|
|
1635
|
-
}
|
|
1636
|
-
case 4: {
|
|
1637
|
-
if (wireType !== 0)
|
|
1638
|
-
break;
|
|
1639
|
-
if (value = reader.uint32())
|
|
1640
|
-
message.ypixel = value;
|
|
1641
|
-
else
|
|
1642
|
-
delete message.ypixel;
|
|
1643
|
-
continue;
|
|
1644
|
-
}
|
|
1645
|
-
}
|
|
1646
|
-
reader.skipType(wireType, _depth, tag);
|
|
1647
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1648
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1649
|
-
}
|
|
1650
|
-
if (_end !== void 0)
|
|
1651
|
-
throw Error("missing end group");
|
|
1652
|
-
return message;
|
|
1653
|
-
};
|
|
1654
|
-
TerminalSize.decodeDelimited = function decodeDelimited(reader) {
|
|
1655
|
-
if (!(reader instanceof $Reader))
|
|
1656
|
-
reader = new $Reader(reader);
|
|
1657
|
-
return this.decode(reader, reader.uint32());
|
|
1658
|
-
};
|
|
1659
|
-
TerminalSize.verify = function verify(message, _depth) {
|
|
1660
|
-
if (typeof message !== "object" || message === null)
|
|
1661
|
-
return "object expected";
|
|
1662
|
-
if (_depth === void 0)
|
|
1663
|
-
_depth = 0;
|
|
1664
|
-
if (_depth > $util.recursionLimit)
|
|
1665
|
-
return "max depth exceeded";
|
|
1666
|
-
if (message.row != null && message.hasOwnProperty("row")) {
|
|
1667
|
-
if (!$util.isInteger(message.row))
|
|
1668
|
-
return "row: integer expected";
|
|
1669
|
-
}
|
|
1670
|
-
if (message.col != null && message.hasOwnProperty("col")) {
|
|
1671
|
-
if (!$util.isInteger(message.col))
|
|
1672
|
-
return "col: integer expected";
|
|
1673
|
-
}
|
|
1674
|
-
if (message.xpixel != null && message.hasOwnProperty("xpixel")) {
|
|
1675
|
-
if (!$util.isInteger(message.xpixel))
|
|
1676
|
-
return "xpixel: integer expected";
|
|
1677
|
-
}
|
|
1678
|
-
if (message.ypixel != null && message.hasOwnProperty("ypixel")) {
|
|
1679
|
-
if (!$util.isInteger(message.ypixel))
|
|
1680
|
-
return "ypixel: integer expected";
|
|
1681
|
-
}
|
|
1682
|
-
return null;
|
|
1683
|
-
};
|
|
1684
|
-
TerminalSize.fromObject = function fromObject(object, _depth) {
|
|
1685
|
-
if (object instanceof $root.rstream.webtty.protobuf.TerminalSize)
|
|
1686
|
-
return object;
|
|
1687
|
-
if (_depth === void 0)
|
|
1688
|
-
_depth = 0;
|
|
1689
|
-
if (_depth > $util.recursionLimit)
|
|
1690
|
-
throw Error("max depth exceeded");
|
|
1691
|
-
let message = new $root.rstream.webtty.protobuf.TerminalSize();
|
|
1692
|
-
if (object.row != null) {
|
|
1693
|
-
if (Number(object.row) !== 0)
|
|
1694
|
-
message.row = object.row >>> 0;
|
|
1695
|
-
}
|
|
1696
|
-
if (object.col != null) {
|
|
1697
|
-
if (Number(object.col) !== 0)
|
|
1698
|
-
message.col = object.col >>> 0;
|
|
1699
|
-
}
|
|
1700
|
-
if (object.xpixel != null) {
|
|
1701
|
-
if (Number(object.xpixel) !== 0)
|
|
1702
|
-
message.xpixel = object.xpixel >>> 0;
|
|
1703
|
-
}
|
|
1704
|
-
if (object.ypixel != null) {
|
|
1705
|
-
if (Number(object.ypixel) !== 0)
|
|
1706
|
-
message.ypixel = object.ypixel >>> 0;
|
|
1707
|
-
}
|
|
1708
|
-
return message;
|
|
1709
|
-
};
|
|
1710
|
-
TerminalSize.toObject = function toObject(message, options) {
|
|
1711
|
-
if (!options)
|
|
1712
|
-
options = {};
|
|
1713
|
-
let object = {};
|
|
1714
|
-
if (options.defaults) {
|
|
1715
|
-
object.row = 0;
|
|
1716
|
-
object.col = 0;
|
|
1717
|
-
object.xpixel = 0;
|
|
1718
|
-
object.ypixel = 0;
|
|
1719
|
-
}
|
|
1720
|
-
if (message.row != null && message.hasOwnProperty("row"))
|
|
1721
|
-
object.row = message.row;
|
|
1722
|
-
if (message.col != null && message.hasOwnProperty("col"))
|
|
1723
|
-
object.col = message.col;
|
|
1724
|
-
if (message.xpixel != null && message.hasOwnProperty("xpixel"))
|
|
1725
|
-
object.xpixel = message.xpixel;
|
|
1726
|
-
if (message.ypixel != null && message.hasOwnProperty("ypixel"))
|
|
1727
|
-
object.ypixel = message.ypixel;
|
|
1728
|
-
return object;
|
|
1729
|
-
};
|
|
1730
|
-
TerminalSize.prototype.toJSON = function toJSON() {
|
|
1731
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1732
|
-
};
|
|
1733
|
-
TerminalSize.getTypeUrl = function getTypeUrl(prefix) {
|
|
1734
|
-
if (prefix === void 0)
|
|
1735
|
-
prefix = "type.googleapis.com";
|
|
1736
|
-
return prefix + "/rstream.webtty.protobuf.TerminalSize";
|
|
1737
|
-
};
|
|
1738
|
-
return TerminalSize;
|
|
1739
|
-
})();
|
|
1740
|
-
protobuf.Parameter = (function() {
|
|
1741
|
-
function Parameter(properties) {
|
|
1742
|
-
if (properties) {
|
|
1743
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1744
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1745
|
-
this[keys[i]] = properties[keys[i]];
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
Parameter.prototype.terminalSize = null;
|
|
1749
|
-
let $oneOfFields;
|
|
1750
|
-
Object.defineProperty(Parameter.prototype, "parameter", {
|
|
1751
|
-
get: $util.oneOfGetter($oneOfFields = ["terminalSize"]),
|
|
1752
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
1753
|
-
});
|
|
1754
|
-
Parameter.create = function create(properties) {
|
|
1755
|
-
return new Parameter(properties);
|
|
1756
|
-
};
|
|
1757
|
-
Parameter.encode = function encode(message, writer) {
|
|
1758
|
-
if (!writer)
|
|
1759
|
-
writer = $Writer.create();
|
|
1760
|
-
if (message.terminalSize != null && Object.hasOwnProperty.call(message, "terminalSize"))
|
|
1761
|
-
$root.rstream.webtty.protobuf.TerminalSize.encode(message.terminalSize, writer.uint32(
|
|
1762
|
-
/* id 1, wireType 2 =*/
|
|
1763
|
-
10
|
|
1764
|
-
).fork()).ldelim();
|
|
1765
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1766
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1767
|
-
writer.raw(message.$unknowns[i]);
|
|
1768
|
-
return writer;
|
|
1769
|
-
};
|
|
1770
|
-
Parameter.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1771
|
-
return this.encode(message, writer).ldelim();
|
|
1772
|
-
};
|
|
1773
|
-
Parameter.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1774
|
-
if (!(reader instanceof $Reader))
|
|
1775
|
-
reader = $Reader.create(reader);
|
|
1776
|
-
if (_depth === void 0)
|
|
1777
|
-
_depth = 0;
|
|
1778
|
-
if (_depth > $Reader.recursionLimit)
|
|
1779
|
-
throw Error("max depth exceeded");
|
|
1780
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Parameter();
|
|
1781
|
-
while (reader.pos < end) {
|
|
1782
|
-
let start = reader.pos;
|
|
1783
|
-
let tag = reader.tag();
|
|
1784
|
-
if (tag === _end) {
|
|
1785
|
-
_end = void 0;
|
|
1786
|
-
break;
|
|
1787
|
-
}
|
|
1788
|
-
let wireType = tag & 7;
|
|
1789
|
-
switch (tag >>>= 3) {
|
|
1790
|
-
case 1: {
|
|
1791
|
-
if (wireType !== 2)
|
|
1792
|
-
break;
|
|
1793
|
-
message.terminalSize = $root.rstream.webtty.protobuf.TerminalSize.decode(reader, reader.uint32(), void 0, _depth + 1, message.terminalSize);
|
|
1794
|
-
message.parameter = "terminalSize";
|
|
1795
|
-
continue;
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
reader.skipType(wireType, _depth, tag);
|
|
1799
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1800
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1801
|
-
}
|
|
1802
|
-
if (_end !== void 0)
|
|
1803
|
-
throw Error("missing end group");
|
|
1804
|
-
return message;
|
|
1805
|
-
};
|
|
1806
|
-
Parameter.decodeDelimited = function decodeDelimited(reader) {
|
|
1807
|
-
if (!(reader instanceof $Reader))
|
|
1808
|
-
reader = new $Reader(reader);
|
|
1809
|
-
return this.decode(reader, reader.uint32());
|
|
1810
|
-
};
|
|
1811
|
-
Parameter.verify = function verify(message, _depth) {
|
|
1812
|
-
if (typeof message !== "object" || message === null)
|
|
1813
|
-
return "object expected";
|
|
1814
|
-
if (_depth === void 0)
|
|
1815
|
-
_depth = 0;
|
|
1816
|
-
if (_depth > $util.recursionLimit)
|
|
1817
|
-
return "max depth exceeded";
|
|
1818
|
-
let properties = {};
|
|
1819
|
-
if (message.terminalSize != null && message.hasOwnProperty("terminalSize")) {
|
|
1820
|
-
properties.parameter = 1;
|
|
1821
|
-
{
|
|
1822
|
-
let error = $root.rstream.webtty.protobuf.TerminalSize.verify(message.terminalSize, _depth + 1);
|
|
1823
|
-
if (error)
|
|
1824
|
-
return "terminalSize." + error;
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
return null;
|
|
1828
|
-
};
|
|
1829
|
-
Parameter.fromObject = function fromObject(object, _depth) {
|
|
1830
|
-
if (object instanceof $root.rstream.webtty.protobuf.Parameter)
|
|
1831
|
-
return object;
|
|
1832
|
-
if (_depth === void 0)
|
|
1833
|
-
_depth = 0;
|
|
1834
|
-
if (_depth > $util.recursionLimit)
|
|
1835
|
-
throw Error("max depth exceeded");
|
|
1836
|
-
let message = new $root.rstream.webtty.protobuf.Parameter();
|
|
1837
|
-
if (object.terminalSize != null) {
|
|
1838
|
-
if (typeof object.terminalSize !== "object")
|
|
1839
|
-
throw TypeError(".rstream.webtty.protobuf.Parameter.terminalSize: object expected");
|
|
1840
|
-
message.terminalSize = $root.rstream.webtty.protobuf.TerminalSize.fromObject(object.terminalSize, _depth + 1);
|
|
1841
|
-
}
|
|
1842
|
-
return message;
|
|
1843
|
-
};
|
|
1844
|
-
Parameter.toObject = function toObject(message, options) {
|
|
1845
|
-
if (!options)
|
|
1846
|
-
options = {};
|
|
1847
|
-
let object = {};
|
|
1848
|
-
if (message.terminalSize != null && message.hasOwnProperty("terminalSize")) {
|
|
1849
|
-
object.terminalSize = $root.rstream.webtty.protobuf.TerminalSize.toObject(message.terminalSize, options);
|
|
1850
|
-
if (options.oneofs)
|
|
1851
|
-
object.parameter = "terminalSize";
|
|
1852
|
-
}
|
|
1853
|
-
return object;
|
|
1854
|
-
};
|
|
1855
|
-
Parameter.prototype.toJSON = function toJSON() {
|
|
1856
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1857
|
-
};
|
|
1858
|
-
Parameter.getTypeUrl = function getTypeUrl(prefix) {
|
|
1859
|
-
if (prefix === void 0)
|
|
1860
|
-
prefix = "type.googleapis.com";
|
|
1861
|
-
return prefix + "/rstream.webtty.protobuf.Parameter";
|
|
1862
|
-
};
|
|
1863
|
-
return Parameter;
|
|
1864
|
-
})();
|
|
1865
|
-
protobuf.Heartbeat = (function() {
|
|
1866
|
-
function Heartbeat(properties) {
|
|
1867
|
-
if (properties) {
|
|
1868
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1869
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1870
|
-
this[keys[i]] = properties[keys[i]];
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
Heartbeat.create = function create(properties) {
|
|
1874
|
-
return new Heartbeat(properties);
|
|
1875
|
-
};
|
|
1876
|
-
Heartbeat.encode = function encode(message, writer) {
|
|
1877
|
-
if (!writer)
|
|
1878
|
-
writer = $Writer.create();
|
|
1879
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
1880
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
1881
|
-
writer.raw(message.$unknowns[i]);
|
|
1882
|
-
return writer;
|
|
1883
|
-
};
|
|
1884
|
-
Heartbeat.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1885
|
-
return this.encode(message, writer).ldelim();
|
|
1886
|
-
};
|
|
1887
|
-
Heartbeat.decode = function decode(reader, length, _end, _depth, _target) {
|
|
1888
|
-
if (!(reader instanceof $Reader))
|
|
1889
|
-
reader = $Reader.create(reader);
|
|
1890
|
-
if (_depth === void 0)
|
|
1891
|
-
_depth = 0;
|
|
1892
|
-
if (_depth > $Reader.recursionLimit)
|
|
1893
|
-
throw Error("max depth exceeded");
|
|
1894
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Heartbeat();
|
|
1895
|
-
while (reader.pos < end) {
|
|
1896
|
-
let start = reader.pos;
|
|
1897
|
-
let tag = reader.tag();
|
|
1898
|
-
if (tag === _end) {
|
|
1899
|
-
_end = void 0;
|
|
1900
|
-
break;
|
|
1901
|
-
}
|
|
1902
|
-
reader.skipType(tag & 7, _depth, tag);
|
|
1903
|
-
$util.makeProp(message, "$unknowns", false);
|
|
1904
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
1905
|
-
}
|
|
1906
|
-
if (_end !== void 0)
|
|
1907
|
-
throw Error("missing end group");
|
|
1908
|
-
return message;
|
|
1909
|
-
};
|
|
1910
|
-
Heartbeat.decodeDelimited = function decodeDelimited(reader) {
|
|
1911
|
-
if (!(reader instanceof $Reader))
|
|
1912
|
-
reader = new $Reader(reader);
|
|
1913
|
-
return this.decode(reader, reader.uint32());
|
|
1914
|
-
};
|
|
1915
|
-
Heartbeat.verify = function verify(message, _depth) {
|
|
1916
|
-
if (typeof message !== "object" || message === null)
|
|
1917
|
-
return "object expected";
|
|
1918
|
-
if (_depth === void 0)
|
|
1919
|
-
_depth = 0;
|
|
1920
|
-
if (_depth > $util.recursionLimit)
|
|
1921
|
-
return "max depth exceeded";
|
|
1922
|
-
return null;
|
|
1923
|
-
};
|
|
1924
|
-
Heartbeat.fromObject = function fromObject(object, _depth) {
|
|
1925
|
-
if (object instanceof $root.rstream.webtty.protobuf.Heartbeat)
|
|
1926
|
-
return object;
|
|
1927
|
-
if (_depth === void 0)
|
|
1928
|
-
_depth = 0;
|
|
1929
|
-
if (_depth > $util.recursionLimit)
|
|
1930
|
-
throw Error("max depth exceeded");
|
|
1931
|
-
return new $root.rstream.webtty.protobuf.Heartbeat();
|
|
1932
|
-
};
|
|
1933
|
-
Heartbeat.toObject = function toObject() {
|
|
1934
|
-
return {};
|
|
1935
|
-
};
|
|
1936
|
-
Heartbeat.prototype.toJSON = function toJSON() {
|
|
1937
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1938
|
-
};
|
|
1939
|
-
Heartbeat.getTypeUrl = function getTypeUrl(prefix) {
|
|
1940
|
-
if (prefix === void 0)
|
|
1941
|
-
prefix = "type.googleapis.com";
|
|
1942
|
-
return prefix + "/rstream.webtty.protobuf.Heartbeat";
|
|
1943
|
-
};
|
|
1944
|
-
return Heartbeat;
|
|
1945
|
-
})();
|
|
1946
|
-
protobuf.Message = (function() {
|
|
1947
|
-
function Message(properties) {
|
|
1948
|
-
if (properties) {
|
|
1949
|
-
for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1950
|
-
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
1951
|
-
this[keys[i]] = properties[keys[i]];
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
Message.prototype.open = null;
|
|
1955
|
-
Message.prototype.ack = null;
|
|
1956
|
-
Message.prototype.error = null;
|
|
1957
|
-
Message.prototype.close = null;
|
|
1958
|
-
Message.prototype.data = null;
|
|
1959
|
-
Message.prototype.parameter = null;
|
|
1960
|
-
Message.prototype.heartbeat = null;
|
|
1961
|
-
let $oneOfFields;
|
|
1962
|
-
Object.defineProperty(Message.prototype, "payload", {
|
|
1963
|
-
get: $util.oneOfGetter($oneOfFields = ["open", "ack", "error", "close", "data", "parameter", "heartbeat"]),
|
|
1964
|
-
set: $util.oneOfSetter($oneOfFields)
|
|
1965
|
-
});
|
|
1966
|
-
Message.create = function create(properties) {
|
|
1967
|
-
return new Message(properties);
|
|
1968
|
-
};
|
|
1969
|
-
Message.encode = function encode(message, writer) {
|
|
1970
|
-
if (!writer)
|
|
1971
|
-
writer = $Writer.create();
|
|
1972
|
-
if (message.open != null && Object.hasOwnProperty.call(message, "open"))
|
|
1973
|
-
$root.rstream.webtty.protobuf.Open.encode(message.open, writer.uint32(
|
|
1974
|
-
/* id 1, wireType 2 =*/
|
|
1975
|
-
10
|
|
1976
|
-
).fork()).ldelim();
|
|
1977
|
-
if (message.ack != null && Object.hasOwnProperty.call(message, "ack"))
|
|
1978
|
-
$root.rstream.webtty.protobuf.Ack.encode(message.ack, writer.uint32(
|
|
1979
|
-
/* id 2, wireType 2 =*/
|
|
1980
|
-
18
|
|
1981
|
-
).fork()).ldelim();
|
|
1982
|
-
if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
|
1983
|
-
$root.rstream.webtty.protobuf.Error.encode(message.error, writer.uint32(
|
|
1984
|
-
/* id 3, wireType 2 =*/
|
|
1985
|
-
26
|
|
1986
|
-
).fork()).ldelim();
|
|
1987
|
-
if (message.close != null && Object.hasOwnProperty.call(message, "close"))
|
|
1988
|
-
$root.rstream.webtty.protobuf.Close.encode(message.close, writer.uint32(
|
|
1989
|
-
/* id 4, wireType 2 =*/
|
|
1990
|
-
34
|
|
1991
|
-
).fork()).ldelim();
|
|
1992
|
-
if (message.data != null && Object.hasOwnProperty.call(message, "data"))
|
|
1993
|
-
$root.rstream.webtty.protobuf.Data.encode(message.data, writer.uint32(
|
|
1994
|
-
/* id 5, wireType 2 =*/
|
|
1995
|
-
42
|
|
1996
|
-
).fork()).ldelim();
|
|
1997
|
-
if (message.parameter != null && Object.hasOwnProperty.call(message, "parameter"))
|
|
1998
|
-
$root.rstream.webtty.protobuf.Parameter.encode(message.parameter, writer.uint32(
|
|
1999
|
-
/* id 6, wireType 2 =*/
|
|
2000
|
-
50
|
|
2001
|
-
).fork()).ldelim();
|
|
2002
|
-
if (message.heartbeat != null && Object.hasOwnProperty.call(message, "heartbeat"))
|
|
2003
|
-
$root.rstream.webtty.protobuf.Heartbeat.encode(message.heartbeat, writer.uint32(
|
|
2004
|
-
/* id 7, wireType 2 =*/
|
|
2005
|
-
58
|
|
2006
|
-
).fork()).ldelim();
|
|
2007
|
-
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
2008
|
-
for (let i = 0; i < message.$unknowns.length; ++i)
|
|
2009
|
-
writer.raw(message.$unknowns[i]);
|
|
2010
|
-
return writer;
|
|
2011
|
-
};
|
|
2012
|
-
Message.encodeDelimited = function encodeDelimited(message, writer) {
|
|
2013
|
-
return this.encode(message, writer).ldelim();
|
|
2014
|
-
};
|
|
2015
|
-
Message.decode = function decode(reader, length, _end, _depth, _target) {
|
|
2016
|
-
if (!(reader instanceof $Reader))
|
|
2017
|
-
reader = $Reader.create(reader);
|
|
2018
|
-
if (_depth === void 0)
|
|
2019
|
-
_depth = 0;
|
|
2020
|
-
if (_depth > $Reader.recursionLimit)
|
|
2021
|
-
throw Error("max depth exceeded");
|
|
2022
|
-
let end = length === void 0 ? reader.len : reader.pos + length, message = _target || new $root.rstream.webtty.protobuf.Message();
|
|
2023
|
-
while (reader.pos < end) {
|
|
2024
|
-
let start = reader.pos;
|
|
2025
|
-
let tag = reader.tag();
|
|
2026
|
-
if (tag === _end) {
|
|
2027
|
-
_end = void 0;
|
|
2028
|
-
break;
|
|
2029
|
-
}
|
|
2030
|
-
let wireType = tag & 7;
|
|
2031
|
-
switch (tag >>>= 3) {
|
|
2032
|
-
case 1: {
|
|
2033
|
-
if (wireType !== 2)
|
|
2034
|
-
break;
|
|
2035
|
-
message.open = $root.rstream.webtty.protobuf.Open.decode(reader, reader.uint32(), void 0, _depth + 1, message.open);
|
|
2036
|
-
message.payload = "open";
|
|
2037
|
-
continue;
|
|
2038
|
-
}
|
|
2039
|
-
case 2: {
|
|
2040
|
-
if (wireType !== 2)
|
|
2041
|
-
break;
|
|
2042
|
-
message.ack = $root.rstream.webtty.protobuf.Ack.decode(reader, reader.uint32(), void 0, _depth + 1, message.ack);
|
|
2043
|
-
message.payload = "ack";
|
|
2044
|
-
continue;
|
|
2045
|
-
}
|
|
2046
|
-
case 3: {
|
|
2047
|
-
if (wireType !== 2)
|
|
2048
|
-
break;
|
|
2049
|
-
message.error = $root.rstream.webtty.protobuf.Error.decode(reader, reader.uint32(), void 0, _depth + 1, message.error);
|
|
2050
|
-
message.payload = "error";
|
|
2051
|
-
continue;
|
|
2052
|
-
}
|
|
2053
|
-
case 4: {
|
|
2054
|
-
if (wireType !== 2)
|
|
2055
|
-
break;
|
|
2056
|
-
message.close = $root.rstream.webtty.protobuf.Close.decode(reader, reader.uint32(), void 0, _depth + 1, message.close);
|
|
2057
|
-
message.payload = "close";
|
|
2058
|
-
continue;
|
|
2059
|
-
}
|
|
2060
|
-
case 5: {
|
|
2061
|
-
if (wireType !== 2)
|
|
2062
|
-
break;
|
|
2063
|
-
message.data = $root.rstream.webtty.protobuf.Data.decode(reader, reader.uint32(), void 0, _depth + 1, message.data);
|
|
2064
|
-
message.payload = "data";
|
|
2065
|
-
continue;
|
|
2066
|
-
}
|
|
2067
|
-
case 6: {
|
|
2068
|
-
if (wireType !== 2)
|
|
2069
|
-
break;
|
|
2070
|
-
message.parameter = $root.rstream.webtty.protobuf.Parameter.decode(reader, reader.uint32(), void 0, _depth + 1, message.parameter);
|
|
2071
|
-
message.payload = "parameter";
|
|
2072
|
-
continue;
|
|
2073
|
-
}
|
|
2074
|
-
case 7: {
|
|
2075
|
-
if (wireType !== 2)
|
|
2076
|
-
break;
|
|
2077
|
-
message.heartbeat = $root.rstream.webtty.protobuf.Heartbeat.decode(reader, reader.uint32(), void 0, _depth + 1, message.heartbeat);
|
|
2078
|
-
message.payload = "heartbeat";
|
|
2079
|
-
continue;
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
reader.skipType(wireType, _depth, tag);
|
|
2083
|
-
$util.makeProp(message, "$unknowns", false);
|
|
2084
|
-
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
2085
|
-
}
|
|
2086
|
-
if (_end !== void 0)
|
|
2087
|
-
throw Error("missing end group");
|
|
2088
|
-
return message;
|
|
2089
|
-
};
|
|
2090
|
-
Message.decodeDelimited = function decodeDelimited(reader) {
|
|
2091
|
-
if (!(reader instanceof $Reader))
|
|
2092
|
-
reader = new $Reader(reader);
|
|
2093
|
-
return this.decode(reader, reader.uint32());
|
|
2094
|
-
};
|
|
2095
|
-
Message.verify = function verify(message, _depth) {
|
|
2096
|
-
if (typeof message !== "object" || message === null)
|
|
2097
|
-
return "object expected";
|
|
2098
|
-
if (_depth === void 0)
|
|
2099
|
-
_depth = 0;
|
|
2100
|
-
if (_depth > $util.recursionLimit)
|
|
2101
|
-
return "max depth exceeded";
|
|
2102
|
-
let properties = {};
|
|
2103
|
-
if (message.open != null && message.hasOwnProperty("open")) {
|
|
2104
|
-
properties.payload = 1;
|
|
2105
|
-
{
|
|
2106
|
-
let error = $root.rstream.webtty.protobuf.Open.verify(message.open, _depth + 1);
|
|
2107
|
-
if (error)
|
|
2108
|
-
return "open." + error;
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
if (message.ack != null && message.hasOwnProperty("ack")) {
|
|
2112
|
-
if (properties.payload === 1)
|
|
2113
|
-
return "payload: multiple values";
|
|
2114
|
-
properties.payload = 1;
|
|
2115
|
-
{
|
|
2116
|
-
let error = $root.rstream.webtty.protobuf.Ack.verify(message.ack, _depth + 1);
|
|
2117
|
-
if (error)
|
|
2118
|
-
return "ack." + error;
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
if (message.error != null && message.hasOwnProperty("error")) {
|
|
2122
|
-
if (properties.payload === 1)
|
|
2123
|
-
return "payload: multiple values";
|
|
2124
|
-
properties.payload = 1;
|
|
2125
|
-
{
|
|
2126
|
-
let error = $root.rstream.webtty.protobuf.Error.verify(message.error, _depth + 1);
|
|
2127
|
-
if (error)
|
|
2128
|
-
return "error." + error;
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
if (message.close != null && message.hasOwnProperty("close")) {
|
|
2132
|
-
if (properties.payload === 1)
|
|
2133
|
-
return "payload: multiple values";
|
|
2134
|
-
properties.payload = 1;
|
|
2135
|
-
{
|
|
2136
|
-
let error = $root.rstream.webtty.protobuf.Close.verify(message.close, _depth + 1);
|
|
2137
|
-
if (error)
|
|
2138
|
-
return "close." + error;
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
if (message.data != null && message.hasOwnProperty("data")) {
|
|
2142
|
-
if (properties.payload === 1)
|
|
2143
|
-
return "payload: multiple values";
|
|
2144
|
-
properties.payload = 1;
|
|
2145
|
-
{
|
|
2146
|
-
let error = $root.rstream.webtty.protobuf.Data.verify(message.data, _depth + 1);
|
|
2147
|
-
if (error)
|
|
2148
|
-
return "data." + error;
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
if (message.parameter != null && message.hasOwnProperty("parameter")) {
|
|
2152
|
-
if (properties.payload === 1)
|
|
2153
|
-
return "payload: multiple values";
|
|
2154
|
-
properties.payload = 1;
|
|
2155
|
-
{
|
|
2156
|
-
let error = $root.rstream.webtty.protobuf.Parameter.verify(message.parameter, _depth + 1);
|
|
2157
|
-
if (error)
|
|
2158
|
-
return "parameter." + error;
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) {
|
|
2162
|
-
if (properties.payload === 1)
|
|
2163
|
-
return "payload: multiple values";
|
|
2164
|
-
properties.payload = 1;
|
|
2165
|
-
{
|
|
2166
|
-
let error = $root.rstream.webtty.protobuf.Heartbeat.verify(message.heartbeat, _depth + 1);
|
|
2167
|
-
if (error)
|
|
2168
|
-
return "heartbeat." + error;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
return null;
|
|
2172
|
-
};
|
|
2173
|
-
Message.fromObject = function fromObject(object, _depth) {
|
|
2174
|
-
if (object instanceof $root.rstream.webtty.protobuf.Message)
|
|
2175
|
-
return object;
|
|
2176
|
-
if (_depth === void 0)
|
|
2177
|
-
_depth = 0;
|
|
2178
|
-
if (_depth > $util.recursionLimit)
|
|
2179
|
-
throw Error("max depth exceeded");
|
|
2180
|
-
let message = new $root.rstream.webtty.protobuf.Message();
|
|
2181
|
-
if (object.open != null) {
|
|
2182
|
-
if (typeof object.open !== "object")
|
|
2183
|
-
throw TypeError(".rstream.webtty.protobuf.Message.open: object expected");
|
|
2184
|
-
message.open = $root.rstream.webtty.protobuf.Open.fromObject(object.open, _depth + 1);
|
|
2185
|
-
}
|
|
2186
|
-
if (object.ack != null) {
|
|
2187
|
-
if (typeof object.ack !== "object")
|
|
2188
|
-
throw TypeError(".rstream.webtty.protobuf.Message.ack: object expected");
|
|
2189
|
-
message.ack = $root.rstream.webtty.protobuf.Ack.fromObject(object.ack, _depth + 1);
|
|
2190
|
-
}
|
|
2191
|
-
if (object.error != null) {
|
|
2192
|
-
if (typeof object.error !== "object")
|
|
2193
|
-
throw TypeError(".rstream.webtty.protobuf.Message.error: object expected");
|
|
2194
|
-
message.error = $root.rstream.webtty.protobuf.Error.fromObject(object.error, _depth + 1);
|
|
2195
|
-
}
|
|
2196
|
-
if (object.close != null) {
|
|
2197
|
-
if (typeof object.close !== "object")
|
|
2198
|
-
throw TypeError(".rstream.webtty.protobuf.Message.close: object expected");
|
|
2199
|
-
message.close = $root.rstream.webtty.protobuf.Close.fromObject(object.close, _depth + 1);
|
|
2200
|
-
}
|
|
2201
|
-
if (object.data != null) {
|
|
2202
|
-
if (typeof object.data !== "object")
|
|
2203
|
-
throw TypeError(".rstream.webtty.protobuf.Message.data: object expected");
|
|
2204
|
-
message.data = $root.rstream.webtty.protobuf.Data.fromObject(object.data, _depth + 1);
|
|
2205
|
-
}
|
|
2206
|
-
if (object.parameter != null) {
|
|
2207
|
-
if (typeof object.parameter !== "object")
|
|
2208
|
-
throw TypeError(".rstream.webtty.protobuf.Message.parameter: object expected");
|
|
2209
|
-
message.parameter = $root.rstream.webtty.protobuf.Parameter.fromObject(object.parameter, _depth + 1);
|
|
2210
|
-
}
|
|
2211
|
-
if (object.heartbeat != null) {
|
|
2212
|
-
if (typeof object.heartbeat !== "object")
|
|
2213
|
-
throw TypeError(".rstream.webtty.protobuf.Message.heartbeat: object expected");
|
|
2214
|
-
message.heartbeat = $root.rstream.webtty.protobuf.Heartbeat.fromObject(object.heartbeat, _depth + 1);
|
|
2215
|
-
}
|
|
2216
|
-
return message;
|
|
2217
|
-
};
|
|
2218
|
-
Message.toObject = function toObject(message, options) {
|
|
2219
|
-
if (!options)
|
|
2220
|
-
options = {};
|
|
2221
|
-
let object = {};
|
|
2222
|
-
if (message.open != null && message.hasOwnProperty("open")) {
|
|
2223
|
-
object.open = $root.rstream.webtty.protobuf.Open.toObject(message.open, options);
|
|
2224
|
-
if (options.oneofs)
|
|
2225
|
-
object.payload = "open";
|
|
2226
|
-
}
|
|
2227
|
-
if (message.ack != null && message.hasOwnProperty("ack")) {
|
|
2228
|
-
object.ack = $root.rstream.webtty.protobuf.Ack.toObject(message.ack, options);
|
|
2229
|
-
if (options.oneofs)
|
|
2230
|
-
object.payload = "ack";
|
|
2231
|
-
}
|
|
2232
|
-
if (message.error != null && message.hasOwnProperty("error")) {
|
|
2233
|
-
object.error = $root.rstream.webtty.protobuf.Error.toObject(message.error, options);
|
|
2234
|
-
if (options.oneofs)
|
|
2235
|
-
object.payload = "error";
|
|
2236
|
-
}
|
|
2237
|
-
if (message.close != null && message.hasOwnProperty("close")) {
|
|
2238
|
-
object.close = $root.rstream.webtty.protobuf.Close.toObject(message.close, options);
|
|
2239
|
-
if (options.oneofs)
|
|
2240
|
-
object.payload = "close";
|
|
2241
|
-
}
|
|
2242
|
-
if (message.data != null && message.hasOwnProperty("data")) {
|
|
2243
|
-
object.data = $root.rstream.webtty.protobuf.Data.toObject(message.data, options);
|
|
2244
|
-
if (options.oneofs)
|
|
2245
|
-
object.payload = "data";
|
|
2246
|
-
}
|
|
2247
|
-
if (message.parameter != null && message.hasOwnProperty("parameter")) {
|
|
2248
|
-
object.parameter = $root.rstream.webtty.protobuf.Parameter.toObject(message.parameter, options);
|
|
2249
|
-
if (options.oneofs)
|
|
2250
|
-
object.payload = "parameter";
|
|
2251
|
-
}
|
|
2252
|
-
if (message.heartbeat != null && message.hasOwnProperty("heartbeat")) {
|
|
2253
|
-
object.heartbeat = $root.rstream.webtty.protobuf.Heartbeat.toObject(message.heartbeat, options);
|
|
2254
|
-
if (options.oneofs)
|
|
2255
|
-
object.payload = "heartbeat";
|
|
2256
|
-
}
|
|
2257
|
-
return object;
|
|
2258
|
-
};
|
|
2259
|
-
Message.prototype.toJSON = function toJSON() {
|
|
2260
|
-
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
2261
|
-
};
|
|
2262
|
-
Message.getTypeUrl = function getTypeUrl(prefix) {
|
|
2263
|
-
if (prefix === void 0)
|
|
2264
|
-
prefix = "type.googleapis.com";
|
|
2265
|
-
return prefix + "/rstream.webtty.protobuf.Message";
|
|
2266
|
-
};
|
|
2267
|
-
return Message;
|
|
2268
|
-
})();
|
|
2269
|
-
return protobuf;
|
|
2270
|
-
})();
|
|
2271
|
-
return webtty;
|
|
2272
|
-
})();
|
|
2273
|
-
return rstream2;
|
|
2274
|
-
})();
|
|
2275
|
-
|
|
2276
|
-
// src/webtty.ts
|
|
2277
|
-
function getErrorMessage(error) {
|
|
2278
|
-
return error instanceof Error ? error.message : String(error);
|
|
2279
|
-
}
|
|
2280
|
-
function getWebSocketPayload(payload) {
|
|
2281
|
-
return new Uint8Array(payload);
|
|
2282
|
-
}
|
|
2283
|
-
var WebTTY = class {
|
|
2284
|
-
ws = null;
|
|
2285
|
-
connectionState = "preparing";
|
|
2286
|
-
heartbeatTimer = null;
|
|
2287
|
-
clientConfig;
|
|
2288
|
-
execConfig;
|
|
2289
|
-
events;
|
|
2290
|
-
/**
|
|
2291
|
-
* Creates a new WebTTY instance.
|
|
2292
|
-
*
|
|
2293
|
-
* @param clientConfig - WebSocket connection configuration.
|
|
2294
|
-
* @param execConfig - Execution parameters.
|
|
2295
|
-
* @param events - Event callbacks for the session.
|
|
2296
|
-
*/
|
|
2297
|
-
constructor(clientConfig2, execConfig, events) {
|
|
2298
|
-
this.clientConfig = {
|
|
2299
|
-
heartbeatIntervalMs: clientConfig2.heartbeatIntervalMs ?? 5e3,
|
|
2300
|
-
sendHeartbeat: clientConfig2.sendHeartbeat ?? true,
|
|
2301
|
-
url: clientConfig2.url
|
|
2302
|
-
};
|
|
2303
|
-
this.execConfig = {
|
|
2304
|
-
allocateTty: execConfig?.allocateTty ?? true,
|
|
2305
|
-
cmdArgs: execConfig?.cmdArgs,
|
|
2306
|
-
envVars: execConfig?.envVars ?? [],
|
|
2307
|
-
interactive: execConfig?.interactive ?? true,
|
|
2308
|
-
username: execConfig?.username,
|
|
2309
|
-
workdir: execConfig?.workdir
|
|
2310
|
-
};
|
|
2311
|
-
this.events = events || {};
|
|
2312
|
-
}
|
|
2313
|
-
/**
|
|
2314
|
-
* Connects to the WebTTY server and starts the session.
|
|
2315
|
-
*/
|
|
2316
|
-
connect() {
|
|
2317
|
-
if (this.connectionState !== "preparing") {
|
|
2318
|
-
throw new Error("Invalid state for connect().");
|
|
2319
|
-
}
|
|
2320
|
-
this.connectionState = "connecting";
|
|
2321
|
-
const wsUrl = typeof this.clientConfig.url === "string" ? this.clientConfig.url : this.clientConfig.url.toString();
|
|
2322
|
-
this.ws = new WebSocket(wsUrl);
|
|
2323
|
-
this.ws.binaryType = "arraybuffer";
|
|
2324
|
-
this.ws.addEventListener("open", this.handleOpen);
|
|
2325
|
-
this.ws.addEventListener("message", this.handleMessage);
|
|
2326
|
-
this.ws.addEventListener("error", this.handleError);
|
|
2327
|
-
this.ws.addEventListener("close", this.handleClose);
|
|
2328
|
-
}
|
|
2329
|
-
/**
|
|
2330
|
-
* Sends data to the remote server's STDIN.
|
|
2331
|
-
*
|
|
2332
|
-
* @param data - The data to send.
|
|
2333
|
-
*/
|
|
2334
|
-
writeStdin(data) {
|
|
2335
|
-
if (this.connectionState !== "connected" || !this.ws) {
|
|
2336
|
-
throw new Error("Invalid state for writeStdin().");
|
|
2337
|
-
}
|
|
2338
|
-
if (this.execConfig.interactive === false) {
|
|
2339
|
-
throw new Error("STDIN is unavailable in non-interactive mode.");
|
|
2340
|
-
}
|
|
2341
|
-
this.send(
|
|
2342
|
-
new rstream.webtty.protobuf.Message({
|
|
2343
|
-
data: new rstream.webtty.protobuf.Data({
|
|
2344
|
-
type: rstream.webtty.protobuf.Data.Type.TYPE_STDIN,
|
|
2345
|
-
data
|
|
2346
|
-
})
|
|
2347
|
-
})
|
|
2348
|
-
);
|
|
2349
|
-
}
|
|
2350
|
-
/**
|
|
2351
|
-
* Closes the remote STDIN stream (EOF).
|
|
2352
|
-
*/
|
|
2353
|
-
closeStdin() {
|
|
2354
|
-
if (this.connectionState !== "connected" || !this.ws) {
|
|
2355
|
-
throw new Error("Invalid state for closeStdin().");
|
|
2356
|
-
}
|
|
2357
|
-
if (this.execConfig.interactive === false) {
|
|
2358
|
-
throw new Error("STDIN is unavailable in non-interactive mode.");
|
|
2359
|
-
}
|
|
2360
|
-
this.send(
|
|
2361
|
-
new rstream.webtty.protobuf.Message({
|
|
2362
|
-
data: new rstream.webtty.protobuf.Data({
|
|
2363
|
-
type: rstream.webtty.protobuf.Data.Type.TYPE_STDIN,
|
|
2364
|
-
eos: new rstream.webtty.protobuf.EndOfStream()
|
|
2365
|
-
})
|
|
2366
|
-
})
|
|
2367
|
-
);
|
|
2368
|
-
}
|
|
2369
|
-
/**
|
|
2370
|
-
* Sends a "resize" request to the remote TTY with the provided rows and columns (and optional pixel sizes).
|
|
2371
|
-
*/
|
|
2372
|
-
resize(rows, cols, xpixel = 0, ypixel = 0) {
|
|
2373
|
-
if (this.connectionState !== "connected" || !this.ws) {
|
|
2374
|
-
throw new Error("Invalid state for resize().");
|
|
2375
|
-
}
|
|
2376
|
-
if (this.execConfig.allocateTty === false) {
|
|
2377
|
-
throw new Error("Resize is unavailable in non-TTY mode.");
|
|
2378
|
-
}
|
|
2379
|
-
const parameter = new rstream.webtty.protobuf.TerminalSize({
|
|
2380
|
-
row: rows,
|
|
2381
|
-
col: cols,
|
|
2382
|
-
xpixel,
|
|
2383
|
-
ypixel
|
|
2384
|
-
});
|
|
2385
|
-
const payload = new rstream.webtty.protobuf.Parameter({
|
|
2386
|
-
terminalSize: parameter
|
|
2387
|
-
});
|
|
2388
|
-
const msg = new rstream.webtty.protobuf.Message({
|
|
2389
|
-
parameter: payload
|
|
2390
|
-
});
|
|
2391
|
-
this.send(msg);
|
|
2392
|
-
}
|
|
2393
|
-
/**
|
|
2394
|
-
* Terminates the WebTTY session immediately.
|
|
2395
|
-
*/
|
|
2396
|
-
disconnect() {
|
|
2397
|
-
this.close("Session terminated by client.");
|
|
2398
|
-
}
|
|
2399
|
-
// ---------------------------------------------------------------------------------------------
|
|
2400
|
-
// Internal Handlers
|
|
2401
|
-
// ---------------------------------------------------------------------------------------------
|
|
2402
|
-
handleOpen = () => {
|
|
2403
|
-
if (this.connectionState !== "connecting") {
|
|
2404
|
-
return;
|
|
2405
|
-
}
|
|
2406
|
-
const opts = new rstream.webtty.protobuf.Options({
|
|
2407
|
-
interactive: this.execConfig.interactive,
|
|
2408
|
-
allocateTty: this.execConfig.allocateTty,
|
|
2409
|
-
sendHeartbeat: this.clientConfig.sendHeartbeat
|
|
2410
|
-
});
|
|
2411
|
-
const config = new rstream.webtty.protobuf.Config({
|
|
2412
|
-
options: opts,
|
|
2413
|
-
cmdArgs: this.execConfig.cmdArgs,
|
|
2414
|
-
envVars: this.execConfig.envVars.map(
|
|
2415
|
-
(e) => new rstream.webtty.protobuf.Environment({
|
|
2416
|
-
key: e.key,
|
|
2417
|
-
value: e.value
|
|
2418
|
-
})
|
|
2419
|
-
),
|
|
2420
|
-
workdir: this.execConfig.workdir ? new rstream.webtty.protobuf.Workdir({
|
|
2421
|
-
value: this.execConfig.workdir
|
|
2422
|
-
}) : void 0,
|
|
2423
|
-
username: typeof this.execConfig.username === "string" ? new rstream.webtty.protobuf.Username({
|
|
2424
|
-
name: this.execConfig.username
|
|
2425
|
-
}) : this.execConfig.username !== void 0 ? new rstream.webtty.protobuf.Username({
|
|
2426
|
-
id: this.execConfig.username
|
|
2427
|
-
}) : void 0
|
|
2428
|
-
});
|
|
2429
|
-
this.send(
|
|
2430
|
-
new rstream.webtty.protobuf.Message({
|
|
2431
|
-
open: new rstream.webtty.protobuf.Open({ config })
|
|
2432
|
-
})
|
|
2433
|
-
);
|
|
2434
|
-
};
|
|
2435
|
-
handleMessage = (evt) => {
|
|
2436
|
-
if (!evt.data) return;
|
|
2437
|
-
if (this.connectionState === "preparing" || this.connectionState === "closed")
|
|
2438
|
-
return;
|
|
2439
|
-
try {
|
|
2440
|
-
const message = rstream.webtty.protobuf.Message.decode(
|
|
2441
|
-
new Uint8Array(evt.data)
|
|
2442
|
-
);
|
|
2443
|
-
if (message.error) {
|
|
2444
|
-
this.close(`Server error (${message.error.msg})`);
|
|
2445
|
-
} else if (message.ack) {
|
|
2446
|
-
if (this.connectionState === "connecting") {
|
|
2447
|
-
this.connectionState = "connected";
|
|
2448
|
-
this.events.onConnect?.();
|
|
2449
|
-
if (this.clientConfig.sendHeartbeat) {
|
|
2450
|
-
this.heartbeatTimer = setInterval(
|
|
2451
|
-
() => this.sendHeartbeat(),
|
|
2452
|
-
this.clientConfig.heartbeatIntervalMs
|
|
2453
|
-
);
|
|
2454
|
-
}
|
|
2455
|
-
} else {
|
|
2456
|
-
this.close("Unexpected ACK message.");
|
|
2457
|
-
}
|
|
2458
|
-
} else if (message.close) {
|
|
2459
|
-
this.close(message.close.returnCode ?? 0);
|
|
2460
|
-
} else if (message.data) {
|
|
2461
|
-
if (this.connectionState === "connected") {
|
|
2462
|
-
if (message.data.type === rstream.webtty.protobuf.Data.Type.TYPE_STDOUT) {
|
|
2463
|
-
if (message.data.data) {
|
|
2464
|
-
this.events.onStdout?.(message.data.data);
|
|
2465
|
-
}
|
|
2466
|
-
if (message.data.eos) {
|
|
2467
|
-
this.events.onStdoutEos?.();
|
|
2468
|
-
}
|
|
2469
|
-
} else if (message.data.type === rstream.webtty.protobuf.Data.Type.TYPE_STDERR) {
|
|
2470
|
-
if (message.data.data) {
|
|
2471
|
-
this.events.onStderr?.(message.data.data);
|
|
2472
|
-
}
|
|
2473
|
-
if (message.data.eos) {
|
|
2474
|
-
this.events.onStderrEos?.();
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
} else {
|
|
2478
|
-
this.close("Unexpected data message.");
|
|
2479
|
-
}
|
|
2480
|
-
}
|
|
2481
|
-
} catch (error) {
|
|
2482
|
-
this.close(`Failed to decode message: ${getErrorMessage(error)}`);
|
|
2483
|
-
}
|
|
2484
|
-
};
|
|
2485
|
-
handleClose = () => {
|
|
2486
|
-
if (this.connectionState !== "closed") {
|
|
2487
|
-
this.close("WebSocket was closed unexpectedly.");
|
|
2488
|
-
}
|
|
2489
|
-
};
|
|
2490
|
-
handleError = () => {
|
|
2491
|
-
if (this.connectionState !== "closed") {
|
|
2492
|
-
this.close("WebSocket encountered an error.");
|
|
2493
|
-
}
|
|
2494
|
-
};
|
|
2495
|
-
sendHeartbeat() {
|
|
2496
|
-
this.send(
|
|
2497
|
-
new rstream.webtty.protobuf.Message({
|
|
2498
|
-
heartbeat: new rstream.webtty.protobuf.Heartbeat()
|
|
2499
|
-
})
|
|
2500
|
-
);
|
|
2501
|
-
}
|
|
2502
|
-
send(message) {
|
|
2503
|
-
if (!this.ws) return;
|
|
2504
|
-
if (this.connectionState === "preparing" || this.connectionState === "closed")
|
|
2505
|
-
return;
|
|
2506
|
-
const buffer = rstream.webtty.protobuf.Message.encode(message).finish();
|
|
2507
|
-
this.ws.send(getWebSocketPayload(buffer));
|
|
2508
|
-
}
|
|
2509
|
-
/**
|
|
2510
|
-
* Closes the WebTTY session and fires exactly one of:
|
|
2511
|
-
* - onComplete(exitCode) // if a number is passed
|
|
2512
|
-
* - onError(errorMessage) // if a string is passed
|
|
2513
|
-
* If no argument is given, treat as an unknown error scenario.
|
|
2514
|
-
*/
|
|
2515
|
-
close(result) {
|
|
2516
|
-
if (this.connectionState === "closed") {
|
|
2517
|
-
return;
|
|
2518
|
-
}
|
|
2519
|
-
this.connectionState = "closed";
|
|
2520
|
-
if (this.heartbeatTimer) {
|
|
2521
|
-
clearInterval(this.heartbeatTimer);
|
|
2522
|
-
this.heartbeatTimer = null;
|
|
2523
|
-
}
|
|
2524
|
-
if (this.ws) {
|
|
2525
|
-
this.ws.removeEventListener("open", this.handleOpen);
|
|
2526
|
-
this.ws.removeEventListener("message", this.handleMessage);
|
|
2527
|
-
this.ws.removeEventListener("error", this.handleError);
|
|
2528
|
-
this.ws.removeEventListener("close", this.handleClose);
|
|
2529
|
-
this.ws.close();
|
|
2530
|
-
this.ws = null;
|
|
2531
|
-
}
|
|
2532
|
-
if (typeof result === "number") {
|
|
2533
|
-
this.events.onComplete?.(result);
|
|
2534
|
-
} else if (typeof result === "string") {
|
|
2535
|
-
this.events.onError?.(result);
|
|
2536
|
-
} else {
|
|
2537
|
-
this.events.onError?.("Connection closed without a known reason.");
|
|
2538
|
-
}
|
|
2539
|
-
}
|
|
2540
|
-
};
|
|
2541
|
-
|
|
2542
|
-
// src/execution.ts
|
|
2543
|
-
var Deferred = class {
|
|
2544
|
-
onReject = () => {
|
|
2545
|
-
};
|
|
2546
|
-
onResolve = () => {
|
|
2547
|
-
};
|
|
2548
|
-
promise;
|
|
2549
|
-
constructor() {
|
|
2550
|
-
this.promise = new Promise((resolve, reject) => {
|
|
2551
|
-
this.onResolve = resolve;
|
|
2552
|
-
this.onReject = reject;
|
|
2553
|
-
});
|
|
2554
|
-
this.promise.catch(() => void 0);
|
|
2555
|
-
}
|
|
2556
|
-
reject(error) {
|
|
2557
|
-
this.onReject(error);
|
|
2558
|
-
}
|
|
2559
|
-
resolve(value) {
|
|
2560
|
-
this.onResolve(value);
|
|
2561
|
-
}
|
|
2562
|
-
};
|
|
2563
|
-
var ReplayStreamSubscriber = class {
|
|
2564
|
-
controller = null;
|
|
2565
|
-
bind(controller) {
|
|
2566
|
-
this.controller = controller;
|
|
2567
|
-
}
|
|
2568
|
-
close() {
|
|
2569
|
-
this.controller?.close();
|
|
2570
|
-
}
|
|
2571
|
-
enqueue(value) {
|
|
2572
|
-
this.controller?.enqueue(value);
|
|
2573
|
-
}
|
|
2574
|
-
error(error) {
|
|
2575
|
-
this.controller?.error(error);
|
|
2576
|
-
}
|
|
2577
|
-
};
|
|
2578
|
-
var ReplayStreamChannel = class {
|
|
2579
|
-
completion = new Deferred();
|
|
2580
|
-
closed = false;
|
|
2581
|
-
failure = null;
|
|
2582
|
-
subscribers = [];
|
|
2583
|
-
values = [];
|
|
2584
|
-
append(value) {
|
|
2585
|
-
if (this.closed || this.failure) return;
|
|
2586
|
-
this.values = [...this.values, value];
|
|
2587
|
-
this.subscribers.forEach((subscriber) => subscriber.enqueue(value));
|
|
2588
|
-
}
|
|
2589
|
-
close() {
|
|
2590
|
-
if (this.closed || this.failure) return;
|
|
2591
|
-
this.closed = true;
|
|
2592
|
-
this.subscribers.forEach((subscriber) => subscriber.close());
|
|
2593
|
-
this.subscribers = [];
|
|
2594
|
-
this.completion.resolve();
|
|
2595
|
-
}
|
|
2596
|
-
error(error) {
|
|
2597
|
-
if (this.closed || this.failure) return;
|
|
2598
|
-
this.failure = error;
|
|
2599
|
-
this.subscribers.forEach((subscriber) => subscriber.error(error));
|
|
2600
|
-
this.subscribers = [];
|
|
2601
|
-
this.completion.reject(error);
|
|
2602
|
-
}
|
|
2603
|
-
stream() {
|
|
2604
|
-
const subscriber = new ReplayStreamSubscriber();
|
|
2605
|
-
return new ReadableStream({
|
|
2606
|
-
cancel: () => this.unsubscribe(subscriber),
|
|
2607
|
-
start: (controller) => this.subscribe(subscriber, controller)
|
|
2608
|
-
});
|
|
2609
|
-
}
|
|
2610
|
-
async valuesAfterClose(options = {}) {
|
|
2611
|
-
await withSignal(this.completion.promise, options.signal);
|
|
2612
|
-
return this.values;
|
|
2613
|
-
}
|
|
2614
|
-
subscribe(subscriber, controller) {
|
|
2615
|
-
subscriber.bind(controller);
|
|
2616
|
-
this.values.forEach((value) => controller.enqueue(value));
|
|
2617
|
-
if (this.failure) {
|
|
2618
|
-
controller.error(this.failure);
|
|
2619
|
-
return;
|
|
2620
|
-
}
|
|
2621
|
-
if (this.closed) {
|
|
2622
|
-
controller.close();
|
|
2623
|
-
return;
|
|
2624
|
-
}
|
|
2625
|
-
this.subscribers = [...this.subscribers, subscriber];
|
|
2626
|
-
}
|
|
2627
|
-
unsubscribe(subscriber) {
|
|
2628
|
-
this.subscribers = this.subscribers.filter((entry) => entry !== subscriber);
|
|
2629
|
-
}
|
|
2630
|
-
};
|
|
2631
|
-
function concatBytes(chunks) {
|
|
2632
|
-
const output = new Uint8Array(
|
|
2633
|
-
chunks.reduce((total, chunk) => total + chunk.byteLength, 0)
|
|
2634
|
-
);
|
|
2635
|
-
chunks.reduce((offset, chunk) => {
|
|
2636
|
-
output.set(chunk, offset);
|
|
2637
|
-
return offset + chunk.byteLength;
|
|
2638
|
-
}, 0);
|
|
2639
|
-
return output;
|
|
2640
|
-
}
|
|
2641
|
-
function encodeInput(input) {
|
|
2642
|
-
return typeof input === "string" ? new TextEncoder().encode(input) : input;
|
|
2643
|
-
}
|
|
2644
|
-
function resolveInteractive(options) {
|
|
2645
|
-
if (options.input !== void 0 && options.interactive === false) {
|
|
2646
|
-
throw new Error("Command input requires an interactive WebTTY session.");
|
|
2647
|
-
}
|
|
2648
|
-
return options.input === void 0 ? options.interactive ?? false : true;
|
|
2649
|
-
}
|
|
2650
|
-
function cleanTrailingSlashes(value) {
|
|
2651
|
-
return value.replace(/\/+$/, "");
|
|
2652
|
-
}
|
|
2653
|
-
function normalizeEndpointPath(path) {
|
|
2654
|
-
const trimmed = path.trim();
|
|
2655
|
-
const absolute = trimmed === "" || trimmed === "." ? "/" : trimmed;
|
|
2656
|
-
return new URL(
|
|
2657
|
-
absolute.startsWith("/") ? absolute : `/${absolute}`,
|
|
2658
|
-
"http://rstream.local"
|
|
2659
|
-
).pathname;
|
|
2660
|
-
}
|
|
2661
|
-
function executionPath(pathname, execPath) {
|
|
2662
|
-
const endpoint = normalizeEndpointPath(execPath ?? "/");
|
|
2663
|
-
const basePath = cleanTrailingSlashes(pathname);
|
|
2664
|
-
if (endpoint === "/") return basePath === "" ? "/" : basePath;
|
|
2665
|
-
if (basePath === "") return endpoint;
|
|
2666
|
-
if (basePath === "/") return endpoint;
|
|
2667
|
-
if (basePath === endpoint || basePath.startsWith(`${endpoint}/`))
|
|
2668
|
-
return basePath;
|
|
2669
|
-
return `${basePath}${endpoint}`;
|
|
2670
|
-
}
|
|
2671
|
-
function resolveWebTTYExecutionURL(input, execPath = "/") {
|
|
2672
|
-
const url = new URL(input.toString());
|
|
2673
|
-
if (url.protocol === "rstrm:") {
|
|
2674
|
-
throw new Error(
|
|
2675
|
-
"rstrm:// WebTTY execution URLs require the native rstream dialer."
|
|
2676
|
-
);
|
|
2677
|
-
}
|
|
2678
|
-
if (url.protocol === "http:") url.protocol = "ws:";
|
|
2679
|
-
if (url.protocol === "https:") url.protocol = "wss:";
|
|
2680
|
-
if (url.protocol !== "ws:" && url.protocol !== "wss:") {
|
|
2681
|
-
throw new Error(
|
|
2682
|
-
`Unsupported WebTTY execution URL scheme "${url.protocol}".`
|
|
2683
|
-
);
|
|
2684
|
-
}
|
|
2685
|
-
url.pathname = executionPath(url.pathname, execPath);
|
|
2686
|
-
url.hash = "";
|
|
2687
|
-
return url;
|
|
2688
|
-
}
|
|
2689
|
-
function executionConfig(options, interactive) {
|
|
2690
|
-
return {
|
|
2691
|
-
allocateTty: options.allocateTty ?? false,
|
|
2692
|
-
cmdArgs: options.cmdArgs,
|
|
2693
|
-
envVars: options.envVars,
|
|
2694
|
-
interactive,
|
|
2695
|
-
username: options.username,
|
|
2696
|
-
workdir: options.workdir
|
|
2697
|
-
};
|
|
2698
|
-
}
|
|
2699
|
-
function textFromByteArray(value) {
|
|
2700
|
-
return new TextDecoder().decode(value);
|
|
2701
|
-
}
|
|
2702
|
-
function textFromLogBytes(chunks) {
|
|
2703
|
-
return chunks.map((chunk) => new TextDecoder().decode(chunk.data)).join("");
|
|
2704
|
-
}
|
|
2705
|
-
function timeoutHandle(timeoutMs, callback) {
|
|
2706
|
-
return timeoutMs === void 0 ? null : setTimeout(callback, timeoutMs);
|
|
2707
|
-
}
|
|
2708
|
-
function signalError(signal) {
|
|
2709
|
-
const reason = signal.reason;
|
|
2710
|
-
return reason instanceof Error ? reason : new Error(reason === void 0 ? "Operation aborted." : String(reason));
|
|
2711
|
-
}
|
|
2712
|
-
function signalPromise(signal) {
|
|
2713
|
-
return new Promise((_, reject) => {
|
|
2714
|
-
signal.addEventListener("abort", () => reject(signalError(signal)), {
|
|
2715
|
-
once: true
|
|
2716
|
-
});
|
|
2717
|
-
});
|
|
2718
|
-
}
|
|
2719
|
-
function withSignal(promise, signal) {
|
|
2720
|
-
if (signal === void 0) return promise;
|
|
2721
|
-
if (signal.aborted) return Promise.reject(signalError(signal));
|
|
2722
|
-
return Promise.race([promise, signalPromise(signal)]);
|
|
2723
|
-
}
|
|
2724
|
-
function stdinStream(command) {
|
|
2725
|
-
return new WritableStream({
|
|
2726
|
-
close: () => command.closeStdin(),
|
|
2727
|
-
write: (chunk) => command.writeStdin(chunk)
|
|
2728
|
-
});
|
|
2729
|
-
}
|
|
2730
|
-
function abortCleanup(signal, callback) {
|
|
2731
|
-
if (signal === void 0) return () => void 0;
|
|
2732
|
-
if (signal.aborted) {
|
|
2733
|
-
callback();
|
|
2734
|
-
return () => void 0;
|
|
2735
|
-
}
|
|
2736
|
-
const listener = () => callback();
|
|
2737
|
-
signal.addEventListener("abort", listener, { once: true });
|
|
2738
|
-
return () => signal.removeEventListener("abort", listener);
|
|
2739
|
-
}
|
|
2740
|
-
async function resolveURL(url) {
|
|
2741
|
-
return typeof url === "function" ? await url() : url;
|
|
2742
|
-
}
|
|
2743
|
-
function clientConfig(config, url, execPath) {
|
|
2744
|
-
return {
|
|
2745
|
-
heartbeatIntervalMs: config.heartbeatIntervalMs,
|
|
2746
|
-
sendHeartbeat: config.sendHeartbeat,
|
|
2747
|
-
url: execPath === void 0 ? url : resolveWebTTYExecutionURL(url, execPath)
|
|
2748
|
-
};
|
|
2749
|
-
}
|
|
2750
|
-
function executionClientConfig(client, execPath) {
|
|
2751
|
-
return execPath === void 0 ? client : { ...client, url: resolveWebTTYExecutionURL(client.url, execPath) };
|
|
2752
|
-
}
|
|
2753
|
-
async function* streamValues(stream) {
|
|
2754
|
-
const reader = stream.getReader();
|
|
2755
|
-
try {
|
|
2756
|
-
for (; ; ) {
|
|
2757
|
-
const result = await reader.read();
|
|
2758
|
-
if (result.done) return;
|
|
2759
|
-
yield result.value;
|
|
2760
|
-
}
|
|
2761
|
-
} finally {
|
|
2762
|
-
reader.releaseLock();
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
function successStatus(exitCode) {
|
|
2766
|
-
return { exitCode, success: exitCode === 0 };
|
|
2767
|
-
}
|
|
2768
|
-
function envEntry(key, value) {
|
|
2769
|
-
return value === void 0 ? null : { key, value };
|
|
2770
|
-
}
|
|
2771
|
-
function presentEnvEntries(entries) {
|
|
2772
|
-
return entries.filter(
|
|
2773
|
-
(entry) => entry !== null
|
|
2774
|
-
);
|
|
2775
|
-
}
|
|
2776
|
-
function envVarsFromRecord(env) {
|
|
2777
|
-
return env === void 0 ? void 0 : presentEnvEntries(
|
|
2778
|
-
Object.entries(env).map(([key, value]) => envEntry(key, value))
|
|
2779
|
-
);
|
|
2780
|
-
}
|
|
2781
|
-
function commandExecutionOptions(command, args, options) {
|
|
2782
|
-
return {
|
|
2783
|
-
allocateTty: options.allocateTty,
|
|
2784
|
-
cmdArgs: [command, ...args],
|
|
2785
|
-
envVars: envVarsFromRecord(options.env),
|
|
2786
|
-
execPath: options.execPath,
|
|
2787
|
-
input: options.stdin,
|
|
2788
|
-
interactive: options.interactive,
|
|
2789
|
-
signal: options.signal,
|
|
2790
|
-
timeoutMs: options.timeoutMs,
|
|
2791
|
-
username: options.username,
|
|
2792
|
-
workdir: options.cwd
|
|
2793
|
-
};
|
|
2794
|
-
}
|
|
2795
|
-
var WebTTYCommand = class {
|
|
2796
|
-
abort;
|
|
2797
|
-
connected = new Deferred();
|
|
2798
|
-
completion = new Deferred();
|
|
2799
|
-
logsChannel = new ReplayStreamChannel();
|
|
2800
|
-
stderrChannel = new ReplayStreamChannel();
|
|
2801
|
-
stdoutChannel = new ReplayStreamChannel();
|
|
2802
|
-
timer;
|
|
2803
|
-
webtty;
|
|
2804
|
-
settled = false;
|
|
2805
|
-
exitCode = null;
|
|
2806
|
-
stdin;
|
|
2807
|
-
constructor(client, options) {
|
|
2808
|
-
const interactive = resolveInteractive(options);
|
|
2809
|
-
this.webtty = new WebTTY(
|
|
2810
|
-
executionClientConfig(client, options.execPath),
|
|
2811
|
-
executionConfig(options, interactive),
|
|
2812
|
-
{
|
|
2813
|
-
onComplete: (exitCode) => this.complete(exitCode),
|
|
2814
|
-
onConnect: () => this.connect(options.input),
|
|
2815
|
-
onError: (message) => this.fail(new Error(message)),
|
|
2816
|
-
onStderr: (chunk) => this.append("stderr", chunk),
|
|
2817
|
-
onStderrEos: () => this.stderrChannel.close(),
|
|
2818
|
-
onStdout: (chunk) => this.append("stdout", chunk),
|
|
2819
|
-
onStdoutEos: () => this.stdoutChannel.close()
|
|
2820
|
-
}
|
|
2821
|
-
);
|
|
2822
|
-
this.stdin = interactive ? stdinStream(this) : void 0;
|
|
2823
|
-
this.abort = abortCleanup(options.signal, () => {
|
|
2824
|
-
this.fail(new Error("WebTTY command was aborted."));
|
|
2825
|
-
});
|
|
2826
|
-
this.timer = timeoutHandle(options.timeoutMs, () => {
|
|
2827
|
-
this.fail(new Error("WebTTY command timed out."));
|
|
2828
|
-
});
|
|
2829
|
-
this.webtty.connect();
|
|
2830
|
-
}
|
|
2831
|
-
async closeStdin() {
|
|
2832
|
-
await this.connected.promise;
|
|
2833
|
-
this.webtty.closeStdin();
|
|
2834
|
-
}
|
|
2835
|
-
disconnect() {
|
|
2836
|
-
this.webtty.disconnect();
|
|
2837
|
-
}
|
|
2838
|
-
async kill() {
|
|
2839
|
-
this.disconnect();
|
|
2840
|
-
await this.completion.promise.catch(() => void 0);
|
|
2841
|
-
}
|
|
2842
|
-
async *logBytes() {
|
|
2843
|
-
yield* streamValues(this.logsChannel.stream());
|
|
2844
|
-
}
|
|
2845
|
-
async *logs() {
|
|
2846
|
-
for await (const entry of this.logBytes()) {
|
|
2847
|
-
yield {
|
|
2848
|
-
data: new TextDecoder().decode(entry.data),
|
|
2849
|
-
stream: entry.stream
|
|
2850
|
-
};
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
output(stream = "both", options = {}) {
|
|
2854
|
-
if (stream === "stdout") return this.stdout(options);
|
|
2855
|
-
if (stream === "stderr") return this.stderr(options);
|
|
2856
|
-
return this.logsChannel.valuesAfterClose(options).then((chunks) => textFromLogBytes(chunks));
|
|
2857
|
-
}
|
|
2858
|
-
stderr(options = {}) {
|
|
2859
|
-
return this.stderrBytes(options).then(textFromByteArray);
|
|
2860
|
-
}
|
|
2861
|
-
stderrBytes(options = {}) {
|
|
2862
|
-
return this.stderrChannel.valuesAfterClose(options).then((chunks) => concatBytes(chunks));
|
|
2863
|
-
}
|
|
2864
|
-
stderrStream() {
|
|
2865
|
-
return this.stderrChannel.stream();
|
|
2866
|
-
}
|
|
2867
|
-
stdout(options = {}) {
|
|
2868
|
-
return this.stdoutBytes(options).then(textFromByteArray);
|
|
2869
|
-
}
|
|
2870
|
-
stdoutBytes(options = {}) {
|
|
2871
|
-
return this.stdoutChannel.valuesAfterClose(options).then((chunks) => concatBytes(chunks));
|
|
2872
|
-
}
|
|
2873
|
-
stdoutStream() {
|
|
2874
|
-
return this.stdoutChannel.stream();
|
|
2875
|
-
}
|
|
2876
|
-
async wait(options = {}) {
|
|
2877
|
-
return await withSignal(this.completion.promise, options.signal);
|
|
2878
|
-
}
|
|
2879
|
-
async terminate() {
|
|
2880
|
-
await this.kill();
|
|
2881
|
-
}
|
|
2882
|
-
async writeStdin(input) {
|
|
2883
|
-
await this.connected.promise;
|
|
2884
|
-
this.webtty.writeStdin(encodeInput(input));
|
|
2885
|
-
}
|
|
2886
|
-
append(stream, chunk) {
|
|
2887
|
-
if (stream === "stdout") this.stdoutChannel.append(chunk);
|
|
2888
|
-
if (stream === "stderr") this.stderrChannel.append(chunk);
|
|
2889
|
-
this.logsChannel.append({ data: chunk, stream });
|
|
2890
|
-
}
|
|
2891
|
-
clearTimer() {
|
|
2892
|
-
if (this.timer) clearTimeout(this.timer);
|
|
2893
|
-
}
|
|
2894
|
-
complete(exitCode) {
|
|
2895
|
-
if (this.settled) return;
|
|
2896
|
-
this.settled = true;
|
|
2897
|
-
this.exitCode = exitCode;
|
|
2898
|
-
this.abort();
|
|
2899
|
-
this.clearTimer();
|
|
2900
|
-
this.stdoutChannel.close();
|
|
2901
|
-
this.stderrChannel.close();
|
|
2902
|
-
this.logsChannel.close();
|
|
2903
|
-
this.completion.resolve(successStatus(exitCode));
|
|
2904
|
-
}
|
|
2905
|
-
connect(input) {
|
|
2906
|
-
this.connected.resolve();
|
|
2907
|
-
if (input === void 0) return;
|
|
2908
|
-
this.webtty.writeStdin(encodeInput(input));
|
|
2909
|
-
this.webtty.closeStdin();
|
|
2910
|
-
}
|
|
2911
|
-
fail(error) {
|
|
2912
|
-
if (this.settled) return;
|
|
2913
|
-
this.settled = true;
|
|
2914
|
-
this.abort();
|
|
2915
|
-
this.clearTimer();
|
|
2916
|
-
this.stdoutChannel.error(error);
|
|
2917
|
-
this.stderrChannel.error(error);
|
|
2918
|
-
this.logsChannel.error(error);
|
|
2919
|
-
this.connected.reject(error);
|
|
2920
|
-
this.completion.reject(error);
|
|
2921
|
-
this.webtty.disconnect();
|
|
2922
|
-
}
|
|
2923
|
-
};
|
|
2924
|
-
function openWebTTYCommand(client, options = {}) {
|
|
2925
|
-
return new WebTTYCommand(client, options);
|
|
2926
|
-
}
|
|
2927
|
-
async function runWebTTYCommand(client, command, args = [], options = {}) {
|
|
2928
|
-
return await executeWebTTYCommand(
|
|
2929
|
-
client,
|
|
2930
|
-
commandExecutionOptions(command, args, options)
|
|
2931
|
-
);
|
|
2932
|
-
}
|
|
2933
|
-
async function executeWebTTYCommand(client, options = {}) {
|
|
2934
|
-
const command = openWebTTYCommand(client, options);
|
|
2935
|
-
const [stdout, stderr, status] = await Promise.all([
|
|
2936
|
-
command.stdout(),
|
|
2937
|
-
command.stderr(),
|
|
2938
|
-
command.wait()
|
|
2939
|
-
]);
|
|
2940
|
-
return { exitCode: status.exitCode, stderr, stdout, success: status.success };
|
|
2941
|
-
}
|
|
2942
|
-
var WebTTYRemoteExecutor = class {
|
|
2943
|
-
config;
|
|
2944
|
-
constructor(config) {
|
|
2945
|
-
this.config = config;
|
|
2946
|
-
}
|
|
2947
|
-
async execute(options = {}) {
|
|
2948
|
-
const execPath = options.execPath ?? this.config.execPath;
|
|
2949
|
-
return await executeWebTTYCommand(
|
|
2950
|
-
clientConfig(this.config, await resolveURL(this.config.url), execPath),
|
|
2951
|
-
{ ...options, execPath: void 0 }
|
|
2952
|
-
);
|
|
2953
|
-
}
|
|
2954
|
-
async open(options = {}) {
|
|
2955
|
-
const execPath = options.execPath ?? this.config.execPath;
|
|
2956
|
-
return openWebTTYCommand(
|
|
2957
|
-
clientConfig(this.config, await resolveURL(this.config.url), execPath),
|
|
2958
|
-
{ ...options, execPath: void 0 }
|
|
2959
|
-
);
|
|
2960
|
-
}
|
|
2961
|
-
async openCommand(command, args = [], options = {}) {
|
|
2962
|
-
const execPath = options.execPath ?? this.config.execPath;
|
|
2963
|
-
return openWebTTYCommand(
|
|
2964
|
-
clientConfig(this.config, await resolveURL(this.config.url), execPath),
|
|
2965
|
-
commandExecutionOptions(command, args, {
|
|
2966
|
-
...options,
|
|
2967
|
-
execPath: void 0
|
|
2968
|
-
})
|
|
2969
|
-
);
|
|
2970
|
-
}
|
|
2971
|
-
async runCommand(command, args = [], options = {}) {
|
|
2972
|
-
const execPath = options.execPath ?? this.config.execPath;
|
|
2973
|
-
return await runWebTTYCommand(
|
|
2974
|
-
clientConfig(this.config, await resolveURL(this.config.url), execPath),
|
|
2975
|
-
command,
|
|
2976
|
-
args,
|
|
2977
|
-
{ ...options, execPath: void 0 }
|
|
2978
|
-
);
|
|
2979
|
-
}
|
|
2980
|
-
};
|
|
2981
|
-
|
|
2982
|
-
// src/filesystem.ts
|
|
2983
|
-
var WebTTYFileSystemError = class extends Error {
|
|
2984
|
-
operation;
|
|
2985
|
-
status;
|
|
2986
|
-
constructor(operation, status, message) {
|
|
2987
|
-
super(`${operation} failed with status ${status}: ${message}`);
|
|
2988
|
-
this.name = "WebTTYFileSystemError";
|
|
2989
|
-
this.operation = operation;
|
|
2990
|
-
this.status = status;
|
|
2991
|
-
}
|
|
2992
|
-
};
|
|
2993
|
-
var webDAVPropfindBody = '<?xml version="1.0" encoding="utf-8"?><propfind xmlns="DAV:"><prop><resourcetype/><getcontentlength/><getlastmodified/></prop></propfind>';
|
|
2994
|
-
function cleanTrailingSlashes2(value) {
|
|
2995
|
-
return value.replace(/\/+$/, "");
|
|
2996
|
-
}
|
|
2997
|
-
function normalizeRemotePath(remotePath) {
|
|
2998
|
-
const trimmed = remotePath.trim();
|
|
2999
|
-
const absolute = trimmed === "" || trimmed === "." ? "/" : trimmed;
|
|
3000
|
-
return new URL(
|
|
3001
|
-
absolute.startsWith("/") ? absolute : `/${absolute}`,
|
|
3002
|
-
"http://rstream.local"
|
|
3003
|
-
).pathname;
|
|
3004
|
-
}
|
|
3005
|
-
function comparableRemotePath(remotePath) {
|
|
3006
|
-
const normalized = cleanTrailingSlashes2(normalizeRemotePath(remotePath));
|
|
3007
|
-
return normalized === "" ? "/" : normalized;
|
|
3008
|
-
}
|
|
3009
|
-
function sidecarPath(fsPath) {
|
|
3010
|
-
return normalizeRemotePath(fsPath ?? "/fs");
|
|
3011
|
-
}
|
|
3012
|
-
function filesystemBasePath(pathname, fsPath) {
|
|
3013
|
-
const sidecar = sidecarPath(fsPath);
|
|
3014
|
-
const basePath = cleanTrailingSlashes2(pathname);
|
|
3015
|
-
if (basePath === "") return sidecar;
|
|
3016
|
-
if (basePath === "/") return sidecar;
|
|
3017
|
-
if (basePath === sidecar || basePath.startsWith(`${sidecar}/`))
|
|
3018
|
-
return basePath;
|
|
3019
|
-
return `${basePath}${sidecar}`;
|
|
3020
|
-
}
|
|
3021
|
-
function filesystemPath(pathname, remotePath, fsPath) {
|
|
3022
|
-
const basePath = filesystemBasePath(pathname, fsPath);
|
|
3023
|
-
const normalized = normalizeRemotePath(remotePath);
|
|
3024
|
-
return normalized === "/" ? basePath : `${cleanTrailingSlashes2(basePath)}${normalized}`;
|
|
3025
|
-
}
|
|
3026
|
-
function resolveWebTTYFileSystemURL(input, remotePath = "/", fsPath) {
|
|
3027
|
-
const url = new URL(input.toString());
|
|
3028
|
-
if (url.protocol === "rstrm:") {
|
|
3029
|
-
throw new Error(
|
|
3030
|
-
"rstrm:// WebTTY filesystem URLs require the native rstream dialer."
|
|
3031
|
-
);
|
|
3032
|
-
}
|
|
3033
|
-
if (url.protocol === "ws:") url.protocol = "http:";
|
|
3034
|
-
if (url.protocol === "wss:") url.protocol = "https:";
|
|
3035
|
-
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
3036
|
-
throw new Error(
|
|
3037
|
-
`Unsupported WebTTY filesystem URL scheme "${url.protocol}".`
|
|
3038
|
-
);
|
|
3039
|
-
}
|
|
3040
|
-
url.pathname = filesystemPath(url.pathname, remotePath, fsPath);
|
|
3041
|
-
url.hash = "";
|
|
3042
|
-
return url;
|
|
3043
|
-
}
|
|
3044
|
-
function responseAllowed(response, expectedStatuses) {
|
|
3045
|
-
return expectedStatuses.includes(response.status);
|
|
3046
|
-
}
|
|
3047
|
-
async function responseErrorMessage(response) {
|
|
3048
|
-
const text = (await response.text()).trim().slice(0, 4096);
|
|
3049
|
-
return text === "" ? response.statusText : text;
|
|
3050
|
-
}
|
|
3051
|
-
async function requireResponseStatus(response, expectedStatuses, operation) {
|
|
3052
|
-
if (responseAllowed(response, expectedStatuses)) return response;
|
|
3053
|
-
throw new WebTTYFileSystemError(
|
|
3054
|
-
operation,
|
|
3055
|
-
response.status,
|
|
3056
|
-
await responseErrorMessage(response)
|
|
3057
|
-
);
|
|
3058
|
-
}
|
|
3059
|
-
function requireResponseBody(response, operation) {
|
|
3060
|
-
if (response.body) return response.body;
|
|
3061
|
-
throw new Error(
|
|
3062
|
-
`${operation} failed because the response body is unavailable.`
|
|
3063
|
-
);
|
|
3064
|
-
}
|
|
3065
|
-
function resolveFetch(config) {
|
|
3066
|
-
if (config.fetch) return config.fetch;
|
|
3067
|
-
if (typeof fetch === "undefined") {
|
|
3068
|
-
throw new Error("fetch is unavailable in this runtime.");
|
|
3069
|
-
}
|
|
3070
|
-
return fetch;
|
|
3071
|
-
}
|
|
3072
|
-
function applyHeaders(target, source) {
|
|
3073
|
-
const sourceHeaders = new Headers(source);
|
|
3074
|
-
sourceHeaders.forEach((value, key) => target.set(key, value));
|
|
3075
|
-
return target;
|
|
3076
|
-
}
|
|
3077
|
-
function requestHeaders(config, headers) {
|
|
3078
|
-
const result = applyHeaders(new Headers(config.headers), headers);
|
|
3079
|
-
if (config.authToken && config.authToken.trim() !== "") {
|
|
3080
|
-
result.set("Authorization", `Bearer ${config.authToken.trim()}`);
|
|
3081
|
-
}
|
|
3082
|
-
return result;
|
|
3083
|
-
}
|
|
3084
|
-
function contentHeaders(contentType) {
|
|
3085
|
-
return contentType === void 0 ? void 0 : { "Content-Type": contentType };
|
|
3086
|
-
}
|
|
3087
|
-
function deleteStatuses(force) {
|
|
3088
|
-
return force ? [200, 204, 404] : [200, 204];
|
|
3089
|
-
}
|
|
3090
|
-
function isNotFound(error) {
|
|
3091
|
-
return error instanceof WebTTYFileSystemError && error.status === 404;
|
|
3092
|
-
}
|
|
3093
|
-
function pathBaseName(path) {
|
|
3094
|
-
const normalized = normalizeRemotePath(path);
|
|
3095
|
-
const cleaned = cleanTrailingSlashes2(normalized);
|
|
3096
|
-
return cleaned.slice(cleaned.lastIndexOf("/") + 1);
|
|
3097
|
-
}
|
|
3098
|
-
function parentPath(path) {
|
|
3099
|
-
const normalized = cleanTrailingSlashes2(normalizeRemotePath(path));
|
|
3100
|
-
const index = normalized.lastIndexOf("/");
|
|
3101
|
-
if (index <= 0) return "/";
|
|
3102
|
-
return normalized.slice(0, index);
|
|
3103
|
-
}
|
|
3104
|
-
function readFileEncoding(options) {
|
|
3105
|
-
if (typeof options === "string") return options;
|
|
3106
|
-
return options?.encoding === void 0 ? null : options.encoding;
|
|
3107
|
-
}
|
|
3108
|
-
function readFileSignal(options) {
|
|
3109
|
-
return typeof options === "string" ? void 0 : options?.signal;
|
|
3110
|
-
}
|
|
3111
|
-
function textContentHeaders(contentType, data) {
|
|
3112
|
-
if (contentType !== void 0) return { "Content-Type": contentType };
|
|
3113
|
-
return typeof data === "string" ? { "Content-Type": "text/plain; charset=utf-8" } : void 0;
|
|
3114
|
-
}
|
|
3115
|
-
function bodyRequiresDuplex(body) {
|
|
3116
|
-
return typeof ReadableStream !== "undefined" && body instanceof ReadableStream;
|
|
3117
|
-
}
|
|
3118
|
-
function requestInit(config, method, options) {
|
|
3119
|
-
return {
|
|
3120
|
-
body: options.body,
|
|
3121
|
-
duplex: bodyRequiresDuplex(options.body) ? "half" : void 0,
|
|
3122
|
-
headers: requestHeaders(config, options.headers),
|
|
3123
|
-
method,
|
|
3124
|
-
signal: options.signal
|
|
3125
|
-
};
|
|
3126
|
-
}
|
|
3127
|
-
async function resolveURL2(url) {
|
|
3128
|
-
return typeof url === "function" ? await url() : url;
|
|
3129
|
-
}
|
|
3130
|
-
function elementBodies(xml, name) {
|
|
3131
|
-
return Array.from(
|
|
3132
|
-
xml.matchAll(
|
|
3133
|
-
new RegExp(
|
|
3134
|
-
`<[^>]*:?${name}\\b[^>]*>([\\s\\S]*?)<\\/[^>]*:?${name}>`,
|
|
3135
|
-
"gi"
|
|
3136
|
-
)
|
|
3137
|
-
),
|
|
3138
|
-
(match) => match[1] ?? ""
|
|
3139
|
-
);
|
|
3140
|
-
}
|
|
3141
|
-
function hasElement(xml, name) {
|
|
3142
|
-
return new RegExp(`<[^>]*:?${name}(\\s|/|>)`, "i").test(xml);
|
|
3143
|
-
}
|
|
3144
|
-
function stripTags(xml) {
|
|
3145
|
-
return xml.replace(/<[^>]*>/g, "");
|
|
3146
|
-
}
|
|
3147
|
-
function decodeNumericEntity(value) {
|
|
3148
|
-
const parsed = value.startsWith("&#x") ? Number.parseInt(value.slice(3, -1), 16) : Number.parseInt(value.slice(2, -1), 10);
|
|
3149
|
-
return Number.isFinite(parsed) ? String.fromCodePoint(parsed) : value;
|
|
3150
|
-
}
|
|
3151
|
-
function decodeXmlText(value) {
|
|
3152
|
-
return value.replace(/&#x[0-9a-f]+;|&#\d+;/gi, decodeNumericEntity).replace(/'/g, "'").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&");
|
|
3153
|
-
}
|
|
3154
|
-
function elementText(xml, name) {
|
|
3155
|
-
return decodeXmlText(stripTags(elementBodies(xml, name)[0] ?? "")).trim();
|
|
3156
|
-
}
|
|
3157
|
-
function okPropstat(response) {
|
|
3158
|
-
return elementBodies(response, "propstat").find(
|
|
3159
|
-
(propstat) => elementText(propstat, "status").includes(" 200 ")
|
|
3160
|
-
) ?? "";
|
|
3161
|
-
}
|
|
3162
|
-
function safeDecodePath(path) {
|
|
3163
|
-
try {
|
|
3164
|
-
return decodeURIComponent(path);
|
|
3165
|
-
} catch {
|
|
3166
|
-
return path;
|
|
3167
|
-
}
|
|
3168
|
-
}
|
|
3169
|
-
function hrefPath(href) {
|
|
3170
|
-
return safeDecodePath(new URL(href, "http://rstream.local").pathname);
|
|
3171
|
-
}
|
|
3172
|
-
function displayPath(href, fsPath) {
|
|
3173
|
-
const value = hrefPath(href);
|
|
3174
|
-
const sidecar = cleanTrailingSlashes2(sidecarPath(fsPath));
|
|
3175
|
-
const withoutFS = value === sidecar ? "/" : value.startsWith(`${sidecar}/`) ? value.slice(sidecar.length) : value;
|
|
3176
|
-
return withoutFS === "" ? "/" : withoutFS;
|
|
3177
|
-
}
|
|
3178
|
-
function itemSize(value) {
|
|
3179
|
-
const parsed = Number.parseInt(value, 10);
|
|
3180
|
-
return Number.isFinite(parsed) ? parsed : void 0;
|
|
3181
|
-
}
|
|
3182
|
-
function itemFromResponse(response, fsPath) {
|
|
3183
|
-
const propstat = okPropstat(response);
|
|
3184
|
-
const path = displayPath(elementText(response, "href"), fsPath);
|
|
3185
|
-
if (propstat === "" || path === "") return null;
|
|
3186
|
-
return {
|
|
3187
|
-
kind: hasElement(
|
|
3188
|
-
elementBodies(propstat, "resourcetype")[0] ?? "",
|
|
3189
|
-
"collection"
|
|
3190
|
-
) ? "directory" : "file",
|
|
3191
|
-
modified: elementText(propstat, "getlastmodified") || void 0,
|
|
3192
|
-
path,
|
|
3193
|
-
size: itemSize(elementText(propstat, "getcontentlength"))
|
|
3194
|
-
};
|
|
3195
|
-
}
|
|
3196
|
-
function presentItems(items) {
|
|
3197
|
-
return items.filter((item) => item !== null);
|
|
3198
|
-
}
|
|
3199
|
-
function parseWebDAVMultiStatus(xml, fsPath = "/fs") {
|
|
3200
|
-
return presentItems(
|
|
3201
|
-
elementBodies(xml, "response").map(
|
|
3202
|
-
(response) => itemFromResponse(response, fsPath)
|
|
3203
|
-
)
|
|
3204
|
-
);
|
|
3205
|
-
}
|
|
3206
|
-
var WebTTYFileSystem = class {
|
|
3207
|
-
config;
|
|
3208
|
-
constructor(config) {
|
|
3209
|
-
this.config = config;
|
|
3210
|
-
}
|
|
3211
|
-
async list(path = "/", options = {}) {
|
|
3212
|
-
const response = await this.request("PROPFIND", path, {
|
|
3213
|
-
body: webDAVPropfindBody,
|
|
3214
|
-
expectedStatuses: [207],
|
|
3215
|
-
headers: { "Content-Type": "application/xml; charset=utf-8", Depth: "1" },
|
|
3216
|
-
operation: "WebTTY filesystem list",
|
|
3217
|
-
signal: options.signal
|
|
3218
|
-
});
|
|
3219
|
-
return parseWebDAVMultiStatus(
|
|
3220
|
-
await response.text(),
|
|
3221
|
-
sidecarPath(this.config.fsPath)
|
|
3222
|
-
);
|
|
3223
|
-
}
|
|
3224
|
-
async readBytes(path, options = {}) {
|
|
3225
|
-
const response = await this.request("GET", path, {
|
|
3226
|
-
expectedStatuses: [200],
|
|
3227
|
-
operation: "WebTTY filesystem read",
|
|
3228
|
-
signal: options.signal
|
|
3229
|
-
});
|
|
3230
|
-
return new Uint8Array(await response.arrayBuffer());
|
|
3231
|
-
}
|
|
3232
|
-
async readFile(path, options) {
|
|
3233
|
-
const bytes = await this.readBytes(path, {
|
|
3234
|
-
signal: readFileSignal(options)
|
|
3235
|
-
});
|
|
3236
|
-
const encoding = readFileEncoding(options);
|
|
3237
|
-
return encoding === null ? bytes : new TextDecoder(encoding).decode(bytes);
|
|
3238
|
-
}
|
|
3239
|
-
async readText(path, options = {}) {
|
|
3240
|
-
return new TextDecoder().decode(await this.readBytes(path, options));
|
|
3241
|
-
}
|
|
3242
|
-
async readStream(path, options = {}) {
|
|
3243
|
-
return requireResponseBody(
|
|
3244
|
-
await this.request("GET", path, {
|
|
3245
|
-
expectedStatuses: [200],
|
|
3246
|
-
operation: "WebTTY filesystem read",
|
|
3247
|
-
signal: options.signal
|
|
3248
|
-
}),
|
|
3249
|
-
"WebTTY filesystem read"
|
|
3250
|
-
);
|
|
3251
|
-
}
|
|
3252
|
-
async writeFile(path, data, options = {}) {
|
|
3253
|
-
await this.request("PUT", path, {
|
|
3254
|
-
body: data,
|
|
3255
|
-
expectedStatuses: [200, 201, 204],
|
|
3256
|
-
headers: textContentHeaders(options.contentType, data),
|
|
3257
|
-
operation: "WebTTY filesystem write",
|
|
3258
|
-
signal: options.signal
|
|
3259
|
-
});
|
|
3260
|
-
}
|
|
3261
|
-
async writeBytes(path, data, options = {}) {
|
|
3262
|
-
await this.writeFile(path, data, options);
|
|
3263
|
-
}
|
|
3264
|
-
async writeStream(path, data, options = {}) {
|
|
3265
|
-
await this.request("PUT", path, {
|
|
3266
|
-
body: data,
|
|
3267
|
-
expectedStatuses: [200, 201, 204],
|
|
3268
|
-
headers: contentHeaders(options.contentType),
|
|
3269
|
-
operation: "WebTTY filesystem write",
|
|
3270
|
-
signal: options.signal
|
|
3271
|
-
});
|
|
3272
|
-
}
|
|
3273
|
-
async writeText(path, data, options = {}) {
|
|
3274
|
-
await this.writeFile(path, data, options);
|
|
3275
|
-
}
|
|
3276
|
-
async copyFile(sourcePath, targetPath, options = {}) {
|
|
3277
|
-
await this.request("COPY", sourcePath, {
|
|
3278
|
-
expectedStatuses: [200, 201, 204],
|
|
3279
|
-
headers: { Destination: (await this.resourceURL(targetPath)).toString() },
|
|
3280
|
-
operation: "WebTTY filesystem copy",
|
|
3281
|
-
signal: options.signal
|
|
3282
|
-
});
|
|
3283
|
-
}
|
|
3284
|
-
async createDirectory(path, options = {}) {
|
|
3285
|
-
await this.request("MKCOL", path, {
|
|
3286
|
-
expectedStatuses: [201, 405],
|
|
3287
|
-
operation: "WebTTY filesystem mkdir",
|
|
3288
|
-
signal: options.signal
|
|
3289
|
-
});
|
|
3290
|
-
}
|
|
3291
|
-
async exists(path, options = {}) {
|
|
3292
|
-
return await this.stat(path, options).then(() => true).catch((error) => {
|
|
3293
|
-
if (isNotFound(error)) return false;
|
|
3294
|
-
throw error;
|
|
3295
|
-
});
|
|
3296
|
-
}
|
|
3297
|
-
async mkdir(path, options = {}) {
|
|
3298
|
-
if (options.recursive) {
|
|
3299
|
-
await this.createDirectoryRecursive(path, options.signal);
|
|
3300
|
-
return normalizeRemotePath(path);
|
|
3301
|
-
}
|
|
3302
|
-
await this.createDirectory(path, options);
|
|
3303
|
-
return void 0;
|
|
3304
|
-
}
|
|
3305
|
-
async readdir(path = "/", options = {}) {
|
|
3306
|
-
const items = (await this.list(path, options)).filter(
|
|
3307
|
-
(item) => comparableRemotePath(item.path) !== comparableRemotePath(path)
|
|
3308
|
-
);
|
|
3309
|
-
return options.withFileTypes ? items : items.map((item) => pathBaseName(item.path));
|
|
3310
|
-
}
|
|
3311
|
-
async rename(oldPath, newPath, options = {}) {
|
|
3312
|
-
await this.request("MOVE", oldPath, {
|
|
3313
|
-
expectedStatuses: [200, 201, 204],
|
|
3314
|
-
headers: { Destination: (await this.resourceURL(newPath)).toString() },
|
|
3315
|
-
operation: "WebTTY filesystem rename",
|
|
3316
|
-
signal: options.signal
|
|
3317
|
-
});
|
|
3318
|
-
}
|
|
3319
|
-
async rm(path, options = {}) {
|
|
3320
|
-
void options.recursive;
|
|
3321
|
-
await this.request("DELETE", path, {
|
|
3322
|
-
expectedStatuses: deleteStatuses(options.force),
|
|
3323
|
-
operation: "WebTTY filesystem delete",
|
|
3324
|
-
signal: options.signal
|
|
3325
|
-
});
|
|
3326
|
-
}
|
|
3327
|
-
async stat(path, options = {}) {
|
|
3328
|
-
const response = await this.request("PROPFIND", path, {
|
|
3329
|
-
body: webDAVPropfindBody,
|
|
3330
|
-
expectedStatuses: [207],
|
|
3331
|
-
headers: { "Content-Type": "application/xml; charset=utf-8", Depth: "0" },
|
|
3332
|
-
operation: "WebTTY filesystem stat",
|
|
3333
|
-
signal: options.signal
|
|
3334
|
-
});
|
|
3335
|
-
const item = parseWebDAVMultiStatus(
|
|
3336
|
-
await response.text(),
|
|
3337
|
-
sidecarPath(this.config.fsPath)
|
|
3338
|
-
)[0];
|
|
3339
|
-
if (item) return item;
|
|
3340
|
-
throw new Error(`WebTTY filesystem stat did not return ${path}.`);
|
|
3341
|
-
}
|
|
3342
|
-
async delete(path, options = {}) {
|
|
3343
|
-
await this.rm(path, options);
|
|
3344
|
-
}
|
|
3345
|
-
async createDirectoryRecursive(path, signal) {
|
|
3346
|
-
const normalized = normalizeRemotePath(path);
|
|
3347
|
-
if (normalized === "/") return;
|
|
3348
|
-
const parent = parentPath(normalized);
|
|
3349
|
-
if (parent !== normalized) {
|
|
3350
|
-
await this.createDirectoryRecursive(parent, signal);
|
|
3351
|
-
}
|
|
3352
|
-
await this.createDirectory(normalized, { signal });
|
|
3353
|
-
}
|
|
3354
|
-
async resourceURL(path) {
|
|
3355
|
-
return resolveWebTTYFileSystemURL(
|
|
3356
|
-
await resolveURL2(this.config.url),
|
|
3357
|
-
path,
|
|
3358
|
-
this.config.fsPath
|
|
3359
|
-
);
|
|
3360
|
-
}
|
|
3361
|
-
async request(method, path, options) {
|
|
3362
|
-
return await requireResponseStatus(
|
|
3363
|
-
await resolveFetch(this.config)(
|
|
3364
|
-
await this.resourceURL(path),
|
|
3365
|
-
requestInit(this.config, method, options)
|
|
3366
|
-
),
|
|
3367
|
-
options.expectedStatuses,
|
|
3368
|
-
options.operation
|
|
3369
|
-
);
|
|
3370
|
-
}
|
|
3371
|
-
};
|
|
1
|
+
import {
|
|
2
|
+
WebTTY,
|
|
3
|
+
WebTTYCommand,
|
|
4
|
+
WebTTYFileSystem,
|
|
5
|
+
WebTTYFileSystemError,
|
|
6
|
+
WebTTYRemoteExecutor,
|
|
7
|
+
createWebTTYE2EClientPayloadCrypto,
|
|
8
|
+
createWebTTYE2EKeyContext,
|
|
9
|
+
createWebTTYE2EReplayPayloadCryptoFromKeyGrant,
|
|
10
|
+
createWebTTYE2EServerPayloadCrypto,
|
|
11
|
+
decodeWebTTYE2EKeyMaterial,
|
|
12
|
+
decryptWebTTYRecordedEvent,
|
|
13
|
+
decryptWebTTYRecordedTextLog,
|
|
14
|
+
encodeWebTTYE2EKeyMaterial,
|
|
15
|
+
executeWebTTYCommand,
|
|
16
|
+
generateWebTTYE2EIdentity,
|
|
17
|
+
generateWebTTYSigningIdentity,
|
|
18
|
+
hashWebTTYAttachGrant,
|
|
19
|
+
hashWebTTYClientCredential,
|
|
20
|
+
hashWebTTYClientProofTranscript,
|
|
21
|
+
hashWebTTYConfig,
|
|
22
|
+
hashWebTTYServerProofTranscript,
|
|
23
|
+
hashWebTTYSessionKeyGrant,
|
|
24
|
+
openWebTTYCommand,
|
|
25
|
+
parseWebDAVMultiStatus,
|
|
26
|
+
renderWebTTYRecordedTextLog,
|
|
27
|
+
resolveWebTTYExecutionURL,
|
|
28
|
+
resolveWebTTYFileSystemURL,
|
|
29
|
+
runWebTTYCommand,
|
|
30
|
+
signWebTTYClientProofTranscript,
|
|
31
|
+
signWebTTYServerProofTranscript,
|
|
32
|
+
verifyWebTTYClientProofTranscript,
|
|
33
|
+
verifyWebTTYServerProofTranscript,
|
|
34
|
+
webTTYClientProofTranscriptBytes,
|
|
35
|
+
webTTYE2EKeyID,
|
|
36
|
+
webTTYRecordedEventEncryptedPayload,
|
|
37
|
+
webTTYServerProofTranscriptBytes,
|
|
38
|
+
webTTYSigningKeyID
|
|
39
|
+
} from "./chunk-7OHAFDJE.mjs";
|
|
3372
40
|
export {
|
|
3373
41
|
WebTTY,
|
|
3374
42
|
WebTTYCommand,
|
|
3375
43
|
WebTTYFileSystem,
|
|
3376
44
|
WebTTYFileSystemError,
|
|
3377
45
|
WebTTYRemoteExecutor,
|
|
46
|
+
createWebTTYE2EClientPayloadCrypto,
|
|
47
|
+
createWebTTYE2EKeyContext,
|
|
48
|
+
createWebTTYE2EReplayPayloadCryptoFromKeyGrant,
|
|
49
|
+
createWebTTYE2EServerPayloadCrypto,
|
|
50
|
+
decodeWebTTYE2EKeyMaterial,
|
|
51
|
+
decryptWebTTYRecordedEvent,
|
|
52
|
+
decryptWebTTYRecordedTextLog,
|
|
53
|
+
encodeWebTTYE2EKeyMaterial,
|
|
3378
54
|
executeWebTTYCommand,
|
|
55
|
+
generateWebTTYE2EIdentity,
|
|
56
|
+
generateWebTTYSigningIdentity,
|
|
57
|
+
hashWebTTYAttachGrant,
|
|
58
|
+
hashWebTTYClientCredential,
|
|
59
|
+
hashWebTTYClientProofTranscript,
|
|
60
|
+
hashWebTTYConfig,
|
|
61
|
+
hashWebTTYServerProofTranscript,
|
|
62
|
+
hashWebTTYSessionKeyGrant,
|
|
3379
63
|
openWebTTYCommand,
|
|
3380
64
|
parseWebDAVMultiStatus,
|
|
65
|
+
renderWebTTYRecordedTextLog,
|
|
3381
66
|
resolveWebTTYExecutionURL,
|
|
3382
67
|
resolveWebTTYFileSystemURL,
|
|
3383
|
-
runWebTTYCommand
|
|
68
|
+
runWebTTYCommand,
|
|
69
|
+
signWebTTYClientProofTranscript,
|
|
70
|
+
signWebTTYServerProofTranscript,
|
|
71
|
+
verifyWebTTYClientProofTranscript,
|
|
72
|
+
verifyWebTTYServerProofTranscript,
|
|
73
|
+
webTTYClientProofTranscriptBytes,
|
|
74
|
+
webTTYE2EKeyID,
|
|
75
|
+
webTTYRecordedEventEncryptedPayload,
|
|
76
|
+
webTTYServerProofTranscriptBytes,
|
|
77
|
+
webTTYSigningKeyID
|
|
3384
78
|
};
|