@coralogix/rum-cli 1.1.25 → 1.1.26

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 (55) hide show
  1. package/README.md +0 -12
  2. package/api/client/request-builder.ts +18 -27
  3. package/api/react-native.api.ts +12 -9
  4. package/api/source-maps.api.ts +47 -84
  5. package/cli/commands/source-maps/index.ts +1 -3
  6. package/cli/rum-cli.ts +0 -4
  7. package/consts/consts.ts +1 -0
  8. package/dist/api/client/client-factory.d.ts +0 -20
  9. package/dist/api/client/request-builder.d.ts +4 -10
  10. package/dist/api/client/request-builder.js +11 -11
  11. package/dist/api/react-native.api.d.ts +1 -1
  12. package/dist/api/react-native.api.js +7 -6
  13. package/dist/api/source-maps.api.d.ts +2 -5
  14. package/dist/api/source-maps.api.js +19 -65
  15. package/dist/cli/commands/source-maps/index.d.ts +0 -2
  16. package/dist/cli/commands/source-maps/index.js +2 -4
  17. package/dist/cli/rum-cli.js +1 -5
  18. package/dist/consts/consts.js +3 -2
  19. package/dist/proto-models/com/coralogix/blobset/v2/blobset_query_service.d.ts +19 -17
  20. package/dist/proto-models/com/coralogix/blobset/v2/blobset_query_service.js +6 -6
  21. package/dist/proto-models/com/coralogix/blobset/v2/entity_metadata.d.ts +0 -18
  22. package/dist/proto-models/com/coralogix/blobset/v2/entity_metadata.js +5 -142
  23. package/dist/proto-models/com/coralogix/blobset/v2/source_map.d.ts +62 -0
  24. package/dist/proto-models/com/coralogix/blobset/v2/source_map.js +367 -0
  25. package/dist/services/react-native.service.js +2 -2
  26. package/dist/services/source-maps.service.d.ts +0 -2
  27. package/dist/services/source-maps.service.js +8 -50
  28. package/package.json +4 -3
  29. package/proto-models/com/coralogix/blobset/v2/blobset_query_service.ts +5 -5
  30. package/proto-models/com/coralogix/blobset/v2/entity_metadata.ts +4 -163
  31. package/proto-models/com/coralogix/blobset/v2/{react_native.ts → source_map.ts} +87 -36
  32. package/protofetch.lock +2 -2
  33. package/protofetch.toml +1 -1
  34. package/protos/com/coralogix/blobset/v2/blobset_query_service.proto +3 -3
  35. package/protos/com/coralogix/blobset/v2/entity_metadata.proto +0 -10
  36. package/protos/com/coralogix/blobset/v2/{react_native.proto → source_map.proto} +10 -3
  37. package/protoset.bin +0 -0
  38. package/services/react-native.service.ts +2 -2
  39. package/services/source-maps.service.ts +7 -69
  40. package/cli/commands/source-maps/delete-source-maps-command.ts +0 -32
  41. package/cli/commands/source-maps/update-source-maps-command.ts +0 -37
  42. package/dist/cli/commands/source-maps/delete-source-maps-command.d.ts +0 -2
  43. package/dist/cli/commands/source-maps/delete-source-maps-command.js +0 -41
  44. package/dist/cli/commands/source-maps/update-source-maps-command.d.ts +0 -2
  45. package/dist/cli/commands/source-maps/update-source-maps-command.js +0 -46
  46. package/dist/proto-models/com/coralogix/blobset/v2/react_native.d.ts +0 -54
  47. package/dist/proto-models/com/coralogix/blobset/v2/react_native.js +0 -318
  48. package/dist/proto-models/com/coralogix/rum/v2/rum_snooze_errors_service.d.ts +0 -261
  49. package/dist/proto-models/com/coralogix/rum/v2/rum_snooze_errors_service.js +0 -703
  50. package/dist/proto-models/com/coralogix/rum/v2/snooze_errors.d.ts +0 -109
  51. package/dist/proto-models/com/coralogix/rum/v2/snooze_errors.js +0 -588
  52. package/proto-models/com/coralogix/rum/v2/rum_snooze_errors_service.ts +0 -824
  53. package/proto-models/com/coralogix/rum/v2/snooze_errors.ts +0 -665
  54. package/protos/com/coralogix/rum/v2/rum_snooze_errors_service.proto +0 -64
  55. package/protos/com/coralogix/rum/v2/snooze_errors.proto +0 -55
@@ -25,20 +25,11 @@ export interface SourceMapMetadata {
25
25
  orgName?: string | undefined;
26
26
  }
27
27
 
28
- export interface ReactNativeMetadata {
29
- application: string;
30
- releaseId: string;
31
- commitHash?: string | undefined;
32
- repoName?: string | undefined;
33
- orgName?: string | undefined;
34
- }
35
-
36
28
  export interface EntityMetadata {
37
- metadata?:
38
- | { $case: "dsymMetadata"; dsymMetadata: DsymMetadata }
39
- | { $case: "sourceMapMetadata"; sourceMapMetadata: SourceMapMetadata }
40
- | { $case: "reactNativeMetadata"; reactNativeMetadata: ReactNativeMetadata }
41
- | undefined;
29
+ metadata?: { $case: "dsymMetadata"; dsymMetadata: DsymMetadata } | {
30
+ $case: "sourceMapMetadata";
31
+ sourceMapMetadata: SourceMapMetadata;
32
+ } | undefined;
42
33
  }
43
34
 
44
35
  function createBaseDsymMetadata(): DsymMetadata {
@@ -279,125 +270,6 @@ export const SourceMapMetadata = {
279
270
  },
280
271
  };
281
272
 
282
- function createBaseReactNativeMetadata(): ReactNativeMetadata {
283
- return { application: "", releaseId: "", commitHash: undefined, repoName: undefined, orgName: undefined };
284
- }
285
-
286
- export const ReactNativeMetadata = {
287
- encode(message: ReactNativeMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
288
- if (message.application !== "") {
289
- writer.uint32(10).string(message.application);
290
- }
291
- if (message.releaseId !== "") {
292
- writer.uint32(18).string(message.releaseId);
293
- }
294
- if (message.commitHash !== undefined) {
295
- writer.uint32(26).string(message.commitHash);
296
- }
297
- if (message.repoName !== undefined) {
298
- writer.uint32(34).string(message.repoName);
299
- }
300
- if (message.orgName !== undefined) {
301
- writer.uint32(42).string(message.orgName);
302
- }
303
- return writer;
304
- },
305
-
306
- decode(input: _m0.Reader | Uint8Array, length?: number): ReactNativeMetadata {
307
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
308
- let end = length === undefined ? reader.len : reader.pos + length;
309
- const message = createBaseReactNativeMetadata();
310
- while (reader.pos < end) {
311
- const tag = reader.uint32();
312
- switch (tag >>> 3) {
313
- case 1:
314
- if (tag !== 10) {
315
- break;
316
- }
317
-
318
- message.application = reader.string();
319
- continue;
320
- case 2:
321
- if (tag !== 18) {
322
- break;
323
- }
324
-
325
- message.releaseId = reader.string();
326
- continue;
327
- case 3:
328
- if (tag !== 26) {
329
- break;
330
- }
331
-
332
- message.commitHash = reader.string();
333
- continue;
334
- case 4:
335
- if (tag !== 34) {
336
- break;
337
- }
338
-
339
- message.repoName = reader.string();
340
- continue;
341
- case 5:
342
- if (tag !== 42) {
343
- break;
344
- }
345
-
346
- message.orgName = reader.string();
347
- continue;
348
- }
349
- if ((tag & 7) === 4 || tag === 0) {
350
- break;
351
- }
352
- reader.skipType(tag & 7);
353
- }
354
- return message;
355
- },
356
-
357
- fromJSON(object: any): ReactNativeMetadata {
358
- return {
359
- application: isSet(object.application) ? globalThis.String(object.application) : "",
360
- releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
361
- commitHash: isSet(object.commitHash) ? globalThis.String(object.commitHash) : undefined,
362
- repoName: isSet(object.repoName) ? globalThis.String(object.repoName) : undefined,
363
- orgName: isSet(object.orgName) ? globalThis.String(object.orgName) : undefined,
364
- };
365
- },
366
-
367
- toJSON(message: ReactNativeMetadata): unknown {
368
- const obj: any = {};
369
- if (message.application !== "") {
370
- obj.application = message.application;
371
- }
372
- if (message.releaseId !== "") {
373
- obj.releaseId = message.releaseId;
374
- }
375
- if (message.commitHash !== undefined) {
376
- obj.commitHash = message.commitHash;
377
- }
378
- if (message.repoName !== undefined) {
379
- obj.repoName = message.repoName;
380
- }
381
- if (message.orgName !== undefined) {
382
- obj.orgName = message.orgName;
383
- }
384
- return obj;
385
- },
386
-
387
- create(base?: DeepPartial<ReactNativeMetadata>): ReactNativeMetadata {
388
- return ReactNativeMetadata.fromPartial(base ?? {});
389
- },
390
- fromPartial(object: DeepPartial<ReactNativeMetadata>): ReactNativeMetadata {
391
- const message = createBaseReactNativeMetadata();
392
- message.application = object.application ?? "";
393
- message.releaseId = object.releaseId ?? "";
394
- message.commitHash = object.commitHash ?? undefined;
395
- message.repoName = object.repoName ?? undefined;
396
- message.orgName = object.orgName ?? undefined;
397
- return message;
398
- },
399
- };
400
-
401
273
  function createBaseEntityMetadata(): EntityMetadata {
402
274
  return { metadata: undefined };
403
275
  }
@@ -411,9 +283,6 @@ export const EntityMetadata = {
411
283
  case "sourceMapMetadata":
412
284
  SourceMapMetadata.encode(message.metadata.sourceMapMetadata, writer.uint32(18).fork()).ldelim();
413
285
  break;
414
- case "reactNativeMetadata":
415
- ReactNativeMetadata.encode(message.metadata.reactNativeMetadata, writer.uint32(26).fork()).ldelim();
416
- break;
417
286
  }
418
287
  return writer;
419
288
  },
@@ -442,16 +311,6 @@ export const EntityMetadata = {
442
311
  sourceMapMetadata: SourceMapMetadata.decode(reader, reader.uint32()),
443
312
  };
444
313
  continue;
445
- case 3:
446
- if (tag !== 26) {
447
- break;
448
- }
449
-
450
- message.metadata = {
451
- $case: "reactNativeMetadata",
452
- reactNativeMetadata: ReactNativeMetadata.decode(reader, reader.uint32()),
453
- };
454
- continue;
455
314
  }
456
315
  if ((tag & 7) === 4 || tag === 0) {
457
316
  break;
@@ -467,11 +326,6 @@ export const EntityMetadata = {
467
326
  ? { $case: "dsymMetadata", dsymMetadata: DsymMetadata.fromJSON(object.dsymMetadata) }
468
327
  : isSet(object.sourceMapMetadata)
469
328
  ? { $case: "sourceMapMetadata", sourceMapMetadata: SourceMapMetadata.fromJSON(object.sourceMapMetadata) }
470
- : isSet(object.reactNativeMetadata)
471
- ? {
472
- $case: "reactNativeMetadata",
473
- reactNativeMetadata: ReactNativeMetadata.fromJSON(object.reactNativeMetadata),
474
- }
475
329
  : undefined,
476
330
  };
477
331
  },
@@ -484,9 +338,6 @@ export const EntityMetadata = {
484
338
  if (message.metadata?.$case === "sourceMapMetadata") {
485
339
  obj.sourceMapMetadata = SourceMapMetadata.toJSON(message.metadata.sourceMapMetadata);
486
340
  }
487
- if (message.metadata?.$case === "reactNativeMetadata") {
488
- obj.reactNativeMetadata = ReactNativeMetadata.toJSON(message.metadata.reactNativeMetadata);
489
- }
490
341
  return obj;
491
342
  },
492
343
 
@@ -515,16 +366,6 @@ export const EntityMetadata = {
515
366
  sourceMapMetadata: SourceMapMetadata.fromPartial(object.metadata.sourceMapMetadata),
516
367
  };
517
368
  }
518
- if (
519
- object.metadata?.$case === "reactNativeMetadata" &&
520
- object.metadata?.reactNativeMetadata !== undefined &&
521
- object.metadata?.reactNativeMetadata !== null
522
- ) {
523
- message.metadata = {
524
- $case: "reactNativeMetadata",
525
- reactNativeMetadata: ReactNativeMetadata.fromPartial(object.metadata.reactNativeMetadata),
526
- };
527
- }
528
369
  return message;
529
370
  },
530
371
  };
@@ -2,25 +2,61 @@
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v1.181.1
4
4
  // protoc v3.19.1
5
- // source: com/coralogix/blobset/v2/react_native.proto
5
+ // source: com/coralogix/blobset/v2/source_map.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import _m0 from "protobufjs/minimal";
9
9
 
10
10
  export const protobufPackage = "com.coralogix.blobset.v2";
11
11
 
12
+ export enum SourceMapType {
13
+ SOURCE_MAP_TYPE_UNKNOWN = 0,
14
+ SOURCE_MAP_TYPE_WEB = 1,
15
+ SOURCE_MAP_TYPE_REACT_NATIVE = 2,
16
+ }
17
+
18
+ export function sourceMapTypeFromJSON(object: any): SourceMapType {
19
+ switch (object) {
20
+ case 0:
21
+ case "SOURCE_MAP_TYPE_UNKNOWN":
22
+ return SourceMapType.SOURCE_MAP_TYPE_UNKNOWN;
23
+ case 1:
24
+ case "SOURCE_MAP_TYPE_WEB":
25
+ return SourceMapType.SOURCE_MAP_TYPE_WEB;
26
+ case 2:
27
+ case "SOURCE_MAP_TYPE_REACT_NATIVE":
28
+ return SourceMapType.SOURCE_MAP_TYPE_REACT_NATIVE;
29
+ default:
30
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum SourceMapType");
31
+ }
32
+ }
33
+
34
+ export function sourceMapTypeToJSON(object: SourceMapType): string {
35
+ switch (object) {
36
+ case SourceMapType.SOURCE_MAP_TYPE_UNKNOWN:
37
+ return "SOURCE_MAP_TYPE_UNKNOWN";
38
+ case SourceMapType.SOURCE_MAP_TYPE_WEB:
39
+ return "SOURCE_MAP_TYPE_WEB";
40
+ case SourceMapType.SOURCE_MAP_TYPE_REACT_NATIVE:
41
+ return "SOURCE_MAP_TYPE_REACT_NATIVE";
42
+ default:
43
+ throw new globalThis.Error("Unrecognized enum value " + object + " for enum SourceMapType");
44
+ }
45
+ }
46
+
12
47
  export interface Chunk {
13
48
  chunk: string;
14
49
  content: Uint8Array;
15
50
  }
16
51
 
17
- export interface GetReactNativeSourceMapsChunksRequest {
52
+ export interface GetSourceMapsChunksRequest {
18
53
  application: string;
19
54
  releaseId: string;
20
- chunkNames: string[];
55
+ sourceMapType: SourceMapType;
56
+ chunksNames: string[];
21
57
  }
22
58
 
23
- export interface GetReactNativeSourceMapsChunksResponse {
59
+ export interface GetSourceMapsChunksResponse {
24
60
  application: string;
25
61
  releaseId: string;
26
62
  chunks: Chunk[];
@@ -103,28 +139,31 @@ export const Chunk = {
103
139
  },
104
140
  };
105
141
 
106
- function createBaseGetReactNativeSourceMapsChunksRequest(): GetReactNativeSourceMapsChunksRequest {
107
- return { application: "", releaseId: "", chunkNames: [] };
142
+ function createBaseGetSourceMapsChunksRequest(): GetSourceMapsChunksRequest {
143
+ return { application: "", releaseId: "", sourceMapType: 0, chunksNames: [] };
108
144
  }
109
145
 
110
- export const GetReactNativeSourceMapsChunksRequest = {
111
- encode(message: GetReactNativeSourceMapsChunksRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
146
+ export const GetSourceMapsChunksRequest = {
147
+ encode(message: GetSourceMapsChunksRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
112
148
  if (message.application !== "") {
113
149
  writer.uint32(10).string(message.application);
114
150
  }
115
151
  if (message.releaseId !== "") {
116
152
  writer.uint32(18).string(message.releaseId);
117
153
  }
118
- for (const v of message.chunkNames) {
119
- writer.uint32(26).string(v!);
154
+ if (message.sourceMapType !== 0) {
155
+ writer.uint32(24).int32(message.sourceMapType);
156
+ }
157
+ for (const v of message.chunksNames) {
158
+ writer.uint32(34).string(v!);
120
159
  }
121
160
  return writer;
122
161
  },
123
162
 
124
- decode(input: _m0.Reader | Uint8Array, length?: number): GetReactNativeSourceMapsChunksRequest {
163
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetSourceMapsChunksRequest {
125
164
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
126
165
  let end = length === undefined ? reader.len : reader.pos + length;
127
- const message = createBaseGetReactNativeSourceMapsChunksRequest();
166
+ const message = createBaseGetSourceMapsChunksRequest();
128
167
  while (reader.pos < end) {
129
168
  const tag = reader.uint32();
130
169
  switch (tag >>> 3) {
@@ -143,11 +182,18 @@ export const GetReactNativeSourceMapsChunksRequest = {
143
182
  message.releaseId = reader.string();
144
183
  continue;
145
184
  case 3:
146
- if (tag !== 26) {
185
+ if (tag !== 24) {
186
+ break;
187
+ }
188
+
189
+ message.sourceMapType = reader.int32() as any;
190
+ continue;
191
+ case 4:
192
+ if (tag !== 34) {
147
193
  break;
148
194
  }
149
195
 
150
- message.chunkNames.push(reader.string());
196
+ message.chunksNames.push(reader.string());
151
197
  continue;
152
198
  }
153
199
  if ((tag & 7) === 4 || tag === 0) {
@@ -158,17 +204,18 @@ export const GetReactNativeSourceMapsChunksRequest = {
158
204
  return message;
159
205
  },
160
206
 
161
- fromJSON(object: any): GetReactNativeSourceMapsChunksRequest {
207
+ fromJSON(object: any): GetSourceMapsChunksRequest {
162
208
  return {
163
209
  application: isSet(object.application) ? globalThis.String(object.application) : "",
164
210
  releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
165
- chunkNames: globalThis.Array.isArray(object?.chunkNames)
166
- ? object.chunkNames.map((e: any) => globalThis.String(e))
211
+ sourceMapType: isSet(object.sourceMapType) ? sourceMapTypeFromJSON(object.sourceMapType) : 0,
212
+ chunksNames: globalThis.Array.isArray(object?.chunksNames)
213
+ ? object.chunksNames.map((e: any) => globalThis.String(e))
167
214
  : [],
168
215
  };
169
216
  },
170
217
 
171
- toJSON(message: GetReactNativeSourceMapsChunksRequest): unknown {
218
+ toJSON(message: GetSourceMapsChunksRequest): unknown {
172
219
  const obj: any = {};
173
220
  if (message.application !== "") {
174
221
  obj.application = message.application;
@@ -176,30 +223,34 @@ export const GetReactNativeSourceMapsChunksRequest = {
176
223
  if (message.releaseId !== "") {
177
224
  obj.releaseId = message.releaseId;
178
225
  }
179
- if (message.chunkNames?.length) {
180
- obj.chunkNames = message.chunkNames;
226
+ if (message.sourceMapType !== 0) {
227
+ obj.sourceMapType = sourceMapTypeToJSON(message.sourceMapType);
228
+ }
229
+ if (message.chunksNames?.length) {
230
+ obj.chunksNames = message.chunksNames;
181
231
  }
182
232
  return obj;
183
233
  },
184
234
 
185
- create(base?: DeepPartial<GetReactNativeSourceMapsChunksRequest>): GetReactNativeSourceMapsChunksRequest {
186
- return GetReactNativeSourceMapsChunksRequest.fromPartial(base ?? {});
235
+ create(base?: DeepPartial<GetSourceMapsChunksRequest>): GetSourceMapsChunksRequest {
236
+ return GetSourceMapsChunksRequest.fromPartial(base ?? {});
187
237
  },
188
- fromPartial(object: DeepPartial<GetReactNativeSourceMapsChunksRequest>): GetReactNativeSourceMapsChunksRequest {
189
- const message = createBaseGetReactNativeSourceMapsChunksRequest();
238
+ fromPartial(object: DeepPartial<GetSourceMapsChunksRequest>): GetSourceMapsChunksRequest {
239
+ const message = createBaseGetSourceMapsChunksRequest();
190
240
  message.application = object.application ?? "";
191
241
  message.releaseId = object.releaseId ?? "";
192
- message.chunkNames = object.chunkNames?.map((e) => e) || [];
242
+ message.sourceMapType = object.sourceMapType ?? 0;
243
+ message.chunksNames = object.chunksNames?.map((e) => e) || [];
193
244
  return message;
194
245
  },
195
246
  };
196
247
 
197
- function createBaseGetReactNativeSourceMapsChunksResponse(): GetReactNativeSourceMapsChunksResponse {
248
+ function createBaseGetSourceMapsChunksResponse(): GetSourceMapsChunksResponse {
198
249
  return { application: "", releaseId: "", chunks: [], commitHash: undefined, repoName: undefined, user: undefined };
199
250
  }
200
251
 
201
- export const GetReactNativeSourceMapsChunksResponse = {
202
- encode(message: GetReactNativeSourceMapsChunksResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
252
+ export const GetSourceMapsChunksResponse = {
253
+ encode(message: GetSourceMapsChunksResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
203
254
  if (message.application !== "") {
204
255
  writer.uint32(10).string(message.application);
205
256
  }
@@ -221,10 +272,10 @@ export const GetReactNativeSourceMapsChunksResponse = {
221
272
  return writer;
222
273
  },
223
274
 
224
- decode(input: _m0.Reader | Uint8Array, length?: number): GetReactNativeSourceMapsChunksResponse {
275
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetSourceMapsChunksResponse {
225
276
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
226
277
  let end = length === undefined ? reader.len : reader.pos + length;
227
- const message = createBaseGetReactNativeSourceMapsChunksResponse();
278
+ const message = createBaseGetSourceMapsChunksResponse();
228
279
  while (reader.pos < end) {
229
280
  const tag = reader.uint32();
230
281
  switch (tag >>> 3) {
@@ -279,7 +330,7 @@ export const GetReactNativeSourceMapsChunksResponse = {
279
330
  return message;
280
331
  },
281
332
 
282
- fromJSON(object: any): GetReactNativeSourceMapsChunksResponse {
333
+ fromJSON(object: any): GetSourceMapsChunksResponse {
283
334
  return {
284
335
  application: isSet(object.application) ? globalThis.String(object.application) : "",
285
336
  releaseId: isSet(object.releaseId) ? globalThis.String(object.releaseId) : "",
@@ -290,7 +341,7 @@ export const GetReactNativeSourceMapsChunksResponse = {
290
341
  };
291
342
  },
292
343
 
293
- toJSON(message: GetReactNativeSourceMapsChunksResponse): unknown {
344
+ toJSON(message: GetSourceMapsChunksResponse): unknown {
294
345
  const obj: any = {};
295
346
  if (message.application !== "") {
296
347
  obj.application = message.application;
@@ -313,11 +364,11 @@ export const GetReactNativeSourceMapsChunksResponse = {
313
364
  return obj;
314
365
  },
315
366
 
316
- create(base?: DeepPartial<GetReactNativeSourceMapsChunksResponse>): GetReactNativeSourceMapsChunksResponse {
317
- return GetReactNativeSourceMapsChunksResponse.fromPartial(base ?? {});
367
+ create(base?: DeepPartial<GetSourceMapsChunksResponse>): GetSourceMapsChunksResponse {
368
+ return GetSourceMapsChunksResponse.fromPartial(base ?? {});
318
369
  },
319
- fromPartial(object: DeepPartial<GetReactNativeSourceMapsChunksResponse>): GetReactNativeSourceMapsChunksResponse {
320
- const message = createBaseGetReactNativeSourceMapsChunksResponse();
370
+ fromPartial(object: DeepPartial<GetSourceMapsChunksResponse>): GetSourceMapsChunksResponse {
371
+ const message = createBaseGetSourceMapsChunksResponse();
321
372
  message.application = object.application ?? "";
322
373
  message.releaseId = object.releaseId ?? "";
323
374
  message.chunks = object.chunks?.map((e) => Chunk.fromPartial(e)) || [];
package/protofetch.lock CHANGED
@@ -2,10 +2,10 @@ module_name = "rum-cli"
2
2
  proto_out_dir = "protos"
3
3
 
4
4
  [[dependencies]]
5
- commit_hash = "f7889b47d693ce82aaeb50a4dcde7dd664806921"
5
+ commit_hash = "0ba02da8976010709e78c9e8312a1f7d399017cf"
6
6
 
7
7
  [[dependencies.specifications]]
8
- revision = "v0.0.12"
8
+ revision = "v0.0.16"
9
9
 
10
10
  [dependencies.coordinate]
11
11
  forge = "github.com"
package/protofetch.toml CHANGED
@@ -8,5 +8,5 @@ protocol = "ssh"
8
8
 
9
9
  [cx-api-blobset]
10
10
  url = 'github.com/coralogix/cx-api-blobset'
11
- revision = 'v0.0.12'
11
+ revision = 'v0.0.16'
12
12
  protocol = 'ssh'
@@ -3,10 +3,10 @@ syntax = "proto3";
3
3
  package com.coralogix.blobset.v2;
4
4
 
5
5
  import "com/coralogix/blobset/v2/dsym.proto";
6
- import "com/coralogix/blobset/v2/react_native.proto";
6
+ import "com/coralogix/blobset/v2/source_map.proto";
7
7
 
8
8
  service BlobSetQueryService {
9
9
  // RUM
10
10
  rpc GetMappedIosStackTrace(GetMappedIosStackTraceRequest) returns (GetMappedIosStackTraceResponse) {}
11
- rpc GetReactNativeSourceMapsChunks(GetReactNativeSourceMapsChunksRequest) returns (GetReactNativeSourceMapsChunksResponse) {}
12
- }
11
+ rpc GetSourceMapsChunks(GetSourceMapsChunksRequest) returns (GetSourceMapsChunksResponse) {}
12
+ }
@@ -18,19 +18,9 @@ message SourceMapMetadata {
18
18
  optional string org_name = 5;
19
19
  }
20
20
 
21
- message ReactNativeMetadata {
22
- string application = 1;
23
- string release_id = 2;
24
- optional string commit_hash = 3;
25
- optional string repo_name = 4;
26
- optional string org_name = 5;
27
- }
28
-
29
-
30
21
  message EntityMetadata {
31
22
  oneof metadata {
32
23
  DsymMetadata dsym_metadata = 1;
33
24
  SourceMapMetadata source_map_metadata = 2;
34
- ReactNativeMetadata react_native_metadata = 3;
35
25
  }
36
26
  }
@@ -2,18 +2,25 @@ syntax = "proto3";
2
2
 
3
3
  package com.coralogix.blobset.v2;
4
4
 
5
+ enum SourceMapType {
6
+ SOURCE_MAP_TYPE_UNKNOWN = 0;
7
+ SOURCE_MAP_TYPE_WEB = 1;
8
+ SOURCE_MAP_TYPE_REACT_NATIVE = 2;
9
+ }
10
+
5
11
  message Chunk {
6
12
  string chunk = 1;
7
13
  bytes content = 2;
8
14
  }
9
15
 
10
- message GetReactNativeSourceMapsChunksRequest {
16
+ message GetSourceMapsChunksRequest {
11
17
  string application = 1;
12
18
  string release_id = 2;
13
- repeated string chunk_names = 3;
19
+ SourceMapType source_map_type = 3;
20
+ repeated string chunks_names = 4;
14
21
  }
15
22
 
16
- message GetReactNativeSourceMapsChunksResponse {
23
+ message GetSourceMapsChunksResponse {
17
24
  string application = 1;
18
25
  string release_id = 2;
19
26
  repeated Chunk chunks = 3;
package/protoset.bin CHANGED
Binary file
@@ -15,9 +15,9 @@ export class ReactNativeService {
15
15
  env: string,
16
16
  privateKey: string,
17
17
  ): Promise<void> {
18
- const request = UploadBlobRequest.create();
18
+ const request: UploadBlobRequest = UploadBlobRequest.create();
19
19
 
20
- console.log(GRAY_COLOR, '🚀 Uploading react native source map...');
20
+ console.log(GRAY_COLOR, '🚀 Uploading react native source maps...');
21
21
 
22
22
  try {
23
23
  const totalFiles: number | undefined = await FileProcessor.traverseSourceMapsFolder(folderPath, '.map', request);
@@ -1,12 +1,8 @@
1
- import {
2
- DeleteSourceMapRequest,
3
- UpdateSourceMapRequest,
4
- UploadSourceMapsRequest,
5
- } from '../proto-models/com/coralogix/rum/v2/rum_source_map_service';
6
- import { SourceMapsApi } from '../api/source-maps.api';
7
1
  import { GRAY_COLOR, GREEN_COLOR } from '../consts/consts';
8
2
  import { consoleError } from '../utils/shared.utils';
3
+ import { UploadBlobRequest } from '../proto-models/com/coralogix/blobset/v2/blobset_service';
9
4
  import { FileProcessor } from '../utils/file-processor.utils';
5
+ import { SourceMapsApi } from '../api/source-maps.api';
10
6
 
11
7
  export class SourceMapsService {
12
8
  static async upload(
@@ -19,78 +15,20 @@ export class SourceMapsService {
19
15
  env: string,
20
16
  privateKey: string,
21
17
  ): Promise<void> {
22
- const request = UploadSourceMapsRequest.create();
23
-
24
- request.application = application;
25
- request.releaseId = version;
26
- request.repoName = repoName;
27
- request.commitHash = commitHash;
28
- request.user = orgName;
18
+ const request: UploadBlobRequest = UploadBlobRequest.create();
29
19
 
30
20
  console.log(GRAY_COLOR, '🚀 Uploading source maps...');
31
21
 
32
22
  try {
33
- await FileProcessor.traverseSourceMapsFolderOld(folderPath, request);
34
-
35
- await SourceMapsApi.uploadSourceMaps(request, env, privateKey);
36
-
37
- console.log(GREEN_COLOR, '✅ Source maps uploaded successfully!');
38
- console.log(GREEN_COLOR, `✅ Total chunk files processed: ${request.files.length}`);
39
- console.log(GREEN_COLOR, '✅ Processing complete.');
40
- } catch (error) {
41
- consoleError(error);
42
- }
43
- }
44
-
45
- static async update(
46
- application: string,
47
- version: string,
48
- repoName: string | undefined,
49
- commitHash: string | undefined,
50
- orgName: string | undefined,
51
- folderPath: string,
52
- generate: string | undefined,
53
- env: string,
54
- privateKey: string,
55
- ): Promise<void> {
56
- const request = UpdateSourceMapRequest.create();
57
-
58
- request.application = application;
59
- request.releaseId = version;
60
- request.repoName = repoName;
61
- request.commitHash = commitHash;
62
- request.user = orgName;
63
- request.generate = generate;
64
-
65
- console.log(GRAY_COLOR, '🔄 Updating source maps...');
66
-
67
- try {
68
- await FileProcessor.traverseSourceMapsFolderOld(folderPath, request);
23
+ const totalFiles: number | undefined = await FileProcessor.traverseSourceMapsFolder(folderPath, '.js.map', request);
69
24
 
70
- await SourceMapsApi.updateSourceMap(request, env, privateKey);
25
+ await SourceMapsApi.uploadSourceMaps(request, application, version, repoName, commitHash, orgName, env, privateKey);
71
26
 
72
- console.log(GREEN_COLOR, '✅ Source maps updated successfully!');
73
- console.log(GREEN_COLOR, `✅ Total chunk files processed: ${request.files.length}`);
27
+ console.log(GREEN_COLOR, '✅ Source map uploaded successfully!');
28
+ console.log(GREEN_COLOR, `✅ Total files processed: ${totalFiles || 0}`);
74
29
  console.log(GREEN_COLOR, '✅ Processing complete.');
75
30
  } catch (error) {
76
31
  consoleError(error);
77
32
  }
78
33
  }
79
-
80
- static async delete(application: string, version: string, env: string, privateKey: string): Promise<void> {
81
- const request = DeleteSourceMapRequest.create();
82
-
83
- request.application = application;
84
- request.releaseId = version;
85
-
86
- console.log(GRAY_COLOR, '🗑️ Deleting source maps...');
87
-
88
- try {
89
- await SourceMapsApi.deleteSourceMap(request, env, privateKey);
90
-
91
- console.log(GREEN_COLOR, '✅ Source maps deleted successfully!');
92
- } catch (error) {
93
- consoleError(error);
94
- }
95
- }
96
34
  }