@coralogix/rum-cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/.eslintrc.js +31 -0
- package/.github/workflows/npm-publish.yml +41 -0
- package/README.md +59 -0
- package/api/rum-api.ts +73 -0
- package/cli/rum-cli.ts +79 -0
- package/cli/utils/traverse-folder.util.ts +33 -0
- package/config/config.ts +31 -0
- package/config/index.js +7 -0
- package/config/index.ts +3 -0
- package/dist/api/rum-api.d.ts +2 -0
- package/dist/api/rum-api.js +86 -0
- package/dist/cli/rum-cli.d.ts +3 -0
- package/dist/cli/rum-cli.js +77 -0
- package/dist/cli/utils/traverse-folder.util.d.ts +2 -0
- package/dist/cli/utils/traverse-folder.util.js +42 -0
- package/dist/config/config.d.ts +16 -0
- package/dist/config/config.js +16 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +8 -0
- package/dist/model/cli.model.d.ts +1 -0
- package/dist/model/cli.model.js +13 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/audit_log.d.ts +24 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/audit_log.js +62 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/chunk.d.ts +43 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/chunk.js +252 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/file.d.ts +26 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/file.js +140 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/rum_service.d.ts +69 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/rum_service.js +190 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/rum_source_map_service.d.ts +66 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/rum_source_map_service.js +145 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/source_code_file_mapping.d.ts +54 -0
- package/dist/src/app/proto-models/com/coralogix/rum/v2/source_code_file_mapping.js +264 -0
- package/dist/src/app/proto-models/google/protobuf/descriptor.d.ts +1140 -0
- package/dist/src/app/proto-models/google/protobuf/descriptor.js +3612 -0
- package/generate-protos.sh +14 -0
- package/meta.yaml +4 -0
- package/model/cli.model.ts +9 -0
- package/package.json +46 -0
- package/prepublish.sh +19 -0
- package/protofetch.lock +18 -0
- package/protofetch.toml +7 -0
- package/protos/com/coralogix/rum/v2/audit_log.proto +13 -0
- package/protos/com/coralogix/rum/v2/chunk.proto +18 -0
- package/protos/com/coralogix/rum/v2/file.proto +8 -0
- package/protos/com/coralogix/rum/v2/rum_service.proto +20 -0
- package/protos/com/coralogix/rum/v2/rum_source_map_service.proto +16 -0
- package/protos/com/coralogix/rum/v2/source_code_file_mapping.proto +15 -0
- package/protoset.bin +0 -0
- package/src/app/proto-models/com/coralogix/rum/v2/audit_log.ts +76 -0
- package/src/app/proto-models/com/coralogix/rum/v2/chunk.ts +298 -0
- package/src/app/proto-models/com/coralogix/rum/v2/file.ts +164 -0
- package/src/app/proto-models/com/coralogix/rum/v2/rum_service.ts +223 -0
- package/src/app/proto-models/com/coralogix/rum/v2/rum_source_map_service.ts +174 -0
- package/src/app/proto-models/com/coralogix/rum/v2/source_code_file_mapping.ts +316 -0
- package/src/app/proto-models/google/protobuf/descriptor.ts +4715 -0
- package/tsconfig.build.json +6 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import Long from "long";
|
|
3
|
+
import _m0 from "protobufjs/minimal";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "com.coralogix.rum.v2";
|
|
6
|
+
|
|
7
|
+
export interface FileMetadata {
|
|
8
|
+
chunkName: string;
|
|
9
|
+
size: number;
|
|
10
|
+
content: Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function createBaseFileMetadata(): FileMetadata {
|
|
14
|
+
return { chunkName: "", size: 0, content: new Uint8Array() };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const FileMetadata = {
|
|
18
|
+
encode(message: FileMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
19
|
+
if (message.chunkName !== "") {
|
|
20
|
+
writer.uint32(10).string(message.chunkName);
|
|
21
|
+
}
|
|
22
|
+
if (message.size !== 0) {
|
|
23
|
+
writer.uint32(16).int64(message.size);
|
|
24
|
+
}
|
|
25
|
+
if (message.content.length !== 0) {
|
|
26
|
+
writer.uint32(26).bytes(message.content);
|
|
27
|
+
}
|
|
28
|
+
return writer;
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FileMetadata {
|
|
32
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
33
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBaseFileMetadata();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
case 1:
|
|
39
|
+
if (tag !== 10) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message.chunkName = reader.string();
|
|
44
|
+
continue;
|
|
45
|
+
case 2:
|
|
46
|
+
if (tag !== 16) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message.size = longToNumber(reader.int64() as Long);
|
|
51
|
+
continue;
|
|
52
|
+
case 3:
|
|
53
|
+
if (tag !== 26) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message.content = reader.bytes();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
reader.skipType(tag & 7);
|
|
64
|
+
}
|
|
65
|
+
return message;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
fromJSON(object: any): FileMetadata {
|
|
69
|
+
return {
|
|
70
|
+
chunkName: isSet(object.chunkName) ? String(object.chunkName) : "",
|
|
71
|
+
size: isSet(object.size) ? Number(object.size) : 0,
|
|
72
|
+
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(),
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
toJSON(message: FileMetadata): unknown {
|
|
77
|
+
const obj: any = {};
|
|
78
|
+
message.chunkName !== undefined && (obj.chunkName = message.chunkName);
|
|
79
|
+
message.size !== undefined && (obj.size = Math.round(message.size));
|
|
80
|
+
message.content !== undefined &&
|
|
81
|
+
(obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array()));
|
|
82
|
+
return obj;
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
create(base?: DeepPartial<FileMetadata>): FileMetadata {
|
|
86
|
+
return FileMetadata.fromPartial(base ?? {});
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
fromPartial(object: DeepPartial<FileMetadata>): FileMetadata {
|
|
90
|
+
const message = createBaseFileMetadata();
|
|
91
|
+
message.chunkName = object.chunkName ?? "";
|
|
92
|
+
message.size = object.size ?? 0;
|
|
93
|
+
message.content = object.content ?? new Uint8Array();
|
|
94
|
+
return message;
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
declare var self: any | undefined;
|
|
99
|
+
declare var window: any | undefined;
|
|
100
|
+
declare var global: any | undefined;
|
|
101
|
+
var tsProtoGlobalThis: any = (() => {
|
|
102
|
+
if (typeof globalThis !== "undefined") {
|
|
103
|
+
return globalThis;
|
|
104
|
+
}
|
|
105
|
+
if (typeof self !== "undefined") {
|
|
106
|
+
return self;
|
|
107
|
+
}
|
|
108
|
+
if (typeof window !== "undefined") {
|
|
109
|
+
return window;
|
|
110
|
+
}
|
|
111
|
+
if (typeof global !== "undefined") {
|
|
112
|
+
return global;
|
|
113
|
+
}
|
|
114
|
+
throw "Unable to locate global object";
|
|
115
|
+
})();
|
|
116
|
+
|
|
117
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
118
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
119
|
+
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
|
120
|
+
} else {
|
|
121
|
+
const bin = tsProtoGlobalThis.atob(b64);
|
|
122
|
+
const arr = new Uint8Array(bin.length);
|
|
123
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
124
|
+
arr[i] = bin.charCodeAt(i);
|
|
125
|
+
}
|
|
126
|
+
return arr;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
131
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
132
|
+
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
|
133
|
+
} else {
|
|
134
|
+
const bin: string[] = [];
|
|
135
|
+
arr.forEach((byte) => {
|
|
136
|
+
bin.push(String.fromCharCode(byte));
|
|
137
|
+
});
|
|
138
|
+
return tsProtoGlobalThis.btoa(bin.join(""));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
143
|
+
|
|
144
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
145
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
146
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
147
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
148
|
+
: Partial<T>;
|
|
149
|
+
|
|
150
|
+
function longToNumber(long: Long): number {
|
|
151
|
+
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
152
|
+
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
153
|
+
}
|
|
154
|
+
return long.toNumber();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (_m0.util.Long !== Long) {
|
|
158
|
+
_m0.util.Long = Long as any;
|
|
159
|
+
_m0.configure();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function isSet(value: any): boolean {
|
|
163
|
+
return value !== null && value !== undefined;
|
|
164
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Chunk, MappedChunk } from "./chunk";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "com.coralogix.rum.v2";
|
|
6
|
+
|
|
7
|
+
export interface GetMappedStackTraceRequest {
|
|
8
|
+
application: string;
|
|
9
|
+
releaseId: string;
|
|
10
|
+
chunks: Chunk[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface GetMappedStackTraceResponse {
|
|
14
|
+
application: string;
|
|
15
|
+
releaseId: string;
|
|
16
|
+
mappedChunks: MappedChunk[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function createBaseGetMappedStackTraceRequest(): GetMappedStackTraceRequest {
|
|
20
|
+
return { application: "", releaseId: "", chunks: [] };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const GetMappedStackTraceRequest = {
|
|
24
|
+
encode(message: GetMappedStackTraceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
25
|
+
if (message.application !== "") {
|
|
26
|
+
writer.uint32(10).string(message.application);
|
|
27
|
+
}
|
|
28
|
+
if (message.releaseId !== "") {
|
|
29
|
+
writer.uint32(18).string(message.releaseId);
|
|
30
|
+
}
|
|
31
|
+
for (const v of message.chunks) {
|
|
32
|
+
Chunk.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
33
|
+
}
|
|
34
|
+
return writer;
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetMappedStackTraceRequest {
|
|
38
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
39
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
40
|
+
const message = createBaseGetMappedStackTraceRequest();
|
|
41
|
+
while (reader.pos < end) {
|
|
42
|
+
const tag = reader.uint32();
|
|
43
|
+
switch (tag >>> 3) {
|
|
44
|
+
case 1:
|
|
45
|
+
if (tag !== 10) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message.application = reader.string();
|
|
50
|
+
continue;
|
|
51
|
+
case 2:
|
|
52
|
+
if (tag !== 18) {
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message.releaseId = reader.string();
|
|
57
|
+
continue;
|
|
58
|
+
case 3:
|
|
59
|
+
if (tag !== 26) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message.chunks.push(Chunk.decode(reader, reader.uint32()));
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
reader.skipType(tag & 7);
|
|
70
|
+
}
|
|
71
|
+
return message;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
fromJSON(object: any): GetMappedStackTraceRequest {
|
|
75
|
+
return {
|
|
76
|
+
application: isSet(object.application) ? String(object.application) : "",
|
|
77
|
+
releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
|
|
78
|
+
chunks: Array.isArray(object?.chunks) ? object.chunks.map((e: any) => Chunk.fromJSON(e)) : [],
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
toJSON(message: GetMappedStackTraceRequest): unknown {
|
|
83
|
+
const obj: any = {};
|
|
84
|
+
message.application !== undefined && (obj.application = message.application);
|
|
85
|
+
message.releaseId !== undefined && (obj.releaseId = message.releaseId);
|
|
86
|
+
if (message.chunks) {
|
|
87
|
+
obj.chunks = message.chunks.map((e) => e ? Chunk.toJSON(e) : undefined);
|
|
88
|
+
} else {
|
|
89
|
+
obj.chunks = [];
|
|
90
|
+
}
|
|
91
|
+
return obj;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
create(base?: DeepPartial<GetMappedStackTraceRequest>): GetMappedStackTraceRequest {
|
|
95
|
+
return GetMappedStackTraceRequest.fromPartial(base ?? {});
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
fromPartial(object: DeepPartial<GetMappedStackTraceRequest>): GetMappedStackTraceRequest {
|
|
99
|
+
const message = createBaseGetMappedStackTraceRequest();
|
|
100
|
+
message.application = object.application ?? "";
|
|
101
|
+
message.releaseId = object.releaseId ?? "";
|
|
102
|
+
message.chunks = object.chunks?.map((e) => Chunk.fromPartial(e)) || [];
|
|
103
|
+
return message;
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
function createBaseGetMappedStackTraceResponse(): GetMappedStackTraceResponse {
|
|
108
|
+
return { application: "", releaseId: "", mappedChunks: [] };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const GetMappedStackTraceResponse = {
|
|
112
|
+
encode(message: GetMappedStackTraceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
113
|
+
if (message.application !== "") {
|
|
114
|
+
writer.uint32(10).string(message.application);
|
|
115
|
+
}
|
|
116
|
+
if (message.releaseId !== "") {
|
|
117
|
+
writer.uint32(18).string(message.releaseId);
|
|
118
|
+
}
|
|
119
|
+
for (const v of message.mappedChunks) {
|
|
120
|
+
MappedChunk.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
121
|
+
}
|
|
122
|
+
return writer;
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetMappedStackTraceResponse {
|
|
126
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
127
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
128
|
+
const message = createBaseGetMappedStackTraceResponse();
|
|
129
|
+
while (reader.pos < end) {
|
|
130
|
+
const tag = reader.uint32();
|
|
131
|
+
switch (tag >>> 3) {
|
|
132
|
+
case 1:
|
|
133
|
+
if (tag !== 10) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
message.application = reader.string();
|
|
138
|
+
continue;
|
|
139
|
+
case 2:
|
|
140
|
+
if (tag !== 18) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message.releaseId = reader.string();
|
|
145
|
+
continue;
|
|
146
|
+
case 3:
|
|
147
|
+
if (tag !== 26) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message.mappedChunks.push(MappedChunk.decode(reader, reader.uint32()));
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
reader.skipType(tag & 7);
|
|
158
|
+
}
|
|
159
|
+
return message;
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
fromJSON(object: any): GetMappedStackTraceResponse {
|
|
163
|
+
return {
|
|
164
|
+
application: isSet(object.application) ? String(object.application) : "",
|
|
165
|
+
releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
|
|
166
|
+
mappedChunks: Array.isArray(object?.mappedChunks)
|
|
167
|
+
? object.mappedChunks.map((e: any) => MappedChunk.fromJSON(e))
|
|
168
|
+
: [],
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
toJSON(message: GetMappedStackTraceResponse): unknown {
|
|
173
|
+
const obj: any = {};
|
|
174
|
+
message.application !== undefined && (obj.application = message.application);
|
|
175
|
+
message.releaseId !== undefined && (obj.releaseId = message.releaseId);
|
|
176
|
+
if (message.mappedChunks) {
|
|
177
|
+
obj.mappedChunks = message.mappedChunks.map((e) => e ? MappedChunk.toJSON(e) : undefined);
|
|
178
|
+
} else {
|
|
179
|
+
obj.mappedChunks = [];
|
|
180
|
+
}
|
|
181
|
+
return obj;
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
create(base?: DeepPartial<GetMappedStackTraceResponse>): GetMappedStackTraceResponse {
|
|
185
|
+
return GetMappedStackTraceResponse.fromPartial(base ?? {});
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
fromPartial(object: DeepPartial<GetMappedStackTraceResponse>): GetMappedStackTraceResponse {
|
|
189
|
+
const message = createBaseGetMappedStackTraceResponse();
|
|
190
|
+
message.application = object.application ?? "";
|
|
191
|
+
message.releaseId = object.releaseId ?? "";
|
|
192
|
+
message.mappedChunks = object.mappedChunks?.map((e) => MappedChunk.fromPartial(e)) || [];
|
|
193
|
+
return message;
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export type RumServiceDefinition = typeof RumServiceDefinition;
|
|
198
|
+
export const RumServiceDefinition = {
|
|
199
|
+
name: "RumService",
|
|
200
|
+
fullName: "com.coralogix.rum.v2.RumService",
|
|
201
|
+
methods: {
|
|
202
|
+
getMappedStackTrace: {
|
|
203
|
+
name: "GetMappedStackTrace",
|
|
204
|
+
requestType: GetMappedStackTraceRequest,
|
|
205
|
+
requestStream: false,
|
|
206
|
+
responseType: GetMappedStackTraceResponse,
|
|
207
|
+
responseStream: false,
|
|
208
|
+
options: {},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
} as const;
|
|
212
|
+
|
|
213
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
214
|
+
|
|
215
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
216
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
217
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
218
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
219
|
+
: Partial<T>;
|
|
220
|
+
|
|
221
|
+
function isSet(value: any): boolean {
|
|
222
|
+
return value !== null && value !== undefined;
|
|
223
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { FileMetadata } from "./file";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "com.coralogix.rum.v2";
|
|
6
|
+
|
|
7
|
+
export interface UploadSourceMapsRequest {
|
|
8
|
+
application: string;
|
|
9
|
+
releaseId: string;
|
|
10
|
+
files: FileMetadata[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UploadSourceMapsResponse {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createBaseUploadSourceMapsRequest(): UploadSourceMapsRequest {
|
|
17
|
+
return { application: "", releaseId: "", files: [] };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const UploadSourceMapsRequest = {
|
|
21
|
+
encode(message: UploadSourceMapsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
22
|
+
if (message.application !== "") {
|
|
23
|
+
writer.uint32(10).string(message.application);
|
|
24
|
+
}
|
|
25
|
+
if (message.releaseId !== "") {
|
|
26
|
+
writer.uint32(18).string(message.releaseId);
|
|
27
|
+
}
|
|
28
|
+
for (const v of message.files) {
|
|
29
|
+
FileMetadata.encode(v!, writer.uint32(34).fork()).ldelim();
|
|
30
|
+
}
|
|
31
|
+
return writer;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UploadSourceMapsRequest {
|
|
35
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBaseUploadSourceMapsRequest();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1:
|
|
42
|
+
if (tag !== 10) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message.application = reader.string();
|
|
47
|
+
continue;
|
|
48
|
+
case 2:
|
|
49
|
+
if (tag !== 18) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message.releaseId = reader.string();
|
|
54
|
+
continue;
|
|
55
|
+
case 4:
|
|
56
|
+
if (tag !== 34) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message.files.push(FileMetadata.decode(reader, reader.uint32()));
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
reader.skipType(tag & 7);
|
|
67
|
+
}
|
|
68
|
+
return message;
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
fromJSON(object: any): UploadSourceMapsRequest {
|
|
72
|
+
return {
|
|
73
|
+
application: isSet(object.application) ? String(object.application) : "",
|
|
74
|
+
releaseId: isSet(object.releaseId) ? String(object.releaseId) : "",
|
|
75
|
+
files: Array.isArray(object?.files) ? object.files.map((e: any) => FileMetadata.fromJSON(e)) : [],
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
toJSON(message: UploadSourceMapsRequest): unknown {
|
|
80
|
+
const obj: any = {};
|
|
81
|
+
message.application !== undefined && (obj.application = message.application);
|
|
82
|
+
message.releaseId !== undefined && (obj.releaseId = message.releaseId);
|
|
83
|
+
if (message.files) {
|
|
84
|
+
obj.files = message.files.map((e) => e ? FileMetadata.toJSON(e) : undefined);
|
|
85
|
+
} else {
|
|
86
|
+
obj.files = [];
|
|
87
|
+
}
|
|
88
|
+
return obj;
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
create(base?: DeepPartial<UploadSourceMapsRequest>): UploadSourceMapsRequest {
|
|
92
|
+
return UploadSourceMapsRequest.fromPartial(base ?? {});
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
fromPartial(object: DeepPartial<UploadSourceMapsRequest>): UploadSourceMapsRequest {
|
|
96
|
+
const message = createBaseUploadSourceMapsRequest();
|
|
97
|
+
message.application = object.application ?? "";
|
|
98
|
+
message.releaseId = object.releaseId ?? "";
|
|
99
|
+
message.files = object.files?.map((e) => FileMetadata.fromPartial(e)) || [];
|
|
100
|
+
return message;
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
function createBaseUploadSourceMapsResponse(): UploadSourceMapsResponse {
|
|
105
|
+
return {};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const UploadSourceMapsResponse = {
|
|
109
|
+
encode(_: UploadSourceMapsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
110
|
+
return writer;
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UploadSourceMapsResponse {
|
|
114
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
115
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
116
|
+
const message = createBaseUploadSourceMapsResponse();
|
|
117
|
+
while (reader.pos < end) {
|
|
118
|
+
const tag = reader.uint32();
|
|
119
|
+
switch (tag >>> 3) {
|
|
120
|
+
}
|
|
121
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
reader.skipType(tag & 7);
|
|
125
|
+
}
|
|
126
|
+
return message;
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
fromJSON(_: any): UploadSourceMapsResponse {
|
|
130
|
+
return {};
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
toJSON(_: UploadSourceMapsResponse): unknown {
|
|
134
|
+
const obj: any = {};
|
|
135
|
+
return obj;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
create(base?: DeepPartial<UploadSourceMapsResponse>): UploadSourceMapsResponse {
|
|
139
|
+
return UploadSourceMapsResponse.fromPartial(base ?? {});
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
fromPartial(_: DeepPartial<UploadSourceMapsResponse>): UploadSourceMapsResponse {
|
|
143
|
+
const message = createBaseUploadSourceMapsResponse();
|
|
144
|
+
return message;
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export type RumSourceMapServiceDefinition = typeof RumSourceMapServiceDefinition;
|
|
149
|
+
export const RumSourceMapServiceDefinition = {
|
|
150
|
+
name: "RumSourceMapService",
|
|
151
|
+
fullName: "com.coralogix.rum.v2.RumSourceMapService",
|
|
152
|
+
methods: {
|
|
153
|
+
uploadSourceMaps: {
|
|
154
|
+
name: "UploadSourceMaps",
|
|
155
|
+
requestType: UploadSourceMapsRequest,
|
|
156
|
+
requestStream: false,
|
|
157
|
+
responseType: UploadSourceMapsResponse,
|
|
158
|
+
responseStream: false,
|
|
159
|
+
options: {},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
} as const;
|
|
163
|
+
|
|
164
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
165
|
+
|
|
166
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
167
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
168
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
169
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
170
|
+
: Partial<T>;
|
|
171
|
+
|
|
172
|
+
function isSet(value: any): boolean {
|
|
173
|
+
return value !== null && value !== undefined;
|
|
174
|
+
}
|