@coralogix/rum-cli 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +14 -7
  2. package/api/rum-api.ts +2 -1
  3. package/cli/commands/update-source-maps-command.ts +3 -2
  4. package/dist/api/rum-api.js +3 -2
  5. package/dist/cli/commands/update-source-maps-command.js +4 -3
  6. package/dist/models/commands.model.d.ts +1 -0
  7. package/dist/models/commands.model.js +1 -1
  8. package/dist/proto-models/com/coralogix/rum/v2/analytics.d.ts +131 -0
  9. package/dist/proto-models/com/coralogix/rum/v2/analytics.js +771 -0
  10. package/dist/proto-models/com/coralogix/rum/v2/audit_log.d.ts +1 -1
  11. package/dist/proto-models/com/coralogix/rum/v2/audit_log.js +3 -5
  12. package/dist/proto-models/com/coralogix/rum/v2/chunk.d.ts +1 -1
  13. package/dist/proto-models/com/coralogix/rum/v2/chunk.js +49 -54
  14. package/dist/proto-models/com/coralogix/rum/v2/file.d.ts +1 -1
  15. package/dist/proto-models/com/coralogix/rum/v2/file.js +34 -24
  16. package/dist/proto-models/com/coralogix/rum/v2/rum_service.d.ts +64 -1
  17. package/dist/proto-models/com/coralogix/rum/v2/rum_service.js +387 -92
  18. package/dist/proto-models/com/coralogix/rum/v2/rum_session_recording_service.d.ts +1 -1
  19. package/dist/proto-models/com/coralogix/rum/v2/rum_session_recording_service.js +32 -24
  20. package/dist/proto-models/com/coralogix/rum/v2/rum_source_map_service.d.ts +4 -1
  21. package/dist/proto-models/com/coralogix/rum/v2/rum_source_map_service.js +72 -59
  22. package/dist/proto-models/com/coralogix/rum/v2/source_code_file_mapping.d.ts +1 -1
  23. package/dist/proto-models/com/coralogix/rum/v2/source_code_file_mapping.js +24 -47
  24. package/dist/proto-models/com/coralogix/rum/v2/source_map_release.d.ts +1 -1
  25. package/dist/proto-models/com/coralogix/rum/v2/source_map_release.js +38 -43
  26. package/dist/proto-models/com/coralogix/rum/v2/template.d.ts +1 -1
  27. package/dist/proto-models/com/coralogix/rum/v2/template.js +53 -66
  28. package/dist/proto-models/google/protobuf/descriptor.d.ts +1 -1
  29. package/dist/proto-models/google/protobuf/descriptor.js +427 -537
  30. package/dist/services/source-maps.service.d.ts +1 -1
  31. package/dist/services/source-maps.service.js +3 -2
  32. package/models/commands.model.ts +1 -0
  33. package/package.json +1 -1
  34. package/proto-models/com/coralogix/rum/v2/analytics.ts +910 -0
  35. package/proto-models/com/coralogix/rum/v2/audit_log.ts +4 -6
  36. package/proto-models/com/coralogix/rum/v2/chunk.ts +56 -55
  37. package/proto-models/com/coralogix/rum/v2/file.ts +39 -25
  38. package/proto-models/com/coralogix/rum/v2/rum_service.ts +439 -90
  39. package/proto-models/com/coralogix/rum/v2/rum_session_recording_service.ts +40 -25
  40. package/proto-models/com/coralogix/rum/v2/rum_source_map_service.ts +81 -58
  41. package/proto-models/com/coralogix/rum/v2/source_code_file_mapping.ts +27 -48
  42. package/proto-models/com/coralogix/rum/v2/source_map_release.ts +44 -44
  43. package/proto-models/com/coralogix/rum/v2/template.ts +60 -67
  44. package/proto-models/google/protobuf/descriptor.ts +464 -551
  45. package/protofetch.lock +2 -2
  46. package/protofetch.toml +1 -1
  47. package/protos/com/coralogix/rum/v2/analytics.proto +57 -0
  48. package/protos/com/coralogix/rum/v2/rum_service.proto +21 -0
  49. package/protos/com/coralogix/rum/v2/rum_source_map_service.proto +2 -0
  50. package/protoset.bin +0 -0
  51. package/services/source-maps.service.ts +2 -0
@@ -59,25 +59,22 @@ export const GetSessionRecordingRequest = {
59
59
 
60
60
  fromJSON(object: any): GetSessionRecordingRequest {
61
61
  return {
62
- sessionId: isSet(object.sessionId) ? globalThis.String(object.sessionId) : "",
63
- application: isSet(object.application) ? globalThis.String(object.application) : "",
62
+ sessionId: isSet(object.sessionId) ? String(object.sessionId) : "",
63
+ application: isSet(object.application) ? String(object.application) : "",
64
64
  };
65
65
  },
66
66
 
67
67
  toJSON(message: GetSessionRecordingRequest): unknown {
68
68
  const obj: any = {};
69
- if (message.sessionId !== "") {
70
- obj.sessionId = message.sessionId;
71
- }
72
- if (message.application !== "") {
73
- obj.application = message.application;
74
- }
69
+ message.sessionId !== undefined && (obj.sessionId = message.sessionId);
70
+ message.application !== undefined && (obj.application = message.application);
75
71
  return obj;
76
72
  },
77
73
 
78
74
  create(base?: DeepPartial<GetSessionRecordingRequest>): GetSessionRecordingRequest {
79
75
  return GetSessionRecordingRequest.fromPartial(base ?? {});
80
76
  },
77
+
81
78
  fromPartial(object: DeepPartial<GetSessionRecordingRequest>): GetSessionRecordingRequest {
82
79
  const message = createBaseGetSessionRecordingRequest();
83
80
  message.sessionId = object.sessionId ?? "";
@@ -87,7 +84,7 @@ export const GetSessionRecordingRequest = {
87
84
  };
88
85
 
89
86
  function createBaseGetSessionRecordingResponse(): GetSessionRecordingResponse {
90
- return { sessionRecordings: new Uint8Array(0) };
87
+ return { sessionRecordings: new Uint8Array() };
91
88
  }
92
89
 
93
90
  export const GetSessionRecordingResponse = {
@@ -123,26 +120,26 @@ export const GetSessionRecordingResponse = {
123
120
 
124
121
  fromJSON(object: any): GetSessionRecordingResponse {
125
122
  return {
126
- sessionRecordings: isSet(object.sessionRecordings)
127
- ? bytesFromBase64(object.sessionRecordings)
128
- : new Uint8Array(0),
123
+ sessionRecordings: isSet(object.sessionRecordings) ? bytesFromBase64(object.sessionRecordings) : new Uint8Array(),
129
124
  };
130
125
  },
131
126
 
132
127
  toJSON(message: GetSessionRecordingResponse): unknown {
133
128
  const obj: any = {};
134
- if (message.sessionRecordings.length !== 0) {
135
- obj.sessionRecordings = base64FromBytes(message.sessionRecordings);
136
- }
129
+ message.sessionRecordings !== undefined &&
130
+ (obj.sessionRecordings = base64FromBytes(
131
+ message.sessionRecordings !== undefined ? message.sessionRecordings : new Uint8Array(),
132
+ ));
137
133
  return obj;
138
134
  },
139
135
 
140
136
  create(base?: DeepPartial<GetSessionRecordingResponse>): GetSessionRecordingResponse {
141
137
  return GetSessionRecordingResponse.fromPartial(base ?? {});
142
138
  },
139
+
143
140
  fromPartial(object: DeepPartial<GetSessionRecordingResponse>): GetSessionRecordingResponse {
144
141
  const message = createBaseGetSessionRecordingResponse();
145
- message.sessionRecordings = object.sessionRecordings ?? new Uint8Array(0);
142
+ message.sessionRecordings = object.sessionRecordings ?? new Uint8Array();
146
143
  return message;
147
144
  },
148
145
  };
@@ -163,11 +160,30 @@ export const RumSessionRecordingServiceDefinition = {
163
160
  },
164
161
  } as const;
165
162
 
163
+ declare var self: any | undefined;
164
+ declare var window: any | undefined;
165
+ declare var global: any | undefined;
166
+ var tsProtoGlobalThis: any = (() => {
167
+ if (typeof globalThis !== "undefined") {
168
+ return globalThis;
169
+ }
170
+ if (typeof self !== "undefined") {
171
+ return self;
172
+ }
173
+ if (typeof window !== "undefined") {
174
+ return window;
175
+ }
176
+ if (typeof global !== "undefined") {
177
+ return global;
178
+ }
179
+ throw "Unable to locate global object";
180
+ })();
181
+
166
182
  function bytesFromBase64(b64: string): Uint8Array {
167
- if (globalThis.Buffer) {
168
- return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
183
+ if (tsProtoGlobalThis.Buffer) {
184
+ return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
169
185
  } else {
170
- const bin = globalThis.atob(b64);
186
+ const bin = tsProtoGlobalThis.atob(b64);
171
187
  const arr = new Uint8Array(bin.length);
172
188
  for (let i = 0; i < bin.length; ++i) {
173
189
  arr[i] = bin.charCodeAt(i);
@@ -177,22 +193,21 @@ function bytesFromBase64(b64: string): Uint8Array {
177
193
  }
178
194
 
179
195
  function base64FromBytes(arr: Uint8Array): string {
180
- if (globalThis.Buffer) {
181
- return globalThis.Buffer.from(arr).toString("base64");
196
+ if (tsProtoGlobalThis.Buffer) {
197
+ return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
182
198
  } else {
183
199
  const bin: string[] = [];
184
200
  arr.forEach((byte) => {
185
- bin.push(globalThis.String.fromCharCode(byte));
201
+ bin.push(String.fromCharCode(byte));
186
202
  });
187
- return globalThis.btoa(bin.join(""));
203
+ return tsProtoGlobalThis.btoa(bin.join(""));
188
204
  }
189
205
  }
190
206
 
191
207
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
192
208
 
193
209
  export type DeepPartial<T> = T extends Builtin ? T
194
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
195
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
210
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
196
211
  : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
197
212
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
198
213
  : Partial<T>;
@@ -20,6 +20,9 @@ export interface UpdateSourceMapRequest {
20
20
  repoName?: string | undefined;
21
21
  user?: string | undefined;
22
22
  files: FileMetadata[];
23
+ /** @deprecated */
24
+ replace?: string | undefined;
25
+ generate?: string | undefined;
23
26
  }
24
27
 
25
28
  export interface DeleteSourceMapRequest {
@@ -123,34 +126,26 @@ export const UploadSourceMapsRequest = {
123
126
 
124
127
  fromJSON(object: any): UploadSourceMapsRequest {
125
128
  return {
126
- application: isSet(object.application) ? globalThis.String(object.application) : "",
127
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
128
- commitHash: isSet(object.commitHash) ? globalThis.String(object.commitHash) : undefined,
129
- repoName: isSet(object.repoName) ? globalThis.String(object.repoName) : undefined,
130
- user: isSet(object.user) ? globalThis.String(object.user) : undefined,
131
- files: globalThis.Array.isArray(object?.files) ? object.files.map((e: any) => FileMetadata.fromJSON(e)) : [],
129
+ application: isSet(object.application) ? String(object.application) : "",
130
+ releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
131
+ commitHash: isSet(object.commitHash) ? String(object.commitHash) : undefined,
132
+ repoName: isSet(object.repoName) ? String(object.repoName) : undefined,
133
+ user: isSet(object.user) ? String(object.user) : undefined,
134
+ files: Array.isArray(object?.files) ? object.files.map((e: any) => FileMetadata.fromJSON(e)) : [],
132
135
  };
133
136
  },
134
137
 
135
138
  toJSON(message: UploadSourceMapsRequest): unknown {
136
139
  const obj: any = {};
137
- if (message.application !== "") {
138
- obj.application = message.application;
139
- }
140
- if (message.releaseId !== "") {
141
- obj.releaseId = message.releaseId;
142
- }
143
- if (message.commitHash !== undefined) {
144
- obj.commitHash = message.commitHash;
145
- }
146
- if (message.repoName !== undefined) {
147
- obj.repoName = message.repoName;
148
- }
149
- if (message.user !== undefined) {
150
- obj.user = message.user;
151
- }
152
- if (message.files?.length) {
153
- obj.files = message.files.map((e) => FileMetadata.toJSON(e));
140
+ message.application !== undefined && (obj.application = message.application);
141
+ message.releaseId !== undefined && (obj.releaseId = message.releaseId);
142
+ message.commitHash !== undefined && (obj.commitHash = message.commitHash);
143
+ message.repoName !== undefined && (obj.repoName = message.repoName);
144
+ message.user !== undefined && (obj.user = message.user);
145
+ if (message.files) {
146
+ obj.files = message.files.map((e) => e ? FileMetadata.toJSON(e) : undefined);
147
+ } else {
148
+ obj.files = [];
154
149
  }
155
150
  return obj;
156
151
  },
@@ -158,6 +153,7 @@ export const UploadSourceMapsRequest = {
158
153
  create(base?: DeepPartial<UploadSourceMapsRequest>): UploadSourceMapsRequest {
159
154
  return UploadSourceMapsRequest.fromPartial(base ?? {});
160
155
  },
156
+
161
157
  fromPartial(object: DeepPartial<UploadSourceMapsRequest>): UploadSourceMapsRequest {
162
158
  const message = createBaseUploadSourceMapsRequest();
163
159
  message.application = object.application ?? "";
@@ -171,7 +167,16 @@ export const UploadSourceMapsRequest = {
171
167
  };
172
168
 
173
169
  function createBaseUpdateSourceMapRequest(): UpdateSourceMapRequest {
174
- return { application: "", releaseId: "", commitHash: undefined, repoName: undefined, user: undefined, files: [] };
170
+ return {
171
+ application: "",
172
+ releaseId: "",
173
+ commitHash: undefined,
174
+ repoName: undefined,
175
+ user: undefined,
176
+ files: [],
177
+ replace: undefined,
178
+ generate: undefined,
179
+ };
175
180
  }
176
181
 
177
182
  export const UpdateSourceMapRequest = {
@@ -194,6 +199,12 @@ export const UpdateSourceMapRequest = {
194
199
  for (const v of message.files) {
195
200
  FileMetadata.encode(v!, writer.uint32(50).fork()).ldelim();
196
201
  }
202
+ if (message.replace !== undefined) {
203
+ writer.uint32(58).string(message.replace);
204
+ }
205
+ if (message.generate !== undefined) {
206
+ writer.uint32(66).string(message.generate);
207
+ }
197
208
  return writer;
198
209
  },
199
210
 
@@ -246,6 +257,20 @@ export const UpdateSourceMapRequest = {
246
257
 
247
258
  message.files.push(FileMetadata.decode(reader, reader.uint32()));
248
259
  continue;
260
+ case 7:
261
+ if (tag !== 58) {
262
+ break;
263
+ }
264
+
265
+ message.replace = reader.string();
266
+ continue;
267
+ case 8:
268
+ if (tag !== 66) {
269
+ break;
270
+ }
271
+
272
+ message.generate = reader.string();
273
+ continue;
249
274
  }
250
275
  if ((tag & 7) === 4 || tag === 0) {
251
276
  break;
@@ -257,41 +282,38 @@ export const UpdateSourceMapRequest = {
257
282
 
258
283
  fromJSON(object: any): UpdateSourceMapRequest {
259
284
  return {
260
- application: isSet(object.application) ? globalThis.String(object.application) : "",
261
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
262
- commitHash: isSet(object.commitHash) ? globalThis.String(object.commitHash) : undefined,
263
- repoName: isSet(object.repoName) ? globalThis.String(object.repoName) : undefined,
264
- user: isSet(object.user) ? globalThis.String(object.user) : undefined,
265
- files: globalThis.Array.isArray(object?.files) ? object.files.map((e: any) => FileMetadata.fromJSON(e)) : [],
285
+ application: isSet(object.application) ? String(object.application) : "",
286
+ releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
287
+ commitHash: isSet(object.commitHash) ? String(object.commitHash) : undefined,
288
+ repoName: isSet(object.repoName) ? String(object.repoName) : undefined,
289
+ user: isSet(object.user) ? String(object.user) : undefined,
290
+ files: Array.isArray(object?.files) ? object.files.map((e: any) => FileMetadata.fromJSON(e)) : [],
291
+ replace: isSet(object.replace) ? String(object.replace) : undefined,
292
+ generate: isSet(object.generate) ? String(object.generate) : undefined,
266
293
  };
267
294
  },
268
295
 
269
296
  toJSON(message: UpdateSourceMapRequest): unknown {
270
297
  const obj: any = {};
271
- if (message.application !== "") {
272
- obj.application = message.application;
273
- }
274
- if (message.releaseId !== "") {
275
- obj.releaseId = message.releaseId;
276
- }
277
- if (message.commitHash !== undefined) {
278
- obj.commitHash = message.commitHash;
279
- }
280
- if (message.repoName !== undefined) {
281
- obj.repoName = message.repoName;
282
- }
283
- if (message.user !== undefined) {
284
- obj.user = message.user;
285
- }
286
- if (message.files?.length) {
287
- obj.files = message.files.map((e) => FileMetadata.toJSON(e));
288
- }
298
+ message.application !== undefined && (obj.application = message.application);
299
+ message.releaseId !== undefined && (obj.releaseId = message.releaseId);
300
+ message.commitHash !== undefined && (obj.commitHash = message.commitHash);
301
+ message.repoName !== undefined && (obj.repoName = message.repoName);
302
+ message.user !== undefined && (obj.user = message.user);
303
+ if (message.files) {
304
+ obj.files = message.files.map((e) => e ? FileMetadata.toJSON(e) : undefined);
305
+ } else {
306
+ obj.files = [];
307
+ }
308
+ message.replace !== undefined && (obj.replace = message.replace);
309
+ message.generate !== undefined && (obj.generate = message.generate);
289
310
  return obj;
290
311
  },
291
312
 
292
313
  create(base?: DeepPartial<UpdateSourceMapRequest>): UpdateSourceMapRequest {
293
314
  return UpdateSourceMapRequest.fromPartial(base ?? {});
294
315
  },
316
+
295
317
  fromPartial(object: DeepPartial<UpdateSourceMapRequest>): UpdateSourceMapRequest {
296
318
  const message = createBaseUpdateSourceMapRequest();
297
319
  message.application = object.application ?? "";
@@ -300,6 +322,8 @@ export const UpdateSourceMapRequest = {
300
322
  message.repoName = object.repoName ?? undefined;
301
323
  message.user = object.user ?? undefined;
302
324
  message.files = object.files?.map((e) => FileMetadata.fromPartial(e)) || [];
325
+ message.replace = object.replace ?? undefined;
326
+ message.generate = object.generate ?? undefined;
303
327
  return message;
304
328
  },
305
329
  };
@@ -351,25 +375,22 @@ export const DeleteSourceMapRequest = {
351
375
 
352
376
  fromJSON(object: any): DeleteSourceMapRequest {
353
377
  return {
354
- application: isSet(object.application) ? globalThis.String(object.application) : "",
355
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
378
+ application: isSet(object.application) ? String(object.application) : "",
379
+ releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
356
380
  };
357
381
  },
358
382
 
359
383
  toJSON(message: DeleteSourceMapRequest): unknown {
360
384
  const obj: any = {};
361
- if (message.application !== "") {
362
- obj.application = message.application;
363
- }
364
- if (message.releaseId !== "") {
365
- obj.releaseId = message.releaseId;
366
- }
385
+ message.application !== undefined && (obj.application = message.application);
386
+ message.releaseId !== undefined && (obj.releaseId = message.releaseId);
367
387
  return obj;
368
388
  },
369
389
 
370
390
  create(base?: DeepPartial<DeleteSourceMapRequest>): DeleteSourceMapRequest {
371
391
  return DeleteSourceMapRequest.fromPartial(base ?? {});
372
392
  },
393
+
373
394
  fromPartial(object: DeepPartial<DeleteSourceMapRequest>): DeleteSourceMapRequest {
374
395
  const message = createBaseDeleteSourceMapRequest();
375
396
  message.application = object.application ?? "";
@@ -415,6 +436,7 @@ export const UploadSourceMapsResponse = {
415
436
  create(base?: DeepPartial<UploadSourceMapsResponse>): UploadSourceMapsResponse {
416
437
  return UploadSourceMapsResponse.fromPartial(base ?? {});
417
438
  },
439
+
418
440
  fromPartial(_: DeepPartial<UploadSourceMapsResponse>): UploadSourceMapsResponse {
419
441
  const message = createBaseUploadSourceMapsResponse();
420
442
  return message;
@@ -458,6 +480,7 @@ export const UpdateSourceMapResponse = {
458
480
  create(base?: DeepPartial<UpdateSourceMapResponse>): UpdateSourceMapResponse {
459
481
  return UpdateSourceMapResponse.fromPartial(base ?? {});
460
482
  },
483
+
461
484
  fromPartial(_: DeepPartial<UpdateSourceMapResponse>): UpdateSourceMapResponse {
462
485
  const message = createBaseUpdateSourceMapResponse();
463
486
  return message;
@@ -501,6 +524,7 @@ export const DeleteSourceMapResponse = {
501
524
  create(base?: DeepPartial<DeleteSourceMapResponse>): DeleteSourceMapResponse {
502
525
  return DeleteSourceMapResponse.fromPartial(base ?? {});
503
526
  },
527
+
504
528
  fromPartial(_: DeepPartial<DeleteSourceMapResponse>): DeleteSourceMapResponse {
505
529
  const message = createBaseDeleteSourceMapResponse();
506
530
  return message;
@@ -542,8 +566,7 @@ export const RumSourceMapServiceDefinition = {
542
566
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
543
567
 
544
568
  export type DeepPartial<T> = T extends Builtin ? T
545
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
546
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
569
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
547
570
  : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
548
571
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
549
572
  : Partial<T>;
@@ -73,14 +73,11 @@ export const FileSourceCodeMap = {
73
73
 
74
74
  toJSON(message: FileSourceCodeMap): unknown {
75
75
  const obj: any = {};
76
+ obj.fileNameToCode = {};
76
77
  if (message.fileNameToCode) {
77
- const entries = Object.entries(message.fileNameToCode);
78
- if (entries.length > 0) {
79
- obj.fileNameToCode = {};
80
- entries.forEach(([k, v]) => {
81
- obj.fileNameToCode[k] = v;
82
- });
83
- }
78
+ Object.entries(message.fileNameToCode).forEach(([k, v]) => {
79
+ obj.fileNameToCode[k] = v;
80
+ });
84
81
  }
85
82
  return obj;
86
83
  },
@@ -88,12 +85,13 @@ export const FileSourceCodeMap = {
88
85
  create(base?: DeepPartial<FileSourceCodeMap>): FileSourceCodeMap {
89
86
  return FileSourceCodeMap.fromPartial(base ?? {});
90
87
  },
88
+
91
89
  fromPartial(object: DeepPartial<FileSourceCodeMap>): FileSourceCodeMap {
92
90
  const message = createBaseFileSourceCodeMap();
93
91
  message.fileNameToCode = Object.entries(object.fileNameToCode ?? {}).reduce<{ [key: string]: string }>(
94
92
  (acc, [key, value]) => {
95
93
  if (value !== undefined) {
96
- acc[key] = globalThis.String(value);
94
+ acc[key] = String(value);
97
95
  }
98
96
  return acc;
99
97
  },
@@ -149,26 +147,20 @@ export const FileSourceCodeMap_FileNameToCodeEntry = {
149
147
  },
150
148
 
151
149
  fromJSON(object: any): FileSourceCodeMap_FileNameToCodeEntry {
152
- return {
153
- key: isSet(object.key) ? globalThis.String(object.key) : "",
154
- value: isSet(object.value) ? globalThis.String(object.value) : "",
155
- };
150
+ return { key: isSet(object.key) ? String(object.key) : "", value: isSet(object.value) ? String(object.value) : "" };
156
151
  },
157
152
 
158
153
  toJSON(message: FileSourceCodeMap_FileNameToCodeEntry): unknown {
159
154
  const obj: any = {};
160
- if (message.key !== "") {
161
- obj.key = message.key;
162
- }
163
- if (message.value !== "") {
164
- obj.value = message.value;
165
- }
155
+ message.key !== undefined && (obj.key = message.key);
156
+ message.value !== undefined && (obj.value = message.value);
166
157
  return obj;
167
158
  },
168
159
 
169
160
  create(base?: DeepPartial<FileSourceCodeMap_FileNameToCodeEntry>): FileSourceCodeMap_FileNameToCodeEntry {
170
161
  return FileSourceCodeMap_FileNameToCodeEntry.fromPartial(base ?? {});
171
162
  },
163
+
172
164
  fromPartial(object: DeepPartial<FileSourceCodeMap_FileNameToCodeEntry>): FileSourceCodeMap_FileNameToCodeEntry {
173
165
  const message = createBaseFileSourceCodeMap_FileNameToCodeEntry();
174
166
  message.key = object.key ?? "";
@@ -282,45 +274,33 @@ export const SourceCodeLineMapping = {
282
274
 
283
275
  fromJSON(object: any): SourceCodeLineMapping {
284
276
  return {
285
- chunkName: isSet(object.chunkName) ? globalThis.String(object.chunkName) : "",
286
- sourceFileName: isSet(object.sourceFileName) ? globalThis.String(object.sourceFileName) : "",
287
- originalLineNumber: isSet(object.originalLineNumber) ? globalThis.Number(object.originalLineNumber) : 0,
288
- generatedLineNumber: isSet(object.generatedLineNumber) ? globalThis.Number(object.generatedLineNumber) : 0,
289
- originalColumnNumber: isSet(object.originalColumnNumber) ? globalThis.Number(object.originalColumnNumber) : 0,
290
- generatedColumnNumber: isSet(object.generatedColumnNumber) ? globalThis.Number(object.generatedColumnNumber) : 0,
291
- sourceFunctionName: isSet(object.sourceFunctionName) ? globalThis.String(object.sourceFunctionName) : "",
277
+ chunkName: isSet(object.chunkName) ? String(object.chunkName) : "",
278
+ sourceFileName: isSet(object.sourceFileName) ? String(object.sourceFileName) : "",
279
+ originalLineNumber: isSet(object.originalLineNumber) ? Number(object.originalLineNumber) : 0,
280
+ generatedLineNumber: isSet(object.generatedLineNumber) ? Number(object.generatedLineNumber) : 0,
281
+ originalColumnNumber: isSet(object.originalColumnNumber) ? Number(object.originalColumnNumber) : 0,
282
+ generatedColumnNumber: isSet(object.generatedColumnNumber) ? Number(object.generatedColumnNumber) : 0,
283
+ sourceFunctionName: isSet(object.sourceFunctionName) ? String(object.sourceFunctionName) : "",
292
284
  };
293
285
  },
294
286
 
295
287
  toJSON(message: SourceCodeLineMapping): unknown {
296
288
  const obj: any = {};
297
- if (message.chunkName !== "") {
298
- obj.chunkName = message.chunkName;
299
- }
300
- if (message.sourceFileName !== "") {
301
- obj.sourceFileName = message.sourceFileName;
302
- }
303
- if (message.originalLineNumber !== 0) {
304
- obj.originalLineNumber = Math.round(message.originalLineNumber);
305
- }
306
- if (message.generatedLineNumber !== 0) {
307
- obj.generatedLineNumber = Math.round(message.generatedLineNumber);
308
- }
309
- if (message.originalColumnNumber !== 0) {
310
- obj.originalColumnNumber = Math.round(message.originalColumnNumber);
311
- }
312
- if (message.generatedColumnNumber !== 0) {
313
- obj.generatedColumnNumber = Math.round(message.generatedColumnNumber);
314
- }
315
- if (message.sourceFunctionName !== "") {
316
- obj.sourceFunctionName = message.sourceFunctionName;
317
- }
289
+ message.chunkName !== undefined && (obj.chunkName = message.chunkName);
290
+ message.sourceFileName !== undefined && (obj.sourceFileName = message.sourceFileName);
291
+ message.originalLineNumber !== undefined && (obj.originalLineNumber = Math.round(message.originalLineNumber));
292
+ message.generatedLineNumber !== undefined && (obj.generatedLineNumber = Math.round(message.generatedLineNumber));
293
+ message.originalColumnNumber !== undefined && (obj.originalColumnNumber = Math.round(message.originalColumnNumber));
294
+ message.generatedColumnNumber !== undefined &&
295
+ (obj.generatedColumnNumber = Math.round(message.generatedColumnNumber));
296
+ message.sourceFunctionName !== undefined && (obj.sourceFunctionName = message.sourceFunctionName);
318
297
  return obj;
319
298
  },
320
299
 
321
300
  create(base?: DeepPartial<SourceCodeLineMapping>): SourceCodeLineMapping {
322
301
  return SourceCodeLineMapping.fromPartial(base ?? {});
323
302
  },
303
+
324
304
  fromPartial(object: DeepPartial<SourceCodeLineMapping>): SourceCodeLineMapping {
325
305
  const message = createBaseSourceCodeLineMapping();
326
306
  message.chunkName = object.chunkName ?? "";
@@ -337,8 +317,7 @@ export const SourceCodeLineMapping = {
337
317
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
338
318
 
339
319
  export type DeepPartial<T> = T extends Builtin ? T
340
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
341
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
320
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
342
321
  : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
343
322
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
344
323
  : Partial<T>;
@@ -125,45 +125,32 @@ export const SourceMapRelease = {
125
125
 
126
126
  fromJSON(object: any): SourceMapRelease {
127
127
  return {
128
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
129
- application: isSet(object.application) ? globalThis.String(object.application) : "",
130
- createdAt: isSet(object.createdAt) ? globalThis.Number(object.createdAt) : 0,
131
- commitHash: isSet(object.commitHash) ? globalThis.String(object.commitHash) : undefined,
132
- repoName: isSet(object.repoName) ? globalThis.String(object.repoName) : undefined,
133
- user: isSet(object.user) ? globalThis.String(object.user) : undefined,
134
- isUploadSucceeded: isSet(object.isUploadSucceeded) ? globalThis.Boolean(object.isUploadSucceeded) : undefined,
128
+ releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
129
+ application: isSet(object.application) ? String(object.application) : "",
130
+ createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
131
+ commitHash: isSet(object.commitHash) ? String(object.commitHash) : undefined,
132
+ repoName: isSet(object.repoName) ? String(object.repoName) : undefined,
133
+ user: isSet(object.user) ? String(object.user) : undefined,
134
+ isUploadSucceeded: isSet(object.isUploadSucceeded) ? Boolean(object.isUploadSucceeded) : undefined,
135
135
  };
136
136
  },
137
137
 
138
138
  toJSON(message: SourceMapRelease): unknown {
139
139
  const obj: any = {};
140
- if (message.releaseId !== "") {
141
- obj.releaseId = message.releaseId;
142
- }
143
- if (message.application !== "") {
144
- obj.application = message.application;
145
- }
146
- if (message.createdAt !== 0) {
147
- obj.createdAt = Math.round(message.createdAt);
148
- }
149
- if (message.commitHash !== undefined) {
150
- obj.commitHash = message.commitHash;
151
- }
152
- if (message.repoName !== undefined) {
153
- obj.repoName = message.repoName;
154
- }
155
- if (message.user !== undefined) {
156
- obj.user = message.user;
157
- }
158
- if (message.isUploadSucceeded !== undefined) {
159
- obj.isUploadSucceeded = message.isUploadSucceeded;
160
- }
140
+ message.releaseId !== undefined && (obj.releaseId = message.releaseId);
141
+ message.application !== undefined && (obj.application = message.application);
142
+ message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
143
+ message.commitHash !== undefined && (obj.commitHash = message.commitHash);
144
+ message.repoName !== undefined && (obj.repoName = message.repoName);
145
+ message.user !== undefined && (obj.user = message.user);
146
+ message.isUploadSucceeded !== undefined && (obj.isUploadSucceeded = message.isUploadSucceeded);
161
147
  return obj;
162
148
  },
163
149
 
164
150
  create(base?: DeepPartial<SourceMapRelease>): SourceMapRelease {
165
151
  return SourceMapRelease.fromPartial(base ?? {});
166
152
  },
153
+
167
154
  fromPartial(object: DeepPartial<SourceMapRelease>): SourceMapRelease {
168
155
  const message = createBaseSourceMapRelease();
169
156
  message.releaseId = object.releaseId ?? "";
@@ -234,29 +221,24 @@ export const ReleasePoint = {
234
221
 
235
222
  fromJSON(object: any): ReleasePoint {
236
223
  return {
237
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
238
- application: isSet(object.application) ? globalThis.String(object.application) : "",
239
- timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
224
+ releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
225
+ application: isSet(object.application) ? String(object.application) : "",
226
+ timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
240
227
  };
241
228
  },
242
229
 
243
230
  toJSON(message: ReleasePoint): unknown {
244
231
  const obj: any = {};
245
- if (message.releaseId !== "") {
246
- obj.releaseId = message.releaseId;
247
- }
248
- if (message.application !== "") {
249
- obj.application = message.application;
250
- }
251
- if (message.timestamp !== 0) {
252
- obj.timestamp = Math.round(message.timestamp);
253
- }
232
+ message.releaseId !== undefined && (obj.releaseId = message.releaseId);
233
+ message.application !== undefined && (obj.application = message.application);
234
+ message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
254
235
  return obj;
255
236
  },
256
237
 
257
238
  create(base?: DeepPartial<ReleasePoint>): ReleasePoint {
258
239
  return ReleasePoint.fromPartial(base ?? {});
259
240
  },
241
+
260
242
  fromPartial(object: DeepPartial<ReleasePoint>): ReleasePoint {
261
243
  const message = createBaseReleasePoint();
262
244
  message.releaseId = object.releaseId ?? "";
@@ -266,18 +248,36 @@ export const ReleasePoint = {
266
248
  },
267
249
  };
268
250
 
251
+ declare var self: any | undefined;
252
+ declare var window: any | undefined;
253
+ declare var global: any | undefined;
254
+ var tsProtoGlobalThis: any = (() => {
255
+ if (typeof globalThis !== "undefined") {
256
+ return globalThis;
257
+ }
258
+ if (typeof self !== "undefined") {
259
+ return self;
260
+ }
261
+ if (typeof window !== "undefined") {
262
+ return window;
263
+ }
264
+ if (typeof global !== "undefined") {
265
+ return global;
266
+ }
267
+ throw "Unable to locate global object";
268
+ })();
269
+
269
270
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
270
271
 
271
272
  export type DeepPartial<T> = T extends Builtin ? T
272
- : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
273
- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
273
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
274
274
  : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
275
275
  : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
276
276
  : Partial<T>;
277
277
 
278
278
  function longToNumber(long: Long): number {
279
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
280
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
279
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
280
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
281
281
  }
282
282
  return long.toNumber();
283
283
  }