@stanterprise/protobuf 0.0.4 → 0.0.6

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/dist/index.js CHANGED
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __typeError = (msg) => {
9
+ throw TypeError(msg);
10
+ };
6
11
  var __export = (target, all) => {
7
12
  for (var name in all)
8
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,768 +20,1341 @@ var __copyProps = (to, from, except, desc) => {
15
20
  }
16
21
  return to;
17
22
  };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
18
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
33
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
34
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
19
35
 
20
36
  // index.ts
21
37
  var index_exports = {};
22
38
  __export(index_exports, {
23
- Ack: () => Ack,
24
- Attachment: () => Attachment,
25
- TestEventCollector: () => TestEventCollector,
26
- TestEventCollectorClient: () => TestEventCollectorClient,
27
- TestFinishEvent: () => TestFinishEvent,
28
- TestStartEvent: () => TestStartEvent,
29
- TestStatus: () => TestStatus,
30
- TestStep: () => TestStep,
31
- TestStepEvent: () => TestStepEvent
39
+ google_protobuf: () => google,
40
+ testsystem_v1_common: () => testsystem,
41
+ testsystem_v1_entities: () => testsystem2,
42
+ testsystem_v1_events: () => testsystem3,
43
+ testsystem_v1_observer: () => testsystem4
32
44
  });
33
45
  module.exports = __toCommonJS(index_exports);
34
46
 
35
- // lib/common.ts
36
- var import_runtime = require("@protobuf-ts/runtime");
37
- var import_runtime2 = require("@protobuf-ts/runtime");
38
- var import_runtime3 = require("@protobuf-ts/runtime");
39
- var import_runtime4 = require("@protobuf-ts/runtime");
40
- var TestStatus = /* @__PURE__ */ ((TestStatus2) => {
41
- TestStatus2[TestStatus2["UNKNOWN"] = 0] = "UNKNOWN";
42
- TestStatus2[TestStatus2["PASSED"] = 1] = "PASSED";
43
- TestStatus2[TestStatus2["FAILED"] = 2] = "FAILED";
44
- TestStatus2[TestStatus2["SKIPPED"] = 3] = "SKIPPED";
45
- TestStatus2[TestStatus2["BROKEN"] = 4] = "BROKEN";
46
- return TestStatus2;
47
- })(TestStatus || {});
48
- var Attachment$Type = class extends import_runtime4.MessageType {
49
- constructor() {
50
- super("testsystem.common.Attachment", [
51
- {
52
- no: 1,
53
- name: "name",
54
- kind: "scalar",
55
- T: 9
56
- /*ScalarType.STRING*/
57
- },
58
- {
59
- no: 2,
60
- name: "mime_type",
61
- kind: "scalar",
62
- T: 9
63
- /*ScalarType.STRING*/
64
- },
65
- {
66
- no: 3,
67
- name: "content",
68
- kind: "scalar",
69
- T: 12
70
- /*ScalarType.BYTES*/
47
+ // lib/google/protobuf/timestamp.ts
48
+ var pb_1 = __toESM(require("google-protobuf"));
49
+ var google;
50
+ ((google2) => {
51
+ let protobuf;
52
+ ((protobuf2) => {
53
+ var _one_of_decls;
54
+ const _Timestamp = class _Timestamp extends pb_1.Message {
55
+ constructor(data) {
56
+ super();
57
+ __privateAdd(this, _one_of_decls, []);
58
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __privateGet(this, _one_of_decls));
59
+ if (!Array.isArray(data) && typeof data == "object") {
60
+ if ("seconds" in data && data.seconds != void 0) {
61
+ this.seconds = data.seconds;
62
+ }
63
+ if ("nanos" in data && data.nanos != void 0) {
64
+ this.nanos = data.nanos;
65
+ }
66
+ }
71
67
  }
72
- ]);
73
- }
74
- create(value) {
75
- const message = globalThis.Object.create(this.messagePrototype);
76
- message.name = "";
77
- message.mimeType = "";
78
- message.content = new Uint8Array(0);
79
- if (value !== void 0)
80
- (0, import_runtime3.reflectionMergePartial)(this, message, value);
81
- return message;
82
- }
83
- internalBinaryRead(reader, length, options, target) {
84
- let message = target ?? this.create(), end = reader.pos + length;
85
- while (reader.pos < end) {
86
- let [fieldNo, wireType] = reader.tag();
87
- switch (fieldNo) {
88
- case /* string name */
89
- 1:
90
- message.name = reader.string();
91
- break;
92
- case /* string mime_type */
93
- 2:
94
- message.mimeType = reader.string();
95
- break;
96
- case /* bytes content */
97
- 3:
98
- message.content = reader.bytes();
99
- break;
100
- default:
101
- let u = options.readUnknownField;
102
- if (u === "throw")
103
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
104
- let d = reader.skip(wireType);
105
- if (u !== false)
106
- (u === true ? import_runtime2.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
68
+ get seconds() {
69
+ return pb_1.Message.getFieldWithDefault(this, 1, 0);
107
70
  }
108
- }
109
- return message;
110
- }
111
- internalBinaryWrite(message, writer, options) {
112
- if (message.name !== "")
113
- writer.tag(1, import_runtime.WireType.LengthDelimited).string(message.name);
114
- if (message.mimeType !== "")
115
- writer.tag(2, import_runtime.WireType.LengthDelimited).string(message.mimeType);
116
- if (message.content.length)
117
- writer.tag(3, import_runtime.WireType.LengthDelimited).bytes(message.content);
118
- let u = options.writeUnknownFields;
119
- if (u !== false)
120
- (u == true ? import_runtime2.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
121
- return writer;
122
- }
123
- };
124
- var Attachment = new Attachment$Type();
125
-
126
- // lib/events.ts
127
- var import_runtime11 = require("@protobuf-ts/runtime");
128
- var import_runtime12 = require("@protobuf-ts/runtime");
129
- var import_runtime13 = require("@protobuf-ts/runtime");
130
- var import_runtime14 = require("@protobuf-ts/runtime");
131
-
132
- // lib/google/protobuf/timestamp.ts
133
- var import_runtime5 = require("@protobuf-ts/runtime");
134
- var import_runtime6 = require("@protobuf-ts/runtime");
135
- var import_runtime7 = require("@protobuf-ts/runtime");
136
- var import_runtime8 = require("@protobuf-ts/runtime");
137
- var import_runtime9 = require("@protobuf-ts/runtime");
138
- var import_runtime10 = require("@protobuf-ts/runtime");
139
- var Timestamp$Type = class extends import_runtime10.MessageType {
140
- constructor() {
141
- super("google.protobuf.Timestamp", [
142
- {
143
- no: 1,
144
- name: "seconds",
145
- kind: "scalar",
146
- T: 3
147
- /*ScalarType.INT64*/
148
- },
149
- {
150
- no: 2,
151
- name: "nanos",
152
- kind: "scalar",
153
- T: 5
154
- /*ScalarType.INT32*/
71
+ set seconds(value) {
72
+ pb_1.Message.setField(this, 1, value);
155
73
  }
156
- ]);
157
- }
158
- /**
159
- * Creates a new `Timestamp` for the current time.
160
- */
161
- now() {
162
- const msg = this.create();
163
- const ms = Date.now();
164
- msg.seconds = import_runtime9.PbLong.from(Math.floor(ms / 1e3)).toString();
165
- msg.nanos = ms % 1e3 * 1e6;
166
- return msg;
167
- }
168
- /**
169
- * Converts a `Timestamp` to a JavaScript Date.
170
- */
171
- toDate(message) {
172
- return new Date(import_runtime9.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6));
173
- }
174
- /**
175
- * Converts a JavaScript Date to a `Timestamp`.
176
- */
177
- fromDate(date) {
178
- const msg = this.create();
179
- const ms = date.getTime();
180
- msg.seconds = import_runtime9.PbLong.from(Math.floor(ms / 1e3)).toString();
181
- msg.nanos = (ms % 1e3 + (ms < 0 && ms % 1e3 !== 0 ? 1e3 : 0)) * 1e6;
182
- return msg;
183
- }
184
- /**
185
- * In JSON format, the `Timestamp` type is encoded as a string
186
- * in the RFC 3339 format.
187
- */
188
- internalJsonWrite(message, options) {
189
- let ms = import_runtime9.PbLong.from(message.seconds).toNumber() * 1e3;
190
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
191
- throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
192
- if (message.nanos < 0)
193
- throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
194
- let z = "Z";
195
- if (message.nanos > 0) {
196
- let nanosStr = (message.nanos + 1e9).toString().substring(1);
197
- if (nanosStr.substring(3) === "000000")
198
- z = "." + nanosStr.substring(0, 3) + "Z";
199
- else if (nanosStr.substring(6) === "000")
200
- z = "." + nanosStr.substring(0, 6) + "Z";
201
- else
202
- z = "." + nanosStr + "Z";
203
- }
204
- return new Date(ms).toISOString().replace(".000Z", z);
205
- }
206
- /**
207
- * In JSON format, the `Timestamp` type is encoded as a string
208
- * in the RFC 3339 format.
209
- */
210
- internalJsonRead(json, options, target) {
211
- if (typeof json !== "string")
212
- throw new Error("Unable to parse Timestamp from JSON " + (0, import_runtime8.typeofJsonValue)(json) + ".");
213
- let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
214
- if (!matches)
215
- throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
216
- let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
217
- if (Number.isNaN(ms))
218
- throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
219
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
220
- throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
221
- if (!target)
222
- target = this.create();
223
- target.seconds = import_runtime9.PbLong.from(ms / 1e3).toString();
224
- target.nanos = 0;
225
- if (matches[7])
226
- target.nanos = parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1e9;
227
- return target;
228
- }
229
- create(value) {
230
- const message = globalThis.Object.create(this.messagePrototype);
231
- message.seconds = "0";
232
- message.nanos = 0;
233
- if (value !== void 0)
234
- (0, import_runtime7.reflectionMergePartial)(this, message, value);
235
- return message;
236
- }
237
- internalBinaryRead(reader, length, options, target) {
238
- let message = target ?? this.create(), end = reader.pos + length;
239
- while (reader.pos < end) {
240
- let [fieldNo, wireType] = reader.tag();
241
- switch (fieldNo) {
242
- case /* int64 seconds */
243
- 1:
244
- message.seconds = reader.int64().toString();
245
- break;
246
- case /* int32 nanos */
247
- 2:
248
- message.nanos = reader.int32();
249
- break;
250
- default:
251
- let u = options.readUnknownField;
252
- if (u === "throw")
253
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
254
- let d = reader.skip(wireType);
255
- if (u !== false)
256
- (u === true ? import_runtime6.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
74
+ get nanos() {
75
+ return pb_1.Message.getFieldWithDefault(this, 2, 0);
257
76
  }
258
- }
259
- return message;
260
- }
261
- internalBinaryWrite(message, writer, options) {
262
- if (message.seconds !== "0")
263
- writer.tag(1, import_runtime5.WireType.Varint).int64(message.seconds);
264
- if (message.nanos !== 0)
265
- writer.tag(2, import_runtime5.WireType.Varint).int32(message.nanos);
266
- let u = options.writeUnknownFields;
267
- if (u !== false)
268
- (u == true ? import_runtime6.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
269
- return writer;
270
- }
271
- };
272
- var Timestamp = new Timestamp$Type();
273
-
274
- // lib/events.ts
275
- var TestStartEvent$Type = class extends import_runtime14.MessageType {
276
- constructor() {
277
- super("testsystem.events.TestStartEvent", [
278
- {
279
- no: 1,
280
- name: "test_id",
281
- kind: "scalar",
282
- T: 9
283
- /*ScalarType.STRING*/
284
- },
285
- {
286
- no: 2,
287
- name: "test_name",
288
- kind: "scalar",
289
- T: 9
290
- /*ScalarType.STRING*/
291
- },
292
- { no: 3, name: "start_time", kind: "message", T: () => Timestamp },
293
- { no: 4, name: "metadata", kind: "map", K: 9, V: {
294
- kind: "scalar",
295
- T: 9
296
- /*ScalarType.STRING*/
297
- } }
298
- ]);
299
- }
300
- create(value) {
301
- const message = globalThis.Object.create(this.messagePrototype);
302
- message.testId = "";
303
- message.testName = "";
304
- message.metadata = {};
305
- if (value !== void 0)
306
- (0, import_runtime13.reflectionMergePartial)(this, message, value);
307
- return message;
308
- }
309
- internalBinaryRead(reader, length, options, target) {
310
- let message = target ?? this.create(), end = reader.pos + length;
311
- while (reader.pos < end) {
312
- let [fieldNo, wireType] = reader.tag();
313
- switch (fieldNo) {
314
- case /* string test_id */
315
- 1:
316
- message.testId = reader.string();
317
- break;
318
- case /* string test_name */
319
- 2:
320
- message.testName = reader.string();
321
- break;
322
- case /* google.protobuf.Timestamp start_time */
323
- 3:
324
- message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime);
325
- break;
326
- case /* map<string, string> metadata */
327
- 4:
328
- this.binaryReadMap4(message.metadata, reader, options);
329
- break;
330
- default:
331
- let u = options.readUnknownField;
332
- if (u === "throw")
333
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
334
- let d = reader.skip(wireType);
335
- if (u !== false)
336
- (u === true ? import_runtime12.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
77
+ set nanos(value) {
78
+ pb_1.Message.setField(this, 2, value);
337
79
  }
338
- }
339
- return message;
340
- }
341
- binaryReadMap4(map, reader, options) {
342
- let len = reader.uint32(), end = reader.pos + len, key, val;
343
- while (reader.pos < end) {
344
- let [fieldNo, wireType] = reader.tag();
345
- switch (fieldNo) {
346
- case 1:
347
- key = reader.string();
348
- break;
349
- case 2:
350
- val = reader.string();
351
- break;
352
- default:
353
- throw new globalThis.Error("unknown map entry field for testsystem.events.TestStartEvent.metadata");
80
+ static fromObject(data) {
81
+ const message = new _Timestamp({});
82
+ if (data.seconds != null) {
83
+ message.seconds = data.seconds;
84
+ }
85
+ if (data.nanos != null) {
86
+ message.nanos = data.nanos;
87
+ }
88
+ return message;
354
89
  }
355
- }
356
- map[key ?? ""] = val ?? "";
357
- }
358
- internalBinaryWrite(message, writer, options) {
359
- if (message.testId !== "")
360
- writer.tag(1, import_runtime11.WireType.LengthDelimited).string(message.testId);
361
- if (message.testName !== "")
362
- writer.tag(2, import_runtime11.WireType.LengthDelimited).string(message.testName);
363
- if (message.startTime)
364
- Timestamp.internalBinaryWrite(message.startTime, writer.tag(3, import_runtime11.WireType.LengthDelimited).fork(), options).join();
365
- for (let k of globalThis.Object.keys(message.metadata))
366
- writer.tag(4, import_runtime11.WireType.LengthDelimited).fork().tag(1, import_runtime11.WireType.LengthDelimited).string(k).tag(2, import_runtime11.WireType.LengthDelimited).string(message.metadata[k]).join();
367
- let u = options.writeUnknownFields;
368
- if (u !== false)
369
- (u == true ? import_runtime12.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
370
- return writer;
371
- }
372
- };
373
- var TestStartEvent = new TestStartEvent$Type();
374
- var TestFinishEvent$Type = class extends import_runtime14.MessageType {
375
- constructor() {
376
- super("testsystem.events.TestFinishEvent", [
377
- {
378
- no: 1,
379
- name: "test_id",
380
- kind: "scalar",
381
- T: 9
382
- /*ScalarType.STRING*/
383
- },
384
- { no: 2, name: "status", kind: "enum", T: () => ["testsystem.common.TestStatus", TestStatus] },
385
- { no: 3, name: "end_time", kind: "message", T: () => Timestamp },
386
- { no: 4, name: "attachments", kind: "message", repeat: 2, T: () => Attachment },
387
- {
388
- no: 5,
389
- name: "error_message",
390
- kind: "scalar",
391
- T: 9
392
- /*ScalarType.STRING*/
393
- },
394
- {
395
- no: 6,
396
- name: "stack_trace",
397
- kind: "scalar",
398
- T: 9
399
- /*ScalarType.STRING*/
90
+ toObject() {
91
+ const data = {};
92
+ if (this.seconds != null) {
93
+ data.seconds = this.seconds;
94
+ }
95
+ if (this.nanos != null) {
96
+ data.nanos = this.nanos;
97
+ }
98
+ return data;
400
99
  }
401
- ]);
402
- }
403
- create(value) {
404
- const message = globalThis.Object.create(this.messagePrototype);
405
- message.testId = "";
406
- message.status = 0;
407
- message.attachments = [];
408
- message.errorMessage = "";
409
- message.stackTrace = "";
410
- if (value !== void 0)
411
- (0, import_runtime13.reflectionMergePartial)(this, message, value);
412
- return message;
413
- }
414
- internalBinaryRead(reader, length, options, target) {
415
- let message = target ?? this.create(), end = reader.pos + length;
416
- while (reader.pos < end) {
417
- let [fieldNo, wireType] = reader.tag();
418
- switch (fieldNo) {
419
- case /* string test_id */
420
- 1:
421
- message.testId = reader.string();
422
- break;
423
- case /* testsystem.common.TestStatus status */
424
- 2:
425
- message.status = reader.int32();
426
- break;
427
- case /* google.protobuf.Timestamp end_time */
428
- 3:
429
- message.endTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endTime);
430
- break;
431
- case /* repeated testsystem.common.Attachment attachments */
432
- 4:
433
- message.attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
434
- break;
435
- case /* string error_message */
436
- 5:
437
- message.errorMessage = reader.string();
438
- break;
439
- case /* string stack_trace */
440
- 6:
441
- message.stackTrace = reader.string();
442
- break;
443
- default:
444
- let u = options.readUnknownField;
445
- if (u === "throw")
446
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
447
- let d = reader.skip(wireType);
448
- if (u !== false)
449
- (u === true ? import_runtime12.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
100
+ serialize(w) {
101
+ const writer = w || new pb_1.BinaryWriter();
102
+ if (this.seconds != 0)
103
+ writer.writeInt64(1, this.seconds);
104
+ if (this.nanos != 0)
105
+ writer.writeInt32(2, this.nanos);
106
+ if (!w)
107
+ return writer.getResultBuffer();
450
108
  }
451
- }
452
- return message;
453
- }
454
- internalBinaryWrite(message, writer, options) {
455
- if (message.testId !== "")
456
- writer.tag(1, import_runtime11.WireType.LengthDelimited).string(message.testId);
457
- if (message.status !== 0)
458
- writer.tag(2, import_runtime11.WireType.Varint).int32(message.status);
459
- if (message.endTime)
460
- Timestamp.internalBinaryWrite(message.endTime, writer.tag(3, import_runtime11.WireType.LengthDelimited).fork(), options).join();
461
- for (let i = 0; i < message.attachments.length; i++)
462
- Attachment.internalBinaryWrite(message.attachments[i], writer.tag(4, import_runtime11.WireType.LengthDelimited).fork(), options).join();
463
- if (message.errorMessage !== "")
464
- writer.tag(5, import_runtime11.WireType.LengthDelimited).string(message.errorMessage);
465
- if (message.stackTrace !== "")
466
- writer.tag(6, import_runtime11.WireType.LengthDelimited).string(message.stackTrace);
467
- let u = options.writeUnknownFields;
468
- if (u !== false)
469
- (u == true ? import_runtime12.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
470
- return writer;
471
- }
472
- };
473
- var TestFinishEvent = new TestFinishEvent$Type();
474
- var TestStep$Type = class extends import_runtime14.MessageType {
475
- constructor() {
476
- super("testsystem.events.TestStep", [
477
- {
478
- no: 1,
479
- name: "description",
480
- kind: "scalar",
481
- T: 9
482
- /*ScalarType.STRING*/
483
- },
484
- { no: 2, name: "timestamp", kind: "message", T: () => Timestamp },
485
- { no: 3, name: "status", kind: "enum", T: () => ["testsystem.common.TestStatus", TestStatus] },
486
- { no: 4, name: "attachments", kind: "message", repeat: 2, T: () => Attachment }
487
- ]);
488
- }
489
- create(value) {
490
- const message = globalThis.Object.create(this.messagePrototype);
491
- message.description = "";
492
- message.status = 0;
493
- message.attachments = [];
494
- if (value !== void 0)
495
- (0, import_runtime13.reflectionMergePartial)(this, message, value);
496
- return message;
497
- }
498
- internalBinaryRead(reader, length, options, target) {
499
- let message = target ?? this.create(), end = reader.pos + length;
500
- while (reader.pos < end) {
501
- let [fieldNo, wireType] = reader.tag();
502
- switch (fieldNo) {
503
- case /* string description */
504
- 1:
505
- message.description = reader.string();
506
- break;
507
- case /* google.protobuf.Timestamp timestamp */
508
- 2:
509
- message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp);
510
- break;
511
- case /* testsystem.common.TestStatus status */
512
- 3:
513
- message.status = reader.int32();
514
- break;
515
- case /* repeated testsystem.common.Attachment attachments */
516
- 4:
517
- message.attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
518
- break;
519
- default:
520
- let u = options.readUnknownField;
521
- if (u === "throw")
522
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
523
- let d = reader.skip(wireType);
524
- if (u !== false)
525
- (u === true ? import_runtime12.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
109
+ static deserialize(bytes) {
110
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new _Timestamp();
111
+ while (reader.nextField()) {
112
+ if (reader.isEndGroup())
113
+ break;
114
+ switch (reader.getFieldNumber()) {
115
+ case 1:
116
+ message.seconds = reader.readInt64();
117
+ break;
118
+ case 2:
119
+ message.nanos = reader.readInt32();
120
+ break;
121
+ default:
122
+ reader.skipField();
123
+ }
124
+ }
125
+ return message;
526
126
  }
527
- }
528
- return message;
529
- }
530
- internalBinaryWrite(message, writer, options) {
531
- if (message.description !== "")
532
- writer.tag(1, import_runtime11.WireType.LengthDelimited).string(message.description);
533
- if (message.timestamp)
534
- Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, import_runtime11.WireType.LengthDelimited).fork(), options).join();
535
- if (message.status !== 0)
536
- writer.tag(3, import_runtime11.WireType.Varint).int32(message.status);
537
- for (let i = 0; i < message.attachments.length; i++)
538
- Attachment.internalBinaryWrite(message.attachments[i], writer.tag(4, import_runtime11.WireType.LengthDelimited).fork(), options).join();
539
- let u = options.writeUnknownFields;
540
- if (u !== false)
541
- (u == true ? import_runtime12.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
542
- return writer;
543
- }
544
- };
545
- var TestStep = new TestStep$Type();
546
- var TestStepEvent$Type = class extends import_runtime14.MessageType {
547
- constructor() {
548
- super("testsystem.events.TestStepEvent", [
549
- {
550
- no: 1,
551
- name: "test_id",
552
- kind: "scalar",
553
- T: 9
554
- /*ScalarType.STRING*/
555
- },
556
- { no: 2, name: "steps", kind: "message", repeat: 2, T: () => TestStep }
557
- ]);
558
- }
559
- create(value) {
560
- const message = globalThis.Object.create(this.messagePrototype);
561
- message.testId = "";
562
- message.steps = [];
563
- if (value !== void 0)
564
- (0, import_runtime13.reflectionMergePartial)(this, message, value);
565
- return message;
566
- }
567
- internalBinaryRead(reader, length, options, target) {
568
- let message = target ?? this.create(), end = reader.pos + length;
569
- while (reader.pos < end) {
570
- let [fieldNo, wireType] = reader.tag();
571
- switch (fieldNo) {
572
- case /* string test_id */
573
- 1:
574
- message.testId = reader.string();
575
- break;
576
- case /* repeated testsystem.events.TestStep steps */
577
- 2:
578
- message.steps.push(TestStep.internalBinaryRead(reader, reader.uint32(), options));
579
- break;
580
- default:
581
- let u = options.readUnknownField;
582
- if (u === "throw")
583
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
584
- let d = reader.skip(wireType);
585
- if (u !== false)
586
- (u === true ? import_runtime12.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
127
+ serializeBinary() {
128
+ return this.serialize();
587
129
  }
588
- }
589
- return message;
590
- }
591
- internalBinaryWrite(message, writer, options) {
592
- if (message.testId !== "")
593
- writer.tag(1, import_runtime11.WireType.LengthDelimited).string(message.testId);
594
- for (let i = 0; i < message.steps.length; i++)
595
- TestStep.internalBinaryWrite(message.steps[i], writer.tag(2, import_runtime11.WireType.LengthDelimited).fork(), options).join();
596
- let u = options.writeUnknownFields;
597
- if (u !== false)
598
- (u == true ? import_runtime12.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
599
- return writer;
600
- }
601
- };
602
- var TestStepEvent = new TestStepEvent$Type();
130
+ static deserializeBinary(bytes) {
131
+ return _Timestamp.deserialize(bytes);
132
+ }
133
+ };
134
+ _one_of_decls = new WeakMap();
135
+ let Timestamp = _Timestamp;
136
+ protobuf2.Timestamp = _Timestamp;
137
+ })(protobuf = google2.protobuf || (google2.protobuf = {}));
138
+ })(google || (google = {}));
603
139
 
604
- // node_modules/@protobuf-ts/runtime-rpc/build/es2015/reflection-info.js
605
- var import_runtime15 = require("@protobuf-ts/runtime");
606
- function normalizeMethodInfo(method, service) {
607
- var _a, _b, _c;
608
- let m = method;
609
- m.service = service;
610
- m.localName = (_a = m.localName) !== null && _a !== void 0 ? _a : (0, import_runtime15.lowerCamelCase)(m.name);
611
- m.serverStreaming = !!m.serverStreaming;
612
- m.clientStreaming = !!m.clientStreaming;
613
- m.options = (_b = m.options) !== null && _b !== void 0 ? _b : {};
614
- m.idempotency = (_c = m.idempotency) !== null && _c !== void 0 ? _c : void 0;
615
- return m;
616
- }
140
+ // lib/testsystem/v1/common/common.ts
141
+ var pb_12 = __toESM(require("google-protobuf"));
142
+ var testsystem;
143
+ ((testsystem5) => {
144
+ let v1;
145
+ ((v12) => {
146
+ let common;
147
+ ((common2) => {
148
+ var _one_of_decls;
149
+ let TestStatus;
150
+ ((TestStatus2) => {
151
+ TestStatus2[TestStatus2["UNKNOWN"] = 0] = "UNKNOWN";
152
+ TestStatus2[TestStatus2["PASSED"] = 1] = "PASSED";
153
+ TestStatus2[TestStatus2["FAILED"] = 2] = "FAILED";
154
+ TestStatus2[TestStatus2["SKIPPED"] = 3] = "SKIPPED";
155
+ TestStatus2[TestStatus2["BROKEN"] = 4] = "BROKEN";
156
+ })(TestStatus = common2.TestStatus || (common2.TestStatus = {}));
157
+ const _Attachment = class _Attachment extends pb_12.Message {
158
+ constructor(data) {
159
+ super();
160
+ __privateAdd(this, _one_of_decls, [[3, 4]]);
161
+ pb_12.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __privateGet(this, _one_of_decls));
162
+ if (!Array.isArray(data) && typeof data == "object") {
163
+ if ("name" in data && data.name != void 0) {
164
+ this.name = data.name;
165
+ }
166
+ if ("mime_type" in data && data.mime_type != void 0) {
167
+ this.mime_type = data.mime_type;
168
+ }
169
+ if ("content" in data && data.content != void 0) {
170
+ this.content = data.content;
171
+ }
172
+ if ("uri" in data && data.uri != void 0) {
173
+ this.uri = data.uri;
174
+ }
175
+ }
176
+ }
177
+ get name() {
178
+ return pb_12.Message.getFieldWithDefault(this, 1, "");
179
+ }
180
+ set name(value) {
181
+ pb_12.Message.setField(this, 1, value);
182
+ }
183
+ get mime_type() {
184
+ return pb_12.Message.getFieldWithDefault(this, 2, "");
185
+ }
186
+ set mime_type(value) {
187
+ pb_12.Message.setField(this, 2, value);
188
+ }
189
+ get content() {
190
+ return pb_12.Message.getFieldWithDefault(this, 3, new Uint8Array(0));
191
+ }
192
+ set content(value) {
193
+ pb_12.Message.setOneofField(this, 3, __privateGet(this, _one_of_decls)[0], value);
194
+ }
195
+ get has_content() {
196
+ return pb_12.Message.getField(this, 3) != null;
197
+ }
198
+ get uri() {
199
+ return pb_12.Message.getFieldWithDefault(this, 4, "");
200
+ }
201
+ set uri(value) {
202
+ pb_12.Message.setOneofField(this, 4, __privateGet(this, _one_of_decls)[0], value);
203
+ }
204
+ get has_uri() {
205
+ return pb_12.Message.getField(this, 4) != null;
206
+ }
207
+ get payload() {
208
+ const cases = {
209
+ 0: "none",
210
+ 3: "content",
211
+ 4: "uri"
212
+ };
213
+ return cases[pb_12.Message.computeOneofCase(this, [3, 4])];
214
+ }
215
+ static fromObject(data) {
216
+ const message = new _Attachment({});
217
+ if (data.name != null) {
218
+ message.name = data.name;
219
+ }
220
+ if (data.mime_type != null) {
221
+ message.mime_type = data.mime_type;
222
+ }
223
+ if (data.content != null) {
224
+ message.content = data.content;
225
+ }
226
+ if (data.uri != null) {
227
+ message.uri = data.uri;
228
+ }
229
+ return message;
230
+ }
231
+ toObject() {
232
+ const data = {};
233
+ if (this.name != null) {
234
+ data.name = this.name;
235
+ }
236
+ if (this.mime_type != null) {
237
+ data.mime_type = this.mime_type;
238
+ }
239
+ if (this.content != null) {
240
+ data.content = this.content;
241
+ }
242
+ if (this.uri != null) {
243
+ data.uri = this.uri;
244
+ }
245
+ return data;
246
+ }
247
+ serialize(w) {
248
+ const writer = w || new pb_12.BinaryWriter();
249
+ if (this.name.length)
250
+ writer.writeString(1, this.name);
251
+ if (this.mime_type.length)
252
+ writer.writeString(2, this.mime_type);
253
+ if (this.has_content)
254
+ writer.writeBytes(3, this.content);
255
+ if (this.has_uri)
256
+ writer.writeString(4, this.uri);
257
+ if (!w)
258
+ return writer.getResultBuffer();
259
+ }
260
+ static deserialize(bytes) {
261
+ const reader = bytes instanceof pb_12.BinaryReader ? bytes : new pb_12.BinaryReader(bytes), message = new _Attachment();
262
+ while (reader.nextField()) {
263
+ if (reader.isEndGroup())
264
+ break;
265
+ switch (reader.getFieldNumber()) {
266
+ case 1:
267
+ message.name = reader.readString();
268
+ break;
269
+ case 2:
270
+ message.mime_type = reader.readString();
271
+ break;
272
+ case 3:
273
+ message.content = reader.readBytes();
274
+ break;
275
+ case 4:
276
+ message.uri = reader.readString();
277
+ break;
278
+ default:
279
+ reader.skipField();
280
+ }
281
+ }
282
+ return message;
283
+ }
284
+ serializeBinary() {
285
+ return this.serialize();
286
+ }
287
+ static deserializeBinary(bytes) {
288
+ return _Attachment.deserialize(bytes);
289
+ }
290
+ };
291
+ _one_of_decls = new WeakMap();
292
+ let Attachment = _Attachment;
293
+ common2.Attachment = _Attachment;
294
+ })(common = v12.common || (v12.common = {}));
295
+ })(v1 = testsystem5.v1 || (testsystem5.v1 = {}));
296
+ })(testsystem || (testsystem = {}));
617
297
 
618
- // node_modules/@protobuf-ts/runtime-rpc/build/es2015/service-type.js
619
- var ServiceType = class {
620
- constructor(typeName, methods, options) {
621
- this.typeName = typeName;
622
- this.methods = methods.map((i) => normalizeMethodInfo(i, this));
623
- this.options = options !== null && options !== void 0 ? options : {};
624
- }
625
- };
298
+ // lib/testsystem/v1/entities/entities.ts
299
+ var pb_13 = __toESM(require("google-protobuf"));
300
+ var testsystem2;
301
+ ((testsystem5) => {
302
+ let v1;
303
+ ((v12) => {
304
+ let entities;
305
+ ((entities2) => {
306
+ var _one_of_decls, _one_of_decls2;
307
+ const _TestScript = class _TestScript extends pb_13.Message {
308
+ constructor(data) {
309
+ super();
310
+ __privateAdd(this, _one_of_decls, [[6]]);
311
+ pb_13.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], __privateGet(this, _one_of_decls));
312
+ if (!Array.isArray(data) && typeof data == "object") {
313
+ if ("id" in data && data.id != void 0) {
314
+ this.id = data.id;
315
+ }
316
+ if ("name" in data && data.name != void 0) {
317
+ this.name = data.name;
318
+ }
319
+ if ("description" in data && data.description != void 0) {
320
+ this.description = data.description;
321
+ }
322
+ if ("steps" in data && data.steps != void 0) {
323
+ this.steps = data.steps;
324
+ }
325
+ if ("metadata" in data && data.metadata != void 0) {
326
+ this.metadata = data.metadata;
327
+ }
328
+ if ("is_active" in data && data.is_active != void 0) {
329
+ this.is_active = data.is_active;
330
+ }
331
+ }
332
+ if (!this.metadata)
333
+ this.metadata = /* @__PURE__ */ new Map();
334
+ }
335
+ get id() {
336
+ return pb_13.Message.getFieldWithDefault(this, 1, "");
337
+ }
338
+ set id(value) {
339
+ pb_13.Message.setField(this, 1, value);
340
+ }
341
+ get name() {
342
+ return pb_13.Message.getFieldWithDefault(this, 2, "");
343
+ }
344
+ set name(value) {
345
+ pb_13.Message.setField(this, 2, value);
346
+ }
347
+ get description() {
348
+ return pb_13.Message.getFieldWithDefault(this, 3, "");
349
+ }
350
+ set description(value) {
351
+ pb_13.Message.setField(this, 3, value);
352
+ }
353
+ get steps() {
354
+ return pb_13.Message.getFieldWithDefault(this, 4, []);
355
+ }
356
+ set steps(value) {
357
+ pb_13.Message.setField(this, 4, value);
358
+ }
359
+ get metadata() {
360
+ return pb_13.Message.getField(this, 5);
361
+ }
362
+ set metadata(value) {
363
+ pb_13.Message.setField(this, 5, value);
364
+ }
365
+ get is_active() {
366
+ return pb_13.Message.getFieldWithDefault(this, 6, false);
367
+ }
368
+ set is_active(value) {
369
+ pb_13.Message.setOneofField(this, 6, __privateGet(this, _one_of_decls)[0], value);
370
+ }
371
+ get has_is_active() {
372
+ return pb_13.Message.getField(this, 6) != null;
373
+ }
374
+ get _is_active() {
375
+ const cases = {
376
+ 0: "none",
377
+ 6: "is_active"
378
+ };
379
+ return cases[pb_13.Message.computeOneofCase(this, [6])];
380
+ }
381
+ static fromObject(data) {
382
+ const message = new _TestScript({});
383
+ if (data.id != null) {
384
+ message.id = data.id;
385
+ }
386
+ if (data.name != null) {
387
+ message.name = data.name;
388
+ }
389
+ if (data.description != null) {
390
+ message.description = data.description;
391
+ }
392
+ if (data.steps != null) {
393
+ message.steps = data.steps;
394
+ }
395
+ if (typeof data.metadata == "object") {
396
+ message.metadata = new Map(Object.entries(data.metadata));
397
+ }
398
+ if (data.is_active != null) {
399
+ message.is_active = data.is_active;
400
+ }
401
+ return message;
402
+ }
403
+ toObject() {
404
+ const data = {};
405
+ if (this.id != null) {
406
+ data.id = this.id;
407
+ }
408
+ if (this.name != null) {
409
+ data.name = this.name;
410
+ }
411
+ if (this.description != null) {
412
+ data.description = this.description;
413
+ }
414
+ if (this.steps != null) {
415
+ data.steps = this.steps;
416
+ }
417
+ if (this.metadata != null) {
418
+ data.metadata = Object.fromEntries(this.metadata);
419
+ }
420
+ if (this.is_active != null) {
421
+ data.is_active = this.is_active;
422
+ }
423
+ return data;
424
+ }
425
+ serialize(w) {
426
+ const writer = w || new pb_13.BinaryWriter();
427
+ if (this.id.length)
428
+ writer.writeString(1, this.id);
429
+ if (this.name.length)
430
+ writer.writeString(2, this.name);
431
+ if (this.description.length)
432
+ writer.writeString(3, this.description);
433
+ if (this.steps.length)
434
+ writer.writeRepeatedString(4, this.steps);
435
+ for (const [key, value] of this.metadata) {
436
+ writer.writeMessage(5, this.metadata, () => {
437
+ writer.writeString(1, key);
438
+ writer.writeString(2, value);
439
+ });
440
+ }
441
+ if (this.has_is_active)
442
+ writer.writeBool(6, this.is_active);
443
+ if (!w)
444
+ return writer.getResultBuffer();
445
+ }
446
+ static deserialize(bytes) {
447
+ const reader = bytes instanceof pb_13.BinaryReader ? bytes : new pb_13.BinaryReader(bytes), message = new _TestScript();
448
+ while (reader.nextField()) {
449
+ if (reader.isEndGroup())
450
+ break;
451
+ switch (reader.getFieldNumber()) {
452
+ case 1:
453
+ message.id = reader.readString();
454
+ break;
455
+ case 2:
456
+ message.name = reader.readString();
457
+ break;
458
+ case 3:
459
+ message.description = reader.readString();
460
+ break;
461
+ case 4:
462
+ pb_13.Message.addToRepeatedField(message, 4, reader.readString());
463
+ break;
464
+ case 5:
465
+ reader.readMessage(message, () => pb_13.Map.deserializeBinary(message.metadata, reader, reader.readString, reader.readString));
466
+ break;
467
+ case 6:
468
+ message.is_active = reader.readBool();
469
+ break;
470
+ default:
471
+ reader.skipField();
472
+ }
473
+ }
474
+ return message;
475
+ }
476
+ serializeBinary() {
477
+ return this.serialize();
478
+ }
479
+ static deserializeBinary(bytes) {
480
+ return _TestScript.deserialize(bytes);
481
+ }
482
+ };
483
+ _one_of_decls = new WeakMap();
484
+ let TestScript = _TestScript;
485
+ entities2.TestScript = _TestScript;
486
+ const _TestSuite = class _TestSuite extends pb_13.Message {
487
+ constructor(data) {
488
+ super();
489
+ __privateAdd(this, _one_of_decls2, []);
490
+ pb_13.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 6], __privateGet(this, _one_of_decls2));
491
+ if (!Array.isArray(data) && typeof data == "object") {
492
+ if ("id" in data && data.id != void 0) {
493
+ this.id = data.id;
494
+ }
495
+ if ("name" in data && data.name != void 0) {
496
+ this.name = data.name;
497
+ }
498
+ if ("scripts" in data && data.scripts != void 0) {
499
+ this.scripts = data.scripts;
500
+ }
501
+ if ("description" in data && data.description != void 0) {
502
+ this.description = data.description;
503
+ }
504
+ if ("metadata" in data && data.metadata != void 0) {
505
+ this.metadata = data.metadata;
506
+ }
507
+ if ("sub_suites" in data && data.sub_suites != void 0) {
508
+ this.sub_suites = data.sub_suites;
509
+ }
510
+ }
511
+ if (!this.metadata)
512
+ this.metadata = /* @__PURE__ */ new Map();
513
+ }
514
+ get id() {
515
+ return pb_13.Message.getFieldWithDefault(this, 1, "");
516
+ }
517
+ set id(value) {
518
+ pb_13.Message.setField(this, 1, value);
519
+ }
520
+ get name() {
521
+ return pb_13.Message.getFieldWithDefault(this, 2, "");
522
+ }
523
+ set name(value) {
524
+ pb_13.Message.setField(this, 2, value);
525
+ }
526
+ get scripts() {
527
+ return pb_13.Message.getRepeatedWrapperField(this, TestScript, 3);
528
+ }
529
+ set scripts(value) {
530
+ pb_13.Message.setRepeatedWrapperField(this, 3, value);
531
+ }
532
+ get description() {
533
+ return pb_13.Message.getFieldWithDefault(this, 4, "");
534
+ }
535
+ set description(value) {
536
+ pb_13.Message.setField(this, 4, value);
537
+ }
538
+ get metadata() {
539
+ return pb_13.Message.getField(this, 5);
540
+ }
541
+ set metadata(value) {
542
+ pb_13.Message.setField(this, 5, value);
543
+ }
544
+ get sub_suites() {
545
+ return pb_13.Message.getRepeatedWrapperField(this, _TestSuite, 6);
546
+ }
547
+ set sub_suites(value) {
548
+ pb_13.Message.setRepeatedWrapperField(this, 6, value);
549
+ }
550
+ static fromObject(data) {
551
+ const message = new _TestSuite({});
552
+ if (data.id != null) {
553
+ message.id = data.id;
554
+ }
555
+ if (data.name != null) {
556
+ message.name = data.name;
557
+ }
558
+ if (data.scripts != null) {
559
+ message.scripts = data.scripts.map((item) => TestScript.fromObject(item));
560
+ }
561
+ if (data.description != null) {
562
+ message.description = data.description;
563
+ }
564
+ if (typeof data.metadata == "object") {
565
+ message.metadata = new Map(Object.entries(data.metadata));
566
+ }
567
+ if (data.sub_suites != null) {
568
+ message.sub_suites = data.sub_suites.map((item) => _TestSuite.fromObject(item));
569
+ }
570
+ return message;
571
+ }
572
+ toObject() {
573
+ const data = {};
574
+ if (this.id != null) {
575
+ data.id = this.id;
576
+ }
577
+ if (this.name != null) {
578
+ data.name = this.name;
579
+ }
580
+ if (this.scripts != null) {
581
+ data.scripts = this.scripts.map((item) => item.toObject());
582
+ }
583
+ if (this.description != null) {
584
+ data.description = this.description;
585
+ }
586
+ if (this.metadata != null) {
587
+ data.metadata = Object.fromEntries(this.metadata);
588
+ }
589
+ if (this.sub_suites != null) {
590
+ data.sub_suites = this.sub_suites.map((item) => item.toObject());
591
+ }
592
+ return data;
593
+ }
594
+ serialize(w) {
595
+ const writer = w || new pb_13.BinaryWriter();
596
+ if (this.id.length)
597
+ writer.writeString(1, this.id);
598
+ if (this.name.length)
599
+ writer.writeString(2, this.name);
600
+ if (this.scripts.length)
601
+ writer.writeRepeatedMessage(3, this.scripts, (item) => item.serialize(writer));
602
+ if (this.description.length)
603
+ writer.writeString(4, this.description);
604
+ for (const [key, value] of this.metadata) {
605
+ writer.writeMessage(5, this.metadata, () => {
606
+ writer.writeString(1, key);
607
+ writer.writeString(2, value);
608
+ });
609
+ }
610
+ if (this.sub_suites.length)
611
+ writer.writeRepeatedMessage(6, this.sub_suites, (item) => item.serialize(writer));
612
+ if (!w)
613
+ return writer.getResultBuffer();
614
+ }
615
+ static deserialize(bytes) {
616
+ const reader = bytes instanceof pb_13.BinaryReader ? bytes : new pb_13.BinaryReader(bytes), message = new _TestSuite();
617
+ while (reader.nextField()) {
618
+ if (reader.isEndGroup())
619
+ break;
620
+ switch (reader.getFieldNumber()) {
621
+ case 1:
622
+ message.id = reader.readString();
623
+ break;
624
+ case 2:
625
+ message.name = reader.readString();
626
+ break;
627
+ case 3:
628
+ reader.readMessage(message.scripts, () => pb_13.Message.addToRepeatedWrapperField(message, 3, TestScript.deserialize(reader), TestScript));
629
+ break;
630
+ case 4:
631
+ message.description = reader.readString();
632
+ break;
633
+ case 5:
634
+ reader.readMessage(message, () => pb_13.Map.deserializeBinary(message.metadata, reader, reader.readString, reader.readString));
635
+ break;
636
+ case 6:
637
+ reader.readMessage(message.sub_suites, () => pb_13.Message.addToRepeatedWrapperField(message, 6, _TestSuite.deserialize(reader), _TestSuite));
638
+ break;
639
+ default:
640
+ reader.skipField();
641
+ }
642
+ }
643
+ return message;
644
+ }
645
+ serializeBinary() {
646
+ return this.serialize();
647
+ }
648
+ static deserializeBinary(bytes) {
649
+ return _TestSuite.deserialize(bytes);
650
+ }
651
+ };
652
+ _one_of_decls2 = new WeakMap();
653
+ let TestSuite = _TestSuite;
654
+ entities2.TestSuite = _TestSuite;
655
+ })(entities = v12.entities || (v12.entities = {}));
656
+ })(v1 = testsystem5.v1 || (testsystem5.v1 = {}));
657
+ })(testsystem2 || (testsystem2 = {}));
626
658
 
627
- // node_modules/@protobuf-ts/runtime-rpc/build/es2015/rpc-interceptor.js
628
- var import_runtime16 = require("@protobuf-ts/runtime");
629
- function stackIntercept(kind, transport, method, options, input) {
630
- var _a, _b, _c, _d;
631
- if (kind == "unary") {
632
- let tail = (mtd, inp, opt) => transport.unary(mtd, inp, opt);
633
- for (const curr of ((_a = options.interceptors) !== null && _a !== void 0 ? _a : []).filter((i) => i.interceptUnary).reverse()) {
634
- const next = tail;
635
- tail = (mtd, inp, opt) => curr.interceptUnary(next, mtd, inp, opt);
636
- }
637
- return tail(method, input, options);
638
- }
639
- if (kind == "serverStreaming") {
640
- let tail = (mtd, inp, opt) => transport.serverStreaming(mtd, inp, opt);
641
- for (const curr of ((_b = options.interceptors) !== null && _b !== void 0 ? _b : []).filter((i) => i.interceptServerStreaming).reverse()) {
642
- const next = tail;
643
- tail = (mtd, inp, opt) => curr.interceptServerStreaming(next, mtd, inp, opt);
644
- }
645
- return tail(method, input, options);
646
- }
647
- if (kind == "clientStreaming") {
648
- let tail = (mtd, opt) => transport.clientStreaming(mtd, opt);
649
- for (const curr of ((_c = options.interceptors) !== null && _c !== void 0 ? _c : []).filter((i) => i.interceptClientStreaming).reverse()) {
650
- const next = tail;
651
- tail = (mtd, opt) => curr.interceptClientStreaming(next, mtd, opt);
652
- }
653
- return tail(method, options);
654
- }
655
- if (kind == "duplex") {
656
- let tail = (mtd, opt) => transport.duplex(mtd, opt);
657
- for (const curr of ((_d = options.interceptors) !== null && _d !== void 0 ? _d : []).filter((i) => i.interceptDuplex).reverse()) {
658
- const next = tail;
659
- tail = (mtd, opt) => curr.interceptDuplex(next, mtd, opt);
660
- }
661
- return tail(method, options);
662
- }
663
- (0, import_runtime16.assertNever)(kind);
664
- }
659
+ // lib/testsystem/v1/events/events.ts
660
+ var pb_14 = __toESM(require("google-protobuf"));
661
+ var testsystem3;
662
+ ((testsystem5) => {
663
+ let v1;
664
+ ((v12) => {
665
+ let events;
666
+ ((events2) => {
667
+ var _one_of_decls, _one_of_decls2, _one_of_decls3, _one_of_decls4;
668
+ const _TestStartEventRequest = class _TestStartEventRequest extends pb_14.Message {
669
+ constructor(data) {
670
+ super();
671
+ __privateAdd(this, _one_of_decls, []);
672
+ pb_14.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __privateGet(this, _one_of_decls));
673
+ if (!Array.isArray(data) && typeof data == "object") {
674
+ if ("test_id" in data && data.test_id != void 0) {
675
+ this.test_id = data.test_id;
676
+ }
677
+ if ("test_name" in data && data.test_name != void 0) {
678
+ this.test_name = data.test_name;
679
+ }
680
+ if ("start_time" in data && data.start_time != void 0) {
681
+ this.start_time = data.start_time;
682
+ }
683
+ if ("metadata" in data && data.metadata != void 0) {
684
+ this.metadata = data.metadata;
685
+ }
686
+ }
687
+ if (!this.metadata)
688
+ this.metadata = /* @__PURE__ */ new Map();
689
+ }
690
+ get test_id() {
691
+ return pb_14.Message.getFieldWithDefault(this, 1, "");
692
+ }
693
+ set test_id(value) {
694
+ pb_14.Message.setField(this, 1, value);
695
+ }
696
+ get test_name() {
697
+ return pb_14.Message.getFieldWithDefault(this, 2, "");
698
+ }
699
+ set test_name(value) {
700
+ pb_14.Message.setField(this, 2, value);
701
+ }
702
+ get start_time() {
703
+ return pb_14.Message.getWrapperField(this, google.protobuf.Timestamp, 3);
704
+ }
705
+ set start_time(value) {
706
+ pb_14.Message.setWrapperField(this, 3, value);
707
+ }
708
+ get has_start_time() {
709
+ return pb_14.Message.getField(this, 3) != null;
710
+ }
711
+ get metadata() {
712
+ return pb_14.Message.getField(this, 4);
713
+ }
714
+ set metadata(value) {
715
+ pb_14.Message.setField(this, 4, value);
716
+ }
717
+ static fromObject(data) {
718
+ const message = new _TestStartEventRequest({});
719
+ if (data.test_id != null) {
720
+ message.test_id = data.test_id;
721
+ }
722
+ if (data.test_name != null) {
723
+ message.test_name = data.test_name;
724
+ }
725
+ if (data.start_time != null) {
726
+ message.start_time = google.protobuf.Timestamp.fromObject(data.start_time);
727
+ }
728
+ if (typeof data.metadata == "object") {
729
+ message.metadata = new Map(Object.entries(data.metadata));
730
+ }
731
+ return message;
732
+ }
733
+ toObject() {
734
+ const data = {};
735
+ if (this.test_id != null) {
736
+ data.test_id = this.test_id;
737
+ }
738
+ if (this.test_name != null) {
739
+ data.test_name = this.test_name;
740
+ }
741
+ if (this.start_time != null) {
742
+ data.start_time = this.start_time.toObject();
743
+ }
744
+ if (this.metadata != null) {
745
+ data.metadata = Object.fromEntries(this.metadata);
746
+ }
747
+ return data;
748
+ }
749
+ serialize(w) {
750
+ const writer = w || new pb_14.BinaryWriter();
751
+ if (this.test_id.length)
752
+ writer.writeString(1, this.test_id);
753
+ if (this.test_name.length)
754
+ writer.writeString(2, this.test_name);
755
+ if (this.has_start_time)
756
+ writer.writeMessage(3, this.start_time, () => this.start_time.serialize(writer));
757
+ for (const [key, value] of this.metadata) {
758
+ writer.writeMessage(4, this.metadata, () => {
759
+ writer.writeString(1, key);
760
+ writer.writeString(2, value);
761
+ });
762
+ }
763
+ if (!w)
764
+ return writer.getResultBuffer();
765
+ }
766
+ static deserialize(bytes) {
767
+ const reader = bytes instanceof pb_14.BinaryReader ? bytes : new pb_14.BinaryReader(bytes), message = new _TestStartEventRequest();
768
+ while (reader.nextField()) {
769
+ if (reader.isEndGroup())
770
+ break;
771
+ switch (reader.getFieldNumber()) {
772
+ case 1:
773
+ message.test_id = reader.readString();
774
+ break;
775
+ case 2:
776
+ message.test_name = reader.readString();
777
+ break;
778
+ case 3:
779
+ reader.readMessage(message.start_time, () => message.start_time = google.protobuf.Timestamp.deserialize(reader));
780
+ break;
781
+ case 4:
782
+ reader.readMessage(message, () => pb_14.Map.deserializeBinary(message.metadata, reader, reader.readString, reader.readString));
783
+ break;
784
+ default:
785
+ reader.skipField();
786
+ }
787
+ }
788
+ return message;
789
+ }
790
+ serializeBinary() {
791
+ return this.serialize();
792
+ }
793
+ static deserializeBinary(bytes) {
794
+ return _TestStartEventRequest.deserialize(bytes);
795
+ }
796
+ };
797
+ _one_of_decls = new WeakMap();
798
+ let TestStartEventRequest = _TestStartEventRequest;
799
+ events2.TestStartEventRequest = _TestStartEventRequest;
800
+ const _TestFinishEventRequest = class _TestFinishEventRequest extends pb_14.Message {
801
+ constructor(data) {
802
+ super();
803
+ __privateAdd(this, _one_of_decls2, []);
804
+ pb_14.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], __privateGet(this, _one_of_decls2));
805
+ if (!Array.isArray(data) && typeof data == "object") {
806
+ if ("test_id" in data && data.test_id != void 0) {
807
+ this.test_id = data.test_id;
808
+ }
809
+ if ("status" in data && data.status != void 0) {
810
+ this.status = data.status;
811
+ }
812
+ if ("end_time" in data && data.end_time != void 0) {
813
+ this.end_time = data.end_time;
814
+ }
815
+ if ("attachments" in data && data.attachments != void 0) {
816
+ this.attachments = data.attachments;
817
+ }
818
+ if ("error_message" in data && data.error_message != void 0) {
819
+ this.error_message = data.error_message;
820
+ }
821
+ if ("stack_trace" in data && data.stack_trace != void 0) {
822
+ this.stack_trace = data.stack_trace;
823
+ }
824
+ }
825
+ }
826
+ get test_id() {
827
+ return pb_14.Message.getFieldWithDefault(this, 1, "");
828
+ }
829
+ set test_id(value) {
830
+ pb_14.Message.setField(this, 1, value);
831
+ }
832
+ get status() {
833
+ return pb_14.Message.getFieldWithDefault(this, 2, testsystem.v1.common.TestStatus.UNKNOWN);
834
+ }
835
+ set status(value) {
836
+ pb_14.Message.setField(this, 2, value);
837
+ }
838
+ get end_time() {
839
+ return pb_14.Message.getWrapperField(this, google.protobuf.Timestamp, 3);
840
+ }
841
+ set end_time(value) {
842
+ pb_14.Message.setWrapperField(this, 3, value);
843
+ }
844
+ get has_end_time() {
845
+ return pb_14.Message.getField(this, 3) != null;
846
+ }
847
+ get attachments() {
848
+ return pb_14.Message.getRepeatedWrapperField(this, testsystem.v1.common.Attachment, 4);
849
+ }
850
+ set attachments(value) {
851
+ pb_14.Message.setRepeatedWrapperField(this, 4, value);
852
+ }
853
+ get error_message() {
854
+ return pb_14.Message.getFieldWithDefault(this, 5, "");
855
+ }
856
+ set error_message(value) {
857
+ pb_14.Message.setField(this, 5, value);
858
+ }
859
+ get stack_trace() {
860
+ return pb_14.Message.getFieldWithDefault(this, 6, "");
861
+ }
862
+ set stack_trace(value) {
863
+ pb_14.Message.setField(this, 6, value);
864
+ }
865
+ static fromObject(data) {
866
+ const message = new _TestFinishEventRequest({});
867
+ if (data.test_id != null) {
868
+ message.test_id = data.test_id;
869
+ }
870
+ if (data.status != null) {
871
+ message.status = data.status;
872
+ }
873
+ if (data.end_time != null) {
874
+ message.end_time = google.protobuf.Timestamp.fromObject(data.end_time);
875
+ }
876
+ if (data.attachments != null) {
877
+ message.attachments = data.attachments.map((item) => testsystem.v1.common.Attachment.fromObject(item));
878
+ }
879
+ if (data.error_message != null) {
880
+ message.error_message = data.error_message;
881
+ }
882
+ if (data.stack_trace != null) {
883
+ message.stack_trace = data.stack_trace;
884
+ }
885
+ return message;
886
+ }
887
+ toObject() {
888
+ const data = {};
889
+ if (this.test_id != null) {
890
+ data.test_id = this.test_id;
891
+ }
892
+ if (this.status != null) {
893
+ data.status = this.status;
894
+ }
895
+ if (this.end_time != null) {
896
+ data.end_time = this.end_time.toObject();
897
+ }
898
+ if (this.attachments != null) {
899
+ data.attachments = this.attachments.map((item) => item.toObject());
900
+ }
901
+ if (this.error_message != null) {
902
+ data.error_message = this.error_message;
903
+ }
904
+ if (this.stack_trace != null) {
905
+ data.stack_trace = this.stack_trace;
906
+ }
907
+ return data;
908
+ }
909
+ serialize(w) {
910
+ const writer = w || new pb_14.BinaryWriter();
911
+ if (this.test_id.length)
912
+ writer.writeString(1, this.test_id);
913
+ if (this.status != testsystem.v1.common.TestStatus.UNKNOWN)
914
+ writer.writeEnum(2, this.status);
915
+ if (this.has_end_time)
916
+ writer.writeMessage(3, this.end_time, () => this.end_time.serialize(writer));
917
+ if (this.attachments.length)
918
+ writer.writeRepeatedMessage(4, this.attachments, (item) => item.serialize(writer));
919
+ if (this.error_message.length)
920
+ writer.writeString(5, this.error_message);
921
+ if (this.stack_trace.length)
922
+ writer.writeString(6, this.stack_trace);
923
+ if (!w)
924
+ return writer.getResultBuffer();
925
+ }
926
+ static deserialize(bytes) {
927
+ const reader = bytes instanceof pb_14.BinaryReader ? bytes : new pb_14.BinaryReader(bytes), message = new _TestFinishEventRequest();
928
+ while (reader.nextField()) {
929
+ if (reader.isEndGroup())
930
+ break;
931
+ switch (reader.getFieldNumber()) {
932
+ case 1:
933
+ message.test_id = reader.readString();
934
+ break;
935
+ case 2:
936
+ message.status = reader.readEnum();
937
+ break;
938
+ case 3:
939
+ reader.readMessage(message.end_time, () => message.end_time = google.protobuf.Timestamp.deserialize(reader));
940
+ break;
941
+ case 4:
942
+ reader.readMessage(message.attachments, () => pb_14.Message.addToRepeatedWrapperField(message, 4, testsystem.v1.common.Attachment.deserialize(reader), testsystem.v1.common.Attachment));
943
+ break;
944
+ case 5:
945
+ message.error_message = reader.readString();
946
+ break;
947
+ case 6:
948
+ message.stack_trace = reader.readString();
949
+ break;
950
+ default:
951
+ reader.skipField();
952
+ }
953
+ }
954
+ return message;
955
+ }
956
+ serializeBinary() {
957
+ return this.serialize();
958
+ }
959
+ static deserializeBinary(bytes) {
960
+ return _TestFinishEventRequest.deserialize(bytes);
961
+ }
962
+ };
963
+ _one_of_decls2 = new WeakMap();
964
+ let TestFinishEventRequest = _TestFinishEventRequest;
965
+ events2.TestFinishEventRequest = _TestFinishEventRequest;
966
+ const _TestStepRequest = class _TestStepRequest extends pb_14.Message {
967
+ constructor(data) {
968
+ super();
969
+ __privateAdd(this, _one_of_decls3, []);
970
+ pb_14.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], __privateGet(this, _one_of_decls3));
971
+ if (!Array.isArray(data) && typeof data == "object") {
972
+ if ("description" in data && data.description != void 0) {
973
+ this.description = data.description;
974
+ }
975
+ if ("timestamp" in data && data.timestamp != void 0) {
976
+ this.timestamp = data.timestamp;
977
+ }
978
+ if ("status" in data && data.status != void 0) {
979
+ this.status = data.status;
980
+ }
981
+ if ("attachments" in data && data.attachments != void 0) {
982
+ this.attachments = data.attachments;
983
+ }
984
+ }
985
+ }
986
+ get description() {
987
+ return pb_14.Message.getFieldWithDefault(this, 1, "");
988
+ }
989
+ set description(value) {
990
+ pb_14.Message.setField(this, 1, value);
991
+ }
992
+ get timestamp() {
993
+ return pb_14.Message.getWrapperField(this, google.protobuf.Timestamp, 2);
994
+ }
995
+ set timestamp(value) {
996
+ pb_14.Message.setWrapperField(this, 2, value);
997
+ }
998
+ get has_timestamp() {
999
+ return pb_14.Message.getField(this, 2) != null;
1000
+ }
1001
+ get status() {
1002
+ return pb_14.Message.getFieldWithDefault(this, 3, testsystem.v1.common.TestStatus.UNKNOWN);
1003
+ }
1004
+ set status(value) {
1005
+ pb_14.Message.setField(this, 3, value);
1006
+ }
1007
+ get attachments() {
1008
+ return pb_14.Message.getRepeatedWrapperField(this, testsystem.v1.common.Attachment, 4);
1009
+ }
1010
+ set attachments(value) {
1011
+ pb_14.Message.setRepeatedWrapperField(this, 4, value);
1012
+ }
1013
+ static fromObject(data) {
1014
+ const message = new _TestStepRequest({});
1015
+ if (data.description != null) {
1016
+ message.description = data.description;
1017
+ }
1018
+ if (data.timestamp != null) {
1019
+ message.timestamp = google.protobuf.Timestamp.fromObject(data.timestamp);
1020
+ }
1021
+ if (data.status != null) {
1022
+ message.status = data.status;
1023
+ }
1024
+ if (data.attachments != null) {
1025
+ message.attachments = data.attachments.map((item) => testsystem.v1.common.Attachment.fromObject(item));
1026
+ }
1027
+ return message;
1028
+ }
1029
+ toObject() {
1030
+ const data = {};
1031
+ if (this.description != null) {
1032
+ data.description = this.description;
1033
+ }
1034
+ if (this.timestamp != null) {
1035
+ data.timestamp = this.timestamp.toObject();
1036
+ }
1037
+ if (this.status != null) {
1038
+ data.status = this.status;
1039
+ }
1040
+ if (this.attachments != null) {
1041
+ data.attachments = this.attachments.map((item) => item.toObject());
1042
+ }
1043
+ return data;
1044
+ }
1045
+ serialize(w) {
1046
+ const writer = w || new pb_14.BinaryWriter();
1047
+ if (this.description.length)
1048
+ writer.writeString(1, this.description);
1049
+ if (this.has_timestamp)
1050
+ writer.writeMessage(2, this.timestamp, () => this.timestamp.serialize(writer));
1051
+ if (this.status != testsystem.v1.common.TestStatus.UNKNOWN)
1052
+ writer.writeEnum(3, this.status);
1053
+ if (this.attachments.length)
1054
+ writer.writeRepeatedMessage(4, this.attachments, (item) => item.serialize(writer));
1055
+ if (!w)
1056
+ return writer.getResultBuffer();
1057
+ }
1058
+ static deserialize(bytes) {
1059
+ const reader = bytes instanceof pb_14.BinaryReader ? bytes : new pb_14.BinaryReader(bytes), message = new _TestStepRequest();
1060
+ while (reader.nextField()) {
1061
+ if (reader.isEndGroup())
1062
+ break;
1063
+ switch (reader.getFieldNumber()) {
1064
+ case 1:
1065
+ message.description = reader.readString();
1066
+ break;
1067
+ case 2:
1068
+ reader.readMessage(message.timestamp, () => message.timestamp = google.protobuf.Timestamp.deserialize(reader));
1069
+ break;
1070
+ case 3:
1071
+ message.status = reader.readEnum();
1072
+ break;
1073
+ case 4:
1074
+ reader.readMessage(message.attachments, () => pb_14.Message.addToRepeatedWrapperField(message, 4, testsystem.v1.common.Attachment.deserialize(reader), testsystem.v1.common.Attachment));
1075
+ break;
1076
+ default:
1077
+ reader.skipField();
1078
+ }
1079
+ }
1080
+ return message;
1081
+ }
1082
+ serializeBinary() {
1083
+ return this.serialize();
1084
+ }
1085
+ static deserializeBinary(bytes) {
1086
+ return _TestStepRequest.deserialize(bytes);
1087
+ }
1088
+ };
1089
+ _one_of_decls3 = new WeakMap();
1090
+ let TestStepRequest = _TestStepRequest;
1091
+ events2.TestStepRequest = _TestStepRequest;
1092
+ const _TestStepEventRequest = class _TestStepEventRequest extends pb_14.Message {
1093
+ constructor(data) {
1094
+ super();
1095
+ __privateAdd(this, _one_of_decls4, []);
1096
+ pb_14.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], __privateGet(this, _one_of_decls4));
1097
+ if (!Array.isArray(data) && typeof data == "object") {
1098
+ if ("test_id" in data && data.test_id != void 0) {
1099
+ this.test_id = data.test_id;
1100
+ }
1101
+ if ("steps" in data && data.steps != void 0) {
1102
+ this.steps = data.steps;
1103
+ }
1104
+ }
1105
+ }
1106
+ get test_id() {
1107
+ return pb_14.Message.getFieldWithDefault(this, 1, "");
1108
+ }
1109
+ set test_id(value) {
1110
+ pb_14.Message.setField(this, 1, value);
1111
+ }
1112
+ get steps() {
1113
+ return pb_14.Message.getRepeatedWrapperField(this, TestStepRequest, 2);
1114
+ }
1115
+ set steps(value) {
1116
+ pb_14.Message.setRepeatedWrapperField(this, 2, value);
1117
+ }
1118
+ static fromObject(data) {
1119
+ const message = new _TestStepEventRequest({});
1120
+ if (data.test_id != null) {
1121
+ message.test_id = data.test_id;
1122
+ }
1123
+ if (data.steps != null) {
1124
+ message.steps = data.steps.map((item) => TestStepRequest.fromObject(item));
1125
+ }
1126
+ return message;
1127
+ }
1128
+ toObject() {
1129
+ const data = {};
1130
+ if (this.test_id != null) {
1131
+ data.test_id = this.test_id;
1132
+ }
1133
+ if (this.steps != null) {
1134
+ data.steps = this.steps.map((item) => item.toObject());
1135
+ }
1136
+ return data;
1137
+ }
1138
+ serialize(w) {
1139
+ const writer = w || new pb_14.BinaryWriter();
1140
+ if (this.test_id.length)
1141
+ writer.writeString(1, this.test_id);
1142
+ if (this.steps.length)
1143
+ writer.writeRepeatedMessage(2, this.steps, (item) => item.serialize(writer));
1144
+ if (!w)
1145
+ return writer.getResultBuffer();
1146
+ }
1147
+ static deserialize(bytes) {
1148
+ const reader = bytes instanceof pb_14.BinaryReader ? bytes : new pb_14.BinaryReader(bytes), message = new _TestStepEventRequest();
1149
+ while (reader.nextField()) {
1150
+ if (reader.isEndGroup())
1151
+ break;
1152
+ switch (reader.getFieldNumber()) {
1153
+ case 1:
1154
+ message.test_id = reader.readString();
1155
+ break;
1156
+ case 2:
1157
+ reader.readMessage(message.steps, () => pb_14.Message.addToRepeatedWrapperField(message, 2, TestStepRequest.deserialize(reader), TestStepRequest));
1158
+ break;
1159
+ default:
1160
+ reader.skipField();
1161
+ }
1162
+ }
1163
+ return message;
1164
+ }
1165
+ serializeBinary() {
1166
+ return this.serialize();
1167
+ }
1168
+ static deserializeBinary(bytes) {
1169
+ return _TestStepEventRequest.deserialize(bytes);
1170
+ }
1171
+ };
1172
+ _one_of_decls4 = new WeakMap();
1173
+ let TestStepEventRequest = _TestStepEventRequest;
1174
+ events2.TestStepEventRequest = _TestStepEventRequest;
1175
+ })(events = v12.events || (v12.events = {}));
1176
+ })(v1 = testsystem5.v1 || (testsystem5.v1 = {}));
1177
+ })(testsystem3 || (testsystem3 = {}));
665
1178
 
666
- // lib/observer.ts
667
- var import_runtime17 = require("@protobuf-ts/runtime");
668
- var import_runtime18 = require("@protobuf-ts/runtime");
669
- var import_runtime19 = require("@protobuf-ts/runtime");
670
- var import_runtime20 = require("@protobuf-ts/runtime");
671
- var Ack$Type = class extends import_runtime20.MessageType {
672
- constructor() {
673
- super("testsystem.observer.Ack", [
674
- {
675
- no: 1,
676
- name: "success",
677
- kind: "scalar",
678
- T: 8
679
- /*ScalarType.BOOL*/
680
- },
681
- {
682
- no: 2,
683
- name: "message",
684
- kind: "scalar",
685
- T: 9
686
- /*ScalarType.STRING*/
1179
+ // lib/testsystem/v1/observer/observer.ts
1180
+ var pb_15 = __toESM(require("google-protobuf"));
1181
+ var grpc_1 = __toESM(require("@grpc/grpc-js"));
1182
+ var testsystem4;
1183
+ ((testsystem5) => {
1184
+ let v1;
1185
+ ((v12) => {
1186
+ let observer;
1187
+ ((observer2) => {
1188
+ var _one_of_decls;
1189
+ const _AckResponse = class _AckResponse extends pb_15.Message {
1190
+ constructor(data) {
1191
+ super();
1192
+ __privateAdd(this, _one_of_decls, [[3]]);
1193
+ pb_15.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], __privateGet(this, _one_of_decls));
1194
+ if (!Array.isArray(data) && typeof data == "object") {
1195
+ if ("success" in data && data.success != void 0) {
1196
+ this.success = data.success;
1197
+ }
1198
+ if ("message" in data && data.message != void 0) {
1199
+ this.message = data.message;
1200
+ }
1201
+ if ("error_code" in data && data.error_code != void 0) {
1202
+ this.error_code = data.error_code;
1203
+ }
1204
+ }
1205
+ }
1206
+ get success() {
1207
+ return pb_15.Message.getFieldWithDefault(this, 1, false);
1208
+ }
1209
+ set success(value) {
1210
+ pb_15.Message.setField(this, 1, value);
1211
+ }
1212
+ get message() {
1213
+ return pb_15.Message.getFieldWithDefault(this, 2, "");
1214
+ }
1215
+ set message(value) {
1216
+ pb_15.Message.setField(this, 2, value);
1217
+ }
1218
+ get error_code() {
1219
+ return pb_15.Message.getFieldWithDefault(this, 3, 0);
1220
+ }
1221
+ set error_code(value) {
1222
+ pb_15.Message.setOneofField(this, 3, __privateGet(this, _one_of_decls)[0], value);
1223
+ }
1224
+ get has_error_code() {
1225
+ return pb_15.Message.getField(this, 3) != null;
1226
+ }
1227
+ get _error_code() {
1228
+ const cases = {
1229
+ 0: "none",
1230
+ 3: "error_code"
1231
+ };
1232
+ return cases[pb_15.Message.computeOneofCase(this, [3])];
1233
+ }
1234
+ static fromObject(data) {
1235
+ const message = new _AckResponse({});
1236
+ if (data.success != null) {
1237
+ message.success = data.success;
1238
+ }
1239
+ if (data.message != null) {
1240
+ message.message = data.message;
1241
+ }
1242
+ if (data.error_code != null) {
1243
+ message.error_code = data.error_code;
1244
+ }
1245
+ return message;
1246
+ }
1247
+ toObject() {
1248
+ const data = {};
1249
+ if (this.success != null) {
1250
+ data.success = this.success;
1251
+ }
1252
+ if (this.message != null) {
1253
+ data.message = this.message;
1254
+ }
1255
+ if (this.error_code != null) {
1256
+ data.error_code = this.error_code;
1257
+ }
1258
+ return data;
1259
+ }
1260
+ serialize(w) {
1261
+ const writer = w || new pb_15.BinaryWriter();
1262
+ if (this.success != false)
1263
+ writer.writeBool(1, this.success);
1264
+ if (this.message.length)
1265
+ writer.writeString(2, this.message);
1266
+ if (this.has_error_code)
1267
+ writer.writeInt32(3, this.error_code);
1268
+ if (!w)
1269
+ return writer.getResultBuffer();
1270
+ }
1271
+ static deserialize(bytes) {
1272
+ const reader = bytes instanceof pb_15.BinaryReader ? bytes : new pb_15.BinaryReader(bytes), message = new _AckResponse();
1273
+ while (reader.nextField()) {
1274
+ if (reader.isEndGroup())
1275
+ break;
1276
+ switch (reader.getFieldNumber()) {
1277
+ case 1:
1278
+ message.success = reader.readBool();
1279
+ break;
1280
+ case 2:
1281
+ message.message = reader.readString();
1282
+ break;
1283
+ case 3:
1284
+ message.error_code = reader.readInt32();
1285
+ break;
1286
+ default:
1287
+ reader.skipField();
1288
+ }
1289
+ }
1290
+ return message;
1291
+ }
1292
+ serializeBinary() {
1293
+ return this.serialize();
1294
+ }
1295
+ static deserializeBinary(bytes) {
1296
+ return _AckResponse.deserialize(bytes);
1297
+ }
1298
+ };
1299
+ _one_of_decls = new WeakMap();
1300
+ let AckResponse = _AckResponse;
1301
+ observer2.AckResponse = _AckResponse;
1302
+ class UnimplementedTestEventCollectorService {
687
1303
  }
688
- ]);
689
- }
690
- create(value) {
691
- const message = globalThis.Object.create(this.messagePrototype);
692
- message.success = false;
693
- message.message = "";
694
- if (value !== void 0)
695
- (0, import_runtime19.reflectionMergePartial)(this, message, value);
696
- return message;
697
- }
698
- internalBinaryRead(reader, length, options, target) {
699
- let message = target ?? this.create(), end = reader.pos + length;
700
- while (reader.pos < end) {
701
- let [fieldNo, wireType] = reader.tag();
702
- switch (fieldNo) {
703
- case /* bool success */
704
- 1:
705
- message.success = reader.bool();
706
- break;
707
- case /* string message */
708
- 2:
709
- message.message = reader.string();
710
- break;
711
- default:
712
- let u = options.readUnknownField;
713
- if (u === "throw")
714
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
715
- let d = reader.skip(wireType);
716
- if (u !== false)
717
- (u === true ? import_runtime18.UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1304
+ UnimplementedTestEventCollectorService.definition = {
1305
+ ReportTestStart: {
1306
+ path: "/testsystem.v1.observer.TestEventCollector/ReportTestStart",
1307
+ requestStream: false,
1308
+ responseStream: false,
1309
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1310
+ requestDeserialize: (bytes) => testsystem3.v1.events.TestStartEventRequest.deserialize(new Uint8Array(bytes)),
1311
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1312
+ responseDeserialize: (bytes) => AckResponse.deserialize(new Uint8Array(bytes))
1313
+ },
1314
+ ReportTestFinish: {
1315
+ path: "/testsystem.v1.observer.TestEventCollector/ReportTestFinish",
1316
+ requestStream: false,
1317
+ responseStream: false,
1318
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1319
+ requestDeserialize: (bytes) => testsystem3.v1.events.TestFinishEventRequest.deserialize(new Uint8Array(bytes)),
1320
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1321
+ responseDeserialize: (bytes) => AckResponse.deserialize(new Uint8Array(bytes))
1322
+ },
1323
+ ReportTestStep: {
1324
+ path: "/testsystem.v1.observer.TestEventCollector/ReportTestStep",
1325
+ requestStream: false,
1326
+ responseStream: false,
1327
+ requestSerialize: (message) => Buffer.from(message.serialize()),
1328
+ requestDeserialize: (bytes) => testsystem3.v1.events.TestStepEventRequest.deserialize(new Uint8Array(bytes)),
1329
+ responseSerialize: (message) => Buffer.from(message.serialize()),
1330
+ responseDeserialize: (bytes) => AckResponse.deserialize(new Uint8Array(bytes))
1331
+ }
1332
+ };
1333
+ observer2.UnimplementedTestEventCollectorService = UnimplementedTestEventCollectorService;
1334
+ class TestEventCollectorClient extends grpc_1.makeGenericClientConstructor(UnimplementedTestEventCollectorService.definition, "TestEventCollector", {}) {
1335
+ constructor(address, credentials, options) {
1336
+ super(address, credentials, options);
1337
+ this.ReportTestStart = (message, metadata, options, callback) => {
1338
+ return super.ReportTestStart(message, metadata, options, callback);
1339
+ };
1340
+ this.ReportTestFinish = (message, metadata, options, callback) => {
1341
+ return super.ReportTestFinish(message, metadata, options, callback);
1342
+ };
1343
+ this.ReportTestStep = (message, metadata, options, callback) => {
1344
+ return super.ReportTestStep(message, metadata, options, callback);
1345
+ };
1346
+ }
718
1347
  }
719
- }
720
- return message;
721
- }
722
- internalBinaryWrite(message, writer, options) {
723
- if (message.success !== false)
724
- writer.tag(1, import_runtime17.WireType.Varint).bool(message.success);
725
- if (message.message !== "")
726
- writer.tag(2, import_runtime17.WireType.LengthDelimited).string(message.message);
727
- let u = options.writeUnknownFields;
728
- if (u !== false)
729
- (u == true ? import_runtime18.UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
730
- return writer;
731
- }
732
- };
733
- var Ack = new Ack$Type();
734
- var TestEventCollector = new ServiceType("testsystem.observer.TestEventCollector", [
735
- { name: "ReportTestStart", options: {}, I: TestStartEvent, O: Ack },
736
- { name: "ReportTestFinish", options: {}, I: TestFinishEvent, O: Ack },
737
- { name: "ReportTestStep", options: {}, I: TestStepEvent, O: Ack }
738
- ]);
739
-
740
- // lib/observer.client.ts
741
- var TestEventCollectorClient = class {
742
- constructor(_transport) {
743
- this._transport = _transport;
744
- this.typeName = TestEventCollector.typeName;
745
- this.methods = TestEventCollector.methods;
746
- this.options = TestEventCollector.options;
747
- }
748
- /**
749
- * @generated from protobuf rpc: ReportTestStart
750
- */
751
- reportTestStart(input, options) {
752
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
753
- return stackIntercept("unary", this._transport, method, opt, input);
754
- }
755
- /**
756
- * @generated from protobuf rpc: ReportTestFinish
757
- */
758
- reportTestFinish(input, options) {
759
- const method = this.methods[1], opt = this._transport.mergeOptions(options);
760
- return stackIntercept("unary", this._transport, method, opt, input);
761
- }
762
- /**
763
- * @generated from protobuf rpc: ReportTestStep
764
- */
765
- reportTestStep(input, options) {
766
- const method = this.methods[2], opt = this._transport.mergeOptions(options);
767
- return stackIntercept("unary", this._transport, method, opt, input);
768
- }
769
- };
1348
+ observer2.TestEventCollectorClient = TestEventCollectorClient;
1349
+ })(observer = v12.observer || (v12.observer = {}));
1350
+ })(v1 = testsystem5.v1 || (testsystem5.v1 = {}));
1351
+ })(testsystem4 || (testsystem4 = {}));
770
1352
  // Annotate the CommonJS export names for ESM import in node:
771
1353
  0 && (module.exports = {
772
- Ack,
773
- Attachment,
774
- TestEventCollector,
775
- TestEventCollectorClient,
776
- TestFinishEvent,
777
- TestStartEvent,
778
- TestStatus,
779
- TestStep,
780
- TestStepEvent
1354
+ google_protobuf,
1355
+ testsystem_v1_common,
1356
+ testsystem_v1_entities,
1357
+ testsystem_v1_events,
1358
+ testsystem_v1_observer
781
1359
  });
782
1360
  //# sourceMappingURL=index.js.map