@stanterprise/protobuf 0.0.1 → 0.0.2

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/package.json CHANGED
@@ -1,20 +1,25 @@
1
1
  {
2
2
  "name": "@stanterprise/protobuf",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Generated Protobuf code",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
5
8
  "files": [
6
- "gen/ts/**/*"
9
+ "dist"
7
10
  ],
8
11
  "scripts": {
12
+ "build": "tsup",
13
+ "dev": "tsup - watch",
9
14
  "prepublishOnly": "npm run generate",
10
15
  "prepare": "npm run generate",
11
- "generate": "npx protoc --ts_out gen/ts --ts_opt long_type_string --ts_opt optimize_code_size --proto_path testsystem testsystem/*.proto"
16
+ "generate": "npx protoc --ts_out ./lib --ts_opt long_type_string --ts_opt optimize_code_size --proto_path ../testsystem ../testsystem/*.proto"
12
17
  },
13
18
  "repository": {
14
19
  "type": "git",
15
20
  "url": "git+https://github.com/stanterprise/protobuf.git"
16
21
  },
17
- "author": "Your Name",
22
+ "author": "Stanislav Fedii",
18
23
  "license": "MIT",
19
24
  "dependencies": {
20
25
  "@grpc/grpc-js": "^1.0.0",
@@ -26,6 +31,7 @@
26
31
  "grpc-tools": "^1.13.0",
27
32
  "protoc-gen-ts": "^0.8.7",
28
33
  "ts-proto": "^2.7.2",
29
- "ts-protoc-gen": "^0.15.0"
34
+ "ts-protoc-gen": "^0.15.0",
35
+ "tsup": "^8.5.0"
30
36
  }
31
37
  }
package/gen/ts/common.ts DELETED
@@ -1,121 +0,0 @@
1
- // @generated by protobuf-ts 2.11.0 with parameter long_type_string,optimize_code_size
2
- // @generated from protobuf file "common.proto" (package "testsystem.common", syntax proto3)
3
- // tslint:disable
4
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
- import { WireType } from "@protobuf-ts/runtime";
7
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
- import type { IBinaryReader } from "@protobuf-ts/runtime";
9
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
- import type { PartialMessage } from "@protobuf-ts/runtime";
11
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
- import { MessageType } from "@protobuf-ts/runtime";
13
- /**
14
- * Message for attachments
15
- *
16
- * @generated from protobuf message testsystem.common.Attachment
17
- */
18
- export interface Attachment {
19
- /**
20
- * @generated from protobuf field: string name = 1
21
- */
22
- name: string;
23
- /**
24
- * @generated from protobuf field: string mime_type = 2
25
- */
26
- mimeType: string;
27
- /**
28
- * @generated from protobuf field: bytes content = 3
29
- */
30
- content: Uint8Array; // Binary content of the attachment
31
- }
32
- /**
33
- * Enum for test result statuses
34
- *
35
- * @generated from protobuf enum testsystem.common.TestStatus
36
- */
37
- export enum TestStatus {
38
- /**
39
- * @generated from protobuf enum value: UNKNOWN = 0;
40
- */
41
- UNKNOWN = 0,
42
- /**
43
- * @generated from protobuf enum value: PASSED = 1;
44
- */
45
- PASSED = 1,
46
- /**
47
- * @generated from protobuf enum value: FAILED = 2;
48
- */
49
- FAILED = 2,
50
- /**
51
- * @generated from protobuf enum value: SKIPPED = 3;
52
- */
53
- SKIPPED = 3,
54
- /**
55
- * @generated from protobuf enum value: BROKEN = 4;
56
- */
57
- BROKEN = 4
58
- }
59
- // @generated message type with reflection information, may provide speed optimized methods
60
- class Attachment$Type extends MessageType<Attachment> {
61
- constructor() {
62
- super("testsystem.common.Attachment", [
63
- { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
64
- { no: 2, name: "mime_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
65
- { no: 3, name: "content", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
66
- ]);
67
- }
68
- create(value?: PartialMessage<Attachment>): Attachment {
69
- const message = globalThis.Object.create((this.messagePrototype!));
70
- message.name = "";
71
- message.mimeType = "";
72
- message.content = new Uint8Array(0);
73
- if (value !== undefined)
74
- reflectionMergePartial<Attachment>(this, message, value);
75
- return message;
76
- }
77
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Attachment): Attachment {
78
- let message = target ?? this.create(), end = reader.pos + length;
79
- while (reader.pos < end) {
80
- let [fieldNo, wireType] = reader.tag();
81
- switch (fieldNo) {
82
- case /* string name */ 1:
83
- message.name = reader.string();
84
- break;
85
- case /* string mime_type */ 2:
86
- message.mimeType = reader.string();
87
- break;
88
- case /* bytes content */ 3:
89
- message.content = reader.bytes();
90
- break;
91
- default:
92
- let u = options.readUnknownField;
93
- if (u === "throw")
94
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
95
- let d = reader.skip(wireType);
96
- if (u !== false)
97
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
98
- }
99
- }
100
- return message;
101
- }
102
- internalBinaryWrite(message: Attachment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
103
- /* string name = 1; */
104
- if (message.name !== "")
105
- writer.tag(1, WireType.LengthDelimited).string(message.name);
106
- /* string mime_type = 2; */
107
- if (message.mimeType !== "")
108
- writer.tag(2, WireType.LengthDelimited).string(message.mimeType);
109
- /* bytes content = 3; */
110
- if (message.content.length)
111
- writer.tag(3, WireType.LengthDelimited).bytes(message.content);
112
- let u = options.writeUnknownFields;
113
- if (u !== false)
114
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
115
- return writer;
116
- }
117
- }
118
- /**
119
- * @generated MessageType for protobuf message testsystem.common.Attachment
120
- */
121
- export const Attachment = new Attachment$Type();
package/gen/ts/events.ts DELETED
@@ -1,398 +0,0 @@
1
- // @generated by protobuf-ts 2.11.0 with parameter long_type_string,optimize_code_size
2
- // @generated from protobuf file "events.proto" (package "testsystem.events", syntax proto3)
3
- // tslint:disable
4
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
6
- import { WireType } from "@protobuf-ts/runtime";
7
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
8
- import type { IBinaryReader } from "@protobuf-ts/runtime";
9
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
- import type { PartialMessage } from "@protobuf-ts/runtime";
11
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
- import { MessageType } from "@protobuf-ts/runtime";
13
- import { Attachment } from "./common";
14
- import { TestStatus } from "./common";
15
- import { Timestamp } from "./google/protobuf/timestamp";
16
- /**
17
- * @generated from protobuf message testsystem.events.TestStartEvent
18
- */
19
- export interface TestStartEvent {
20
- /**
21
- * @generated from protobuf field: string test_id = 1
22
- */
23
- testId: string;
24
- /**
25
- * @generated from protobuf field: string test_name = 2
26
- */
27
- testName: string;
28
- /**
29
- * @generated from protobuf field: google.protobuf.Timestamp start_time = 3
30
- */
31
- startTime?: Timestamp;
32
- /**
33
- * @generated from protobuf field: map<string, string> metadata = 4
34
- */
35
- metadata: {
36
- [key: string]: string;
37
- }; // Additional metadata
38
- }
39
- /**
40
- * @generated from protobuf message testsystem.events.TestFinishEvent
41
- */
42
- export interface TestFinishEvent {
43
- /**
44
- * @generated from protobuf field: string test_id = 1
45
- */
46
- testId: string;
47
- /**
48
- * @generated from protobuf field: testsystem.common.TestStatus status = 2
49
- */
50
- status: TestStatus;
51
- /**
52
- * @generated from protobuf field: google.protobuf.Timestamp end_time = 3
53
- */
54
- endTime?: Timestamp;
55
- /**
56
- * @generated from protobuf field: repeated testsystem.common.Attachment attachments = 4
57
- */
58
- attachments: Attachment[];
59
- /**
60
- * @generated from protobuf field: string error_message = 5
61
- */
62
- errorMessage: string; // If any
63
- /**
64
- * @generated from protobuf field: string stack_trace = 6
65
- */
66
- stackTrace: string; // If any
67
- }
68
- /**
69
- * @generated from protobuf message testsystem.events.TestStep
70
- */
71
- export interface TestStep {
72
- /**
73
- * @generated from protobuf field: string description = 1
74
- */
75
- description: string;
76
- /**
77
- * @generated from protobuf field: google.protobuf.Timestamp timestamp = 2
78
- */
79
- timestamp?: Timestamp;
80
- /**
81
- * @generated from protobuf field: testsystem.common.TestStatus status = 3
82
- */
83
- status: TestStatus;
84
- /**
85
- * @generated from protobuf field: repeated testsystem.common.Attachment attachments = 4
86
- */
87
- attachments: Attachment[];
88
- }
89
- /**
90
- * @generated from protobuf message testsystem.events.TestStepEvent
91
- */
92
- export interface TestStepEvent {
93
- /**
94
- * @generated from protobuf field: string test_id = 1
95
- */
96
- testId: string;
97
- /**
98
- * @generated from protobuf field: repeated testsystem.events.TestStep steps = 2
99
- */
100
- steps: TestStep[];
101
- }
102
- // @generated message type with reflection information, may provide speed optimized methods
103
- class TestStartEvent$Type extends MessageType<TestStartEvent> {
104
- constructor() {
105
- super("testsystem.events.TestStartEvent", [
106
- { no: 1, name: "test_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
107
- { no: 2, name: "test_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
108
- { no: 3, name: "start_time", kind: "message", T: () => Timestamp },
109
- { no: 4, name: "metadata", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
110
- ]);
111
- }
112
- create(value?: PartialMessage<TestStartEvent>): TestStartEvent {
113
- const message = globalThis.Object.create((this.messagePrototype!));
114
- message.testId = "";
115
- message.testName = "";
116
- message.metadata = {};
117
- if (value !== undefined)
118
- reflectionMergePartial<TestStartEvent>(this, message, value);
119
- return message;
120
- }
121
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStartEvent): TestStartEvent {
122
- let message = target ?? this.create(), end = reader.pos + length;
123
- while (reader.pos < end) {
124
- let [fieldNo, wireType] = reader.tag();
125
- switch (fieldNo) {
126
- case /* string test_id */ 1:
127
- message.testId = reader.string();
128
- break;
129
- case /* string test_name */ 2:
130
- message.testName = reader.string();
131
- break;
132
- case /* google.protobuf.Timestamp start_time */ 3:
133
- message.startTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.startTime);
134
- break;
135
- case /* map<string, string> metadata */ 4:
136
- this.binaryReadMap4(message.metadata, reader, options);
137
- break;
138
- default:
139
- let u = options.readUnknownField;
140
- if (u === "throw")
141
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
142
- let d = reader.skip(wireType);
143
- if (u !== false)
144
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
145
- }
146
- }
147
- return message;
148
- }
149
- private binaryReadMap4(map: TestStartEvent["metadata"], reader: IBinaryReader, options: BinaryReadOptions): void {
150
- let len = reader.uint32(), end = reader.pos + len, key: keyof TestStartEvent["metadata"] | undefined, val: TestStartEvent["metadata"][any] | undefined;
151
- while (reader.pos < end) {
152
- let [fieldNo, wireType] = reader.tag();
153
- switch (fieldNo) {
154
- case 1:
155
- key = reader.string();
156
- break;
157
- case 2:
158
- val = reader.string();
159
- break;
160
- default: throw new globalThis.Error("unknown map entry field for testsystem.events.TestStartEvent.metadata");
161
- }
162
- }
163
- map[key ?? ""] = val ?? "";
164
- }
165
- internalBinaryWrite(message: TestStartEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
166
- /* string test_id = 1; */
167
- if (message.testId !== "")
168
- writer.tag(1, WireType.LengthDelimited).string(message.testId);
169
- /* string test_name = 2; */
170
- if (message.testName !== "")
171
- writer.tag(2, WireType.LengthDelimited).string(message.testName);
172
- /* google.protobuf.Timestamp start_time = 3; */
173
- if (message.startTime)
174
- Timestamp.internalBinaryWrite(message.startTime, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
175
- /* map<string, string> metadata = 4; */
176
- for (let k of globalThis.Object.keys(message.metadata))
177
- writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.metadata[k]).join();
178
- let u = options.writeUnknownFields;
179
- if (u !== false)
180
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
181
- return writer;
182
- }
183
- }
184
- /**
185
- * @generated MessageType for protobuf message testsystem.events.TestStartEvent
186
- */
187
- export const TestStartEvent = new TestStartEvent$Type();
188
- // @generated message type with reflection information, may provide speed optimized methods
189
- class TestFinishEvent$Type extends MessageType<TestFinishEvent> {
190
- constructor() {
191
- super("testsystem.events.TestFinishEvent", [
192
- { no: 1, name: "test_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
193
- { no: 2, name: "status", kind: "enum", T: () => ["testsystem.common.TestStatus", TestStatus] },
194
- { no: 3, name: "end_time", kind: "message", T: () => Timestamp },
195
- { no: 4, name: "attachments", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attachment },
196
- { no: 5, name: "error_message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
197
- { no: 6, name: "stack_trace", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
198
- ]);
199
- }
200
- create(value?: PartialMessage<TestFinishEvent>): TestFinishEvent {
201
- const message = globalThis.Object.create((this.messagePrototype!));
202
- message.testId = "";
203
- message.status = 0;
204
- message.attachments = [];
205
- message.errorMessage = "";
206
- message.stackTrace = "";
207
- if (value !== undefined)
208
- reflectionMergePartial<TestFinishEvent>(this, message, value);
209
- return message;
210
- }
211
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestFinishEvent): TestFinishEvent {
212
- let message = target ?? this.create(), end = reader.pos + length;
213
- while (reader.pos < end) {
214
- let [fieldNo, wireType] = reader.tag();
215
- switch (fieldNo) {
216
- case /* string test_id */ 1:
217
- message.testId = reader.string();
218
- break;
219
- case /* testsystem.common.TestStatus status */ 2:
220
- message.status = reader.int32();
221
- break;
222
- case /* google.protobuf.Timestamp end_time */ 3:
223
- message.endTime = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.endTime);
224
- break;
225
- case /* repeated testsystem.common.Attachment attachments */ 4:
226
- message.attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
227
- break;
228
- case /* string error_message */ 5:
229
- message.errorMessage = reader.string();
230
- break;
231
- case /* string stack_trace */ 6:
232
- message.stackTrace = reader.string();
233
- break;
234
- default:
235
- let u = options.readUnknownField;
236
- if (u === "throw")
237
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
238
- let d = reader.skip(wireType);
239
- if (u !== false)
240
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
241
- }
242
- }
243
- return message;
244
- }
245
- internalBinaryWrite(message: TestFinishEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
246
- /* string test_id = 1; */
247
- if (message.testId !== "")
248
- writer.tag(1, WireType.LengthDelimited).string(message.testId);
249
- /* testsystem.common.TestStatus status = 2; */
250
- if (message.status !== 0)
251
- writer.tag(2, WireType.Varint).int32(message.status);
252
- /* google.protobuf.Timestamp end_time = 3; */
253
- if (message.endTime)
254
- Timestamp.internalBinaryWrite(message.endTime, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
255
- /* repeated testsystem.common.Attachment attachments = 4; */
256
- for (let i = 0; i < message.attachments.length; i++)
257
- Attachment.internalBinaryWrite(message.attachments[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
258
- /* string error_message = 5; */
259
- if (message.errorMessage !== "")
260
- writer.tag(5, WireType.LengthDelimited).string(message.errorMessage);
261
- /* string stack_trace = 6; */
262
- if (message.stackTrace !== "")
263
- writer.tag(6, WireType.LengthDelimited).string(message.stackTrace);
264
- let u = options.writeUnknownFields;
265
- if (u !== false)
266
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
267
- return writer;
268
- }
269
- }
270
- /**
271
- * @generated MessageType for protobuf message testsystem.events.TestFinishEvent
272
- */
273
- export const TestFinishEvent = new TestFinishEvent$Type();
274
- // @generated message type with reflection information, may provide speed optimized methods
275
- class TestStep$Type extends MessageType<TestStep> {
276
- constructor() {
277
- super("testsystem.events.TestStep", [
278
- { no: 1, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
279
- { no: 2, name: "timestamp", kind: "message", T: () => Timestamp },
280
- { no: 3, name: "status", kind: "enum", T: () => ["testsystem.common.TestStatus", TestStatus] },
281
- { no: 4, name: "attachments", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attachment }
282
- ]);
283
- }
284
- create(value?: PartialMessage<TestStep>): TestStep {
285
- const message = globalThis.Object.create((this.messagePrototype!));
286
- message.description = "";
287
- message.status = 0;
288
- message.attachments = [];
289
- if (value !== undefined)
290
- reflectionMergePartial<TestStep>(this, message, value);
291
- return message;
292
- }
293
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStep): TestStep {
294
- let message = target ?? this.create(), end = reader.pos + length;
295
- while (reader.pos < end) {
296
- let [fieldNo, wireType] = reader.tag();
297
- switch (fieldNo) {
298
- case /* string description */ 1:
299
- message.description = reader.string();
300
- break;
301
- case /* google.protobuf.Timestamp timestamp */ 2:
302
- message.timestamp = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.timestamp);
303
- break;
304
- case /* testsystem.common.TestStatus status */ 3:
305
- message.status = reader.int32();
306
- break;
307
- case /* repeated testsystem.common.Attachment attachments */ 4:
308
- message.attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
309
- break;
310
- default:
311
- let u = options.readUnknownField;
312
- if (u === "throw")
313
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
314
- let d = reader.skip(wireType);
315
- if (u !== false)
316
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
317
- }
318
- }
319
- return message;
320
- }
321
- internalBinaryWrite(message: TestStep, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
322
- /* string description = 1; */
323
- if (message.description !== "")
324
- writer.tag(1, WireType.LengthDelimited).string(message.description);
325
- /* google.protobuf.Timestamp timestamp = 2; */
326
- if (message.timestamp)
327
- Timestamp.internalBinaryWrite(message.timestamp, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
328
- /* testsystem.common.TestStatus status = 3; */
329
- if (message.status !== 0)
330
- writer.tag(3, WireType.Varint).int32(message.status);
331
- /* repeated testsystem.common.Attachment attachments = 4; */
332
- for (let i = 0; i < message.attachments.length; i++)
333
- Attachment.internalBinaryWrite(message.attachments[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
334
- let u = options.writeUnknownFields;
335
- if (u !== false)
336
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
337
- return writer;
338
- }
339
- }
340
- /**
341
- * @generated MessageType for protobuf message testsystem.events.TestStep
342
- */
343
- export const TestStep = new TestStep$Type();
344
- // @generated message type with reflection information, may provide speed optimized methods
345
- class TestStepEvent$Type extends MessageType<TestStepEvent> {
346
- constructor() {
347
- super("testsystem.events.TestStepEvent", [
348
- { no: 1, name: "test_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
349
- { no: 2, name: "steps", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TestStep }
350
- ]);
351
- }
352
- create(value?: PartialMessage<TestStepEvent>): TestStepEvent {
353
- const message = globalThis.Object.create((this.messagePrototype!));
354
- message.testId = "";
355
- message.steps = [];
356
- if (value !== undefined)
357
- reflectionMergePartial<TestStepEvent>(this, message, value);
358
- return message;
359
- }
360
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TestStepEvent): TestStepEvent {
361
- let message = target ?? this.create(), end = reader.pos + length;
362
- while (reader.pos < end) {
363
- let [fieldNo, wireType] = reader.tag();
364
- switch (fieldNo) {
365
- case /* string test_id */ 1:
366
- message.testId = reader.string();
367
- break;
368
- case /* repeated testsystem.events.TestStep steps */ 2:
369
- message.steps.push(TestStep.internalBinaryRead(reader, reader.uint32(), options));
370
- break;
371
- default:
372
- let u = options.readUnknownField;
373
- if (u === "throw")
374
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
375
- let d = reader.skip(wireType);
376
- if (u !== false)
377
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
378
- }
379
- }
380
- return message;
381
- }
382
- internalBinaryWrite(message: TestStepEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
383
- /* string test_id = 1; */
384
- if (message.testId !== "")
385
- writer.tag(1, WireType.LengthDelimited).string(message.testId);
386
- /* repeated testsystem.events.TestStep steps = 2; */
387
- for (let i = 0; i < message.steps.length; i++)
388
- TestStep.internalBinaryWrite(message.steps[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
389
- let u = options.writeUnknownFields;
390
- if (u !== false)
391
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
392
- return writer;
393
- }
394
- }
395
- /**
396
- * @generated MessageType for protobuf message testsystem.events.TestStepEvent
397
- */
398
- export const TestStepEvent = new TestStepEvent$Type();