@coralogix/rum-cli 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +5 -1
  2. package/assets/docs-illustration.png +0 -0
  3. package/package.json +4 -1
  4. package/.eslintignore +0 -1
  5. package/.eslintrc.js +0 -31
  6. package/.github/workflows/npm-publish.yml +0 -41
  7. package/api/rum-api.ts +0 -79
  8. package/cli/rum-cli.ts +0 -54
  9. package/cli/theme/index.ts +0 -5
  10. package/cli/validators/index.ts +0 -14
  11. package/config/config.ts +0 -31
  12. package/config/index.js +0 -7
  13. package/config/index.ts +0 -3
  14. package/dist/api/rum-api.d.ts +0 -5
  15. package/dist/api/rum-api.js +0 -98
  16. package/dist/cli/rum-cli.d.ts +0 -2
  17. package/dist/cli/theme/index.d.ts +0 -3
  18. package/dist/cli/theme/index.js +0 -7
  19. package/dist/cli/validators/index.d.ts +0 -1
  20. package/dist/cli/validators/index.js +0 -16
  21. package/dist/config/config.d.ts +0 -16
  22. package/dist/config/config.js +0 -16
  23. package/dist/config/index.d.ts +0 -2
  24. package/dist/config/index.js +0 -8
  25. package/dist/model/cli.model.d.ts +0 -1
  26. package/dist/model/cli.model.js +0 -11
  27. package/dist/proto-models/com/coralogix/rum/v2/audit_log.d.ts +0 -24
  28. package/dist/proto-models/com/coralogix/rum/v2/audit_log.js +0 -62
  29. package/dist/proto-models/com/coralogix/rum/v2/chunk.d.ts +0 -56
  30. package/dist/proto-models/com/coralogix/rum/v2/chunk.js +0 -330
  31. package/dist/proto-models/com/coralogix/rum/v2/file.d.ts +0 -26
  32. package/dist/proto-models/com/coralogix/rum/v2/file.js +0 -140
  33. package/dist/proto-models/com/coralogix/rum/v2/rum_service.d.ts +0 -72
  34. package/dist/proto-models/com/coralogix/rum/v2/rum_service.js +0 -233
  35. package/dist/proto-models/com/coralogix/rum/v2/rum_source_map_service.d.ts +0 -69
  36. package/dist/proto-models/com/coralogix/rum/v2/rum_source_map_service.js +0 -181
  37. package/dist/proto-models/com/coralogix/rum/v2/source_code_file_mapping.d.ts +0 -55
  38. package/dist/proto-models/com/coralogix/rum/v2/source_code_file_mapping.js +0 -277
  39. package/dist/proto-models/google/protobuf/descriptor.d.ts +0 -1140
  40. package/dist/proto-models/google/protobuf/descriptor.js +0 -3612
  41. package/dist/services/source-maps/source-maps.service.d.ts +0 -3
  42. package/dist/services/source-maps/source-maps.service.js +0 -42
  43. package/dist/services/source-maps/utils/traverse-folder.util.d.ts +0 -2
  44. package/dist/services/source-maps/utils/traverse-folder.util.js +0 -42
  45. package/generate-protos.sh +0 -14
  46. package/meta.yaml +0 -4
  47. package/model/cli.model.ts +0 -7
  48. package/prepublish.sh +0 -19
  49. package/proto-models/com/coralogix/rum/v2/audit_log.ts +0 -76
  50. package/proto-models/com/coralogix/rum/v2/chunk.ts +0 -391
  51. package/proto-models/com/coralogix/rum/v2/file.ts +0 -164
  52. package/proto-models/com/coralogix/rum/v2/rum_service.ts +0 -272
  53. package/proto-models/com/coralogix/rum/v2/rum_source_map_service.ts +0 -216
  54. package/proto-models/com/coralogix/rum/v2/source_code_file_mapping.ts +0 -331
  55. package/proto-models/google/protobuf/descriptor.ts +0 -4715
  56. package/protofetch.lock +0 -18
  57. package/protofetch.toml +0 -7
  58. package/protos/com/coralogix/rum/v2/audit_log.proto +0 -13
  59. package/protos/com/coralogix/rum/v2/chunk.proto +0 -24
  60. package/protos/com/coralogix/rum/v2/file.proto +0 -8
  61. package/protos/com/coralogix/rum/v2/rum_service.proto +0 -23
  62. package/protos/com/coralogix/rum/v2/rum_source_map_service.proto +0 -19
  63. package/protos/com/coralogix/rum/v2/source_code_file_mapping.proto +0 -16
  64. package/protoset.bin +0 -0
  65. package/services/source-maps/source-maps.service.ts +0 -31
  66. package/services/source-maps/utils/traverse-folder.util.ts +0 -33
  67. package/tsconfig.build.json +0 -6
  68. package/tsconfig.json +0 -25
@@ -1,3 +0,0 @@
1
- export declare class SourceMapsService {
2
- static upload(application: string, releaseId: string, repoName: string, commitHash: string, orgName: string, folderPath: string, env: string, privateKey: string): Promise<void>;
3
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SourceMapsService = void 0;
13
- const rum_source_map_service_1 = require("../../proto-models/com/coralogix/rum/v2/rum_source_map_service");
14
- const traverse_folder_util_1 = require("./utils/traverse-folder.util");
15
- const rum_api_1 = require("../../api/rum-api");
16
- const theme_1 = require("../../cli/theme");
17
- class SourceMapsService {
18
- static upload(application, releaseId, repoName, commitHash, orgName, folderPath, env, privateKey) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- const request = rum_source_map_service_1.UploadSourceMapsRequest.create();
21
- request.application = application;
22
- request.releaseId = releaseId;
23
- request.repoName = repoName;
24
- request.commitHash = commitHash;
25
- request.user = orgName;
26
- console.log(theme_1.GRAY_COLOR, '🚀 Uploading source maps...');
27
- try {
28
- yield (0, traverse_folder_util_1.traverseFolder)(folderPath, request);
29
- yield rum_api_1.RumApi.uploadSourceMaps(request, env, privateKey);
30
- console.log(theme_1.GREEN_COLOR, '✅ Source maps uploaded successfully!');
31
- console.log(theme_1.GREEN_COLOR, `✅ Total chunk files processed: ${request.files.length}`);
32
- console.log(theme_1.GREEN_COLOR, '✅ Processing complete.');
33
- }
34
- catch (error) {
35
- console.log(theme_1.RED_COLOR, '❌ An error occurred');
36
- console.error(theme_1.RED_COL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YCk7XG4gICAgICAgICAgICBjb25zb2xlLmxvZyhHUkVFTl9DT0xPUiwgJ+KchSBQcm9jZXNzaW5nIGNvbXBsZXRlLicpO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY29uc29sZS5sb2coUkVEX0NPTE9SLCAn4p2MIEFuIGVycm9yIG9jY3VycmVkJyk7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFJFRF9DT0xPUiwgZXJyb3IpO1xuICAgICAgICB9XG4gICAgfVxufSJdfQ==
@@ -1,2 +0,0 @@
1
- import { UploadSourceMapsRequest } from "../../../proto-models/com/coralogix/rum/v2/rum_source_map_service";
2
- export declare const traverseFolder: (folderPath: string, request: UploadSourceMapsRequest) => Promise<void>;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.traverseFolder = void 0;
16
- const fs_1 = require("fs");
17
- const path_1 = __importDefault(require("path"));
18
- const { readdir, stat, readFile } = fs_1.promises;
19
- const traverseFolder = (folderPath, request) => __awaiter(void 0, void 0, void 0, function* () {
20
- const stack = [folderPath];
21
- while (stack.length) {
22
- const currentPath = stack.pop();
23
- const entries = yield readdir(currentPath, { withFileTypes: true });
24
- yield Promise.all(entries.map((file) => __awaiter(void 0, void 0, void 0, function* () {
25
- const { name } = file;
26
- const entryPath = path_1.default.join(currentPath, name);
27
- const isDotMapFile = file.isFile() && name.endsWith('.js.map');
28
- if (file.isDirectory())
29
- stack.push(entryPath);
30
- else if (isDotMapFile)
31
- request.files.push(yield getFileMetadata(entryPath));
32
- })));
33
- }
34
- });
35
- exports.traverseFolder = traverseFolder;
36
- const getFileMetadata = (filePath) => __awaiter(void 0, void 0, void 0, function* () {
37
- const { size } = yield stat(filePath);
38
- const { name } = path_1.default.parse(filePath);
39
- const content = yield readFile(filePath);
40
- return { chunkName: name, size, content };
41
- });
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhdmVyc2UtZm9sZGVyLnV0aWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zZXJ2aWNlcy9zb3VyY2UtbWFwcy91dGlscy90cmF2ZXJzZS1mb2xkZXIudXRpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSwyQkFBa0Q7QUFDbEQsZ0RBQXdCO0FBSXhCLE1BQU0sRUFBQyxPQUFPLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBQyxHQUFHLGFBQVUsQ0FBQztBQUV0QyxNQUFNLGNBQWMsR0FBRyxDQUFPLFVBQWtCLEVBQUUsT0FBZ0MsRUFBaUIsRUFBRTtJQUN4RyxNQUFNLEtBQUssR0FBYSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBRXJDLE9BQU8sS0FBSyxDQUFDLE1BQU0sRUFBRTtRQUNqQixNQUFNLFdBQVcsR0FBRyxLQUFLLENBQUMsR0FBRyxFQUFFLENBQUM7UUFDaEMsTUFBTSxPQUFPLEdBQWEsTUFBTSxPQUFPLENBQUMsV0FBWSxFQUFFLEVBQUMsYUFBYSxFQUFFLElBQUksRUFBQyxDQUFDLENBQUM7UUFFN0UsTUFBTSxPQUFPLENBQUMsR0FBRyxDQU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1xuICAgICAgICAgICAgY29uc3QgaXNEb3RNYXBGaWxlID0gZmlsZS5pc0ZpbGUoKSAmJiBuYW1lLmVuZHNXaXRoKCcuanMubWFwJyk7XG5cbiAgICAgICAgICAgIGlmIChmaWxlLmlzRGlyZWN0b3J5KCkpIHN0YWNrLnB1c2goZW50cnlQYXRoKTtcblxuICAgICAgICAgICAgZWxzZSBpZiAoaXNEb3RNYXBGaWxlKSByZXF1ZXN0LmZpbGVzLnB1c2goYXdhaXQgZ2V0RmlsZU1ldGFkYXRhKGVudHJ5UGF0aCkpO1xuICAgICAgICB9KSk7XG4gICAgfVxufVxuXG5jb25zdCBnZXRGaWxlTWV0YWRhdGEgPSBhc3luYyAoZmlsZVBhdGg6IHN0cmluZyk6IFByb21pc2U8RmlsZU1ldGFkYXRhPiA9PiB7XG4gICAgY29uc3Qge3NpemV9ID0gYXdhaXQgc3RhdChmaWxlUGF0aCk7XG4gICAgY29uc3Qge25hbWV9ID0gcGF0aC5wYXJzZShmaWxlUGF0aCk7XG4gICAgY29uc3QgY29udGVudCA9IGF3YWl0IHJlYWRGaWxlKGZpbGVQYXRoKTtcblxuICAgIHJldHVybiB7Y2h1bmtOYW1lOiBuYW1lLCBzaXplLCBjb250ZW50fTtcbn1cbiJdfQ==
@@ -1,14 +0,0 @@
1
- if [ -d "./proto-models" ]; then rm -Rf ./proto-models; fi
2
- mkdir -p ./proto-models
3
-
4
- protofetch fetch -f
5
-
6
- ./node_modules/.bin/grpc_tools_node_protoc \
7
- --plugin=protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \
8
- --ts_proto_out=./proto-models \
9
- --descriptor_set_out=./protoset.bin --include_imports \
10
- --ts_proto_opt=oneof=unions \
11
- --ts_proto_opt=unrecognizedEnum=false \
12
- --ts_proto_opt=outputServices=generic-definitions,useExactTypes=false,esModuleInterop=true,outputClientImpl=false \
13
- -I ./node_modules/google-proto-files \
14
- --proto_path=./protos -I ./protos $(find ./protos -iname "*.proto")
package/meta.yaml DELETED
@@ -1,4 +0,0 @@
1
- name: corlogix-rum-cli
2
- CX_PRODUCT: frontend-infra
3
- deployable_type: library
4
- code_language: nodejs
@@ -1,7 +0,0 @@
1
- export const envToDomain: Record<string, string> = {
2
- US1: 'https://ng-api-grpc.coralogix.us:443',
3
- EU1: 'https://ng-api-grpc.coralogix.com:443',
4
- EU2: 'https://ng-api-grpc.eu2.coralogix.com:443',
5
- AP1: 'https://ng-api-grpc.app.coralogix.in:443',
6
- AP2: 'https://ng-api-grpc.coralogix.com:443',
7
- }
package/prepublish.sh DELETED
@@ -1,19 +0,0 @@
1
- #!/bin/sh
2
-
3
- # Set environment variables
4
- export SSH_KNOWN_HOSTS=/tmp/known_hosts
5
- export npm_config_userconfig=/run/secrets/npmrc
6
-
7
- # Switch to the 'node' user
8
- su node << EOF
9
- # Add GitHub to known hosts
10
- ssh-keyscan github.com >> /tmp/known_hosts
11
-
12
- # Install dependencies
13
- npm install --userconfig /run/secrets/npmrc
14
-
15
- # Run 'go-install' and 'proto'
16
- npm run go-install
17
- npm run proto
18
- EOF
19
-
@@ -1,76 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
-
4
- export const protobufPackage = "com.coralogix.rum.v2";
5
-
6
- export interface AuditLogDescription {
7
- description?: string | undefined;
8
- }
9
-
10
- function createBaseAuditLogDescription(): AuditLogDescription {
11
- return { description: undefined };
12
- }
13
-
14
- export const AuditLogDescription = {
15
- encode(message: AuditLogDescription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
16
- if (message.description !== undefined) {
17
- writer.uint32(10).string(message.description);
18
- }
19
- return writer;
20
- },
21
-
22
- decode(input: _m0.Reader | Uint8Array, length?: number): AuditLogDescription {
23
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
24
- let end = length === undefined ? reader.len : reader.pos + length;
25
- const message = createBaseAuditLogDescription();
26
- while (reader.pos < end) {
27
- const tag = reader.uint32();
28
- switch (tag >>> 3) {
29
- case 1:
30
- if (tag !== 10) {
31
- break;
32
- }
33
-
34
- message.description = reader.string();
35
- continue;
36
- }
37
- if ((tag & 7) === 4 || tag === 0) {
38
- break;
39
- }
40
- reader.skipType(tag & 7);
41
- }
42
- return message;
43
- },
44
-
45
- fromJSON(object: any): AuditLogDescription {
46
- return { description: isSet(object.description) ? String(object.description) : undefined };
47
- },
48
-
49
- toJSON(message: AuditLogDescription): unknown {
50
- const obj: any = {};
51
- message.description !== undefined && (obj.description = message.description);
52
- return obj;
53
- },
54
-
55
- create(base?: DeepPartial<AuditLogDescription>): AuditLogDescription {
56
- return AuditLogDescription.fromPartial(base ?? {});
57
- },
58
-
59
- fromPartial(object: DeepPartial<AuditLogDescription>): AuditLogDescription {
60
- const message = createBaseAuditLogDescription();
61
- message.description = object.description ?? undefined;
62
- return message;
63
- },
64
- };
65
-
66
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
67
-
68
- export type DeepPartial<T> = T extends Builtin ? T
69
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
70
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
71
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
72
- : Partial<T>;
73
-
74
- function isSet(value: any): boolean {
75
- return value !== null && value !== undefined;
76
- }
@@ -1,391 +0,0 @@
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 Chunk {
8
- chunkName: string;
9
- generatedLineNumber: number;
10
- generatedColumnNumber: number;
11
- }
12
-
13
- export interface CodeLine {
14
- lineIndex: number;
15
- lineCode: string;
16
- }
17
-
18
- export interface MappedChunk {
19
- chunkName: string;
20
- originalLineNumber: number;
21
- originalColumnNumber: number;
22
- sourceFileName: string;
23
- sourceCodeLines: CodeLine[];
24
- generatedLineNumber: number;
25
- generatedColumnNumber: number;
26
- sourceFunctionName: string;
27
- }
28
-
29
- function createBaseChunk(): Chunk {
30
- return { chunkName: "", generatedLineNumber: 0, generatedColumnNumber: 0 };
31
- }
32
-
33
- export const Chunk = {
34
- encode(message: Chunk, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
35
- if (message.chunkName !== "") {
36
- writer.uint32(10).string(message.chunkName);
37
- }
38
- if (message.generatedLineNumber !== 0) {
39
- writer.uint32(16).int64(message.generatedLineNumber);
40
- }
41
- if (message.generatedColumnNumber !== 0) {
42
- writer.uint32(24).int64(message.generatedColumnNumber);
43
- }
44
- return writer;
45
- },
46
-
47
- decode(input: _m0.Reader | Uint8Array, length?: number): Chunk {
48
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
49
- let end = length === undefined ? reader.len : reader.pos + length;
50
- const message = createBaseChunk();
51
- while (reader.pos < end) {
52
- const tag = reader.uint32();
53
- switch (tag >>> 3) {
54
- case 1:
55
- if (tag !== 10) {
56
- break;
57
- }
58
-
59
- message.chunkName = reader.string();
60
- continue;
61
- case 2:
62
- if (tag !== 16) {
63
- break;
64
- }
65
-
66
- message.generatedLineNumber = longToNumber(reader.int64() as Long);
67
- continue;
68
- case 3:
69
- if (tag !== 24) {
70
- break;
71
- }
72
-
73
- message.generatedColumnNumber = longToNumber(reader.int64() as Long);
74
- continue;
75
- }
76
- if ((tag & 7) === 4 || tag === 0) {
77
- break;
78
- }
79
- reader.skipType(tag & 7);
80
- }
81
- return message;
82
- },
83
-
84
- fromJSON(object: any): Chunk {
85
- return {
86
- chunkName: isSet(object.chunkName) ? String(object.chunkName) : "",
87
- generatedLineNumber: isSet(object.generatedLineNumber) ? Number(object.generatedLineNumber) : 0,
88
- generatedColumnNumber: isSet(object.generatedColumnNumber) ? Number(object.generatedColumnNumber) : 0,
89
- };
90
- },
91
-
92
- toJSON(message: Chunk): unknown {
93
- const obj: any = {};
94
- message.chunkName !== undefined && (obj.chunkName = message.chunkName);
95
- message.generatedLineNumber !== undefined && (obj.generatedLineNumber = Math.round(message.generatedLineNumber));
96
- message.generatedColumnNumber !== undefined &&
97
- (obj.generatedColumnNumber = Math.round(message.generatedColumnNumber));
98
- return obj;
99
- },
100
-
101
- create(base?: DeepPartial<Chunk>): Chunk {
102
- return Chunk.fromPartial(base ?? {});
103
- },
104
-
105
- fromPartial(object: DeepPartial<Chunk>): Chunk {
106
- const message = createBaseChunk();
107
- message.chunkName = object.chunkName ?? "";
108
- message.generatedLineNumber = object.generatedLineNumber ?? 0;
109
- message.generatedColumnNumber = object.generatedColumnNumber ?? 0;
110
- return message;
111
- },
112
- };
113
-
114
- function createBaseCodeLine(): CodeLine {
115
- return { lineIndex: 0, lineCode: "" };
116
- }
117
-
118
- export const CodeLine = {
119
- encode(message: CodeLine, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
120
- if (message.lineIndex !== 0) {
121
- writer.uint32(16).int64(message.lineIndex);
122
- }
123
- if (message.lineCode !== "") {
124
- writer.uint32(10).string(message.lineCode);
125
- }
126
- return writer;
127
- },
128
-
129
- decode(input: _m0.Reader | Uint8Array, length?: number): CodeLine {
130
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
131
- let end = length === undefined ? reader.len : reader.pos + length;
132
- const message = createBaseCodeLine();
133
- while (reader.pos < end) {
134
- const tag = reader.uint32();
135
- switch (tag >>> 3) {
136
- case 2:
137
- if (tag !== 16) {
138
- break;
139
- }
140
-
141
- message.lineIndex = longToNumber(reader.int64() as Long);
142
- continue;
143
- case 1:
144
- if (tag !== 10) {
145
- break;
146
- }
147
-
148
- message.lineCode = reader.string();
149
- continue;
150
- }
151
- if ((tag & 7) === 4 || tag === 0) {
152
- break;
153
- }
154
- reader.skipType(tag & 7);
155
- }
156
- return message;
157
- },
158
-
159
- fromJSON(object: any): CodeLine {
160
- return {
161
- lineIndex: isSet(object.lineIndex) ? Number(object.lineIndex) : 0,
162
- lineCode: isSet(object.lineCode) ? String(object.lineCode) : "",
163
- };
164
- },
165
-
166
- toJSON(message: CodeLine): unknown {
167
- const obj: any = {};
168
- message.lineIndex !== undefined && (obj.lineIndex = Math.round(message.lineIndex));
169
- message.lineCode !== undefined && (obj.lineCode = message.lineCode);
170
- return obj;
171
- },
172
-
173
- create(base?: DeepPartial<CodeLine>): CodeLine {
174
- return CodeLine.fromPartial(base ?? {});
175
- },
176
-
177
- fromPartial(object: DeepPartial<CodeLine>): CodeLine {
178
- const message = createBaseCodeLine();
179
- message.lineIndex = object.lineIndex ?? 0;
180
- message.lineCode = object.lineCode ?? "";
181
- return message;
182
- },
183
- };
184
-
185
- function createBaseMappedChunk(): MappedChunk {
186
- return {
187
- chunkName: "",
188
- originalLineNumber: 0,
189
- originalColumnNumber: 0,
190
- sourceFileName: "",
191
- sourceCodeLines: [],
192
- generatedLineNumber: 0,
193
- generatedColumnNumber: 0,
194
- sourceFunctionName: "",
195
- };
196
- }
197
-
198
- export const MappedChunk = {
199
- encode(message: MappedChunk, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
200
- if (message.chunkName !== "") {
201
- writer.uint32(10).string(message.chunkName);
202
- }
203
- if (message.originalLineNumber !== 0) {
204
- writer.uint32(16).int64(message.originalLineNumber);
205
- }
206
- if (message.originalColumnNumber !== 0) {
207
- writer.uint32(24).int64(message.originalColumnNumber);
208
- }
209
- if (message.sourceFileName !== "") {
210
- writer.uint32(34).string(message.sourceFileName);
211
- }
212
- for (const v of message.sourceCodeLines) {
213
- CodeLine.encode(v!, writer.uint32(42).fork()).ldelim();
214
- }
215
- if (message.generatedLineNumber !== 0) {
216
- writer.uint32(48).int64(message.generatedLineNumber);
217
- }
218
- if (message.generatedColumnNumber !== 0) {
219
- writer.uint32(56).int64(message.generatedColumnNumber);
220
- }
221
- if (message.sourceFunctionName !== "") {
222
- writer.uint32(66).string(message.sourceFunctionName);
223
- }
224
- return writer;
225
- },
226
-
227
- decode(input: _m0.Reader | Uint8Array, length?: number): MappedChunk {
228
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
229
- let end = length === undefined ? reader.len : reader.pos + length;
230
- const message = createBaseMappedChunk();
231
- while (reader.pos < end) {
232
- const tag = reader.uint32();
233
- switch (tag >>> 3) {
234
- case 1:
235
- if (tag !== 10) {
236
- break;
237
- }
238
-
239
- message.chunkName = reader.string();
240
- continue;
241
- case 2:
242
- if (tag !== 16) {
243
- break;
244
- }
245
-
246
- message.originalLineNumber = longToNumber(reader.int64() as Long);
247
- continue;
248
- case 3:
249
- if (tag !== 24) {
250
- break;
251
- }
252
-
253
- message.originalColumnNumber = longToNumber(reader.int64() as Long);
254
- continue;
255
- case 4:
256
- if (tag !== 34) {
257
- break;
258
- }
259
-
260
- message.sourceFileName = reader.string();
261
- continue;
262
- case 5:
263
- if (tag !== 42) {
264
- break;
265
- }
266
-
267
- message.sourceCodeLines.push(CodeLine.decode(reader, reader.uint32()));
268
- continue;
269
- case 6:
270
- if (tag !== 48) {
271
- break;
272
- }
273
-
274
- message.generatedLineNumber = longToNumber(reader.int64() as Long);
275
- continue;
276
- case 7:
277
- if (tag !== 56) {
278
- break;
279
- }
280
-
281
- message.generatedColumnNumber = longToNumber(reader.int64() as Long);
282
- continue;
283
- case 8:
284
- if (tag !== 66) {
285
- break;
286
- }
287
-
288
- message.sourceFunctionName = reader.string();
289
- continue;
290
- }
291
- if ((tag & 7) === 4 || tag === 0) {
292
- break;
293
- }
294
- reader.skipType(tag & 7);
295
- }
296
- return message;
297
- },
298
-
299
- fromJSON(object: any): MappedChunk {
300
- return {
301
- chunkName: isSet(object.chunkName) ? String(object.chunkName) : "",
302
- originalLineNumber: isSet(object.originalLineNumber) ? Number(object.originalLineNumber) : 0,
303
- originalColumnNumber: isSet(object.originalColumnNumber) ? Number(object.originalColumnNumber) : 0,
304
- sourceFileName: isSet(object.sourceFileName) ? String(object.sourceFileName) : "",
305
- sourceCodeLines: Array.isArray(object?.sourceCodeLines)
306
- ? object.sourceCodeLines.map((e: any) => CodeLine.fromJSON(e))
307
- : [],
308
- generatedLineNumber: isSet(object.generatedLineNumber) ? Number(object.generatedLineNumber) : 0,
309
- generatedColumnNumber: isSet(object.generatedColumnNumber) ? Number(object.generatedColumnNumber) : 0,
310
- sourceFunctionName: isSet(object.sourceFunctionName) ? String(object.sourceFunctionName) : "",
311
- };
312
- },
313
-
314
- toJSON(message: MappedChunk): unknown {
315
- const obj: any = {};
316
- message.chunkName !== undefined && (obj.chunkName = message.chunkName);
317
- message.originalLineNumber !== undefined && (obj.originalLineNumber = Math.round(message.originalLineNumber));
318
- message.originalColumnNumber !== undefined && (obj.originalColumnNumber = Math.round(message.originalColumnNumber));
319
- message.sourceFileName !== undefined && (obj.sourceFileName = message.sourceFileName);
320
- if (message.sourceCodeLines) {
321
- obj.sourceCodeLines = message.sourceCodeLines.map((e) => e ? CodeLine.toJSON(e) : undefined);
322
- } else {
323
- obj.sourceCodeLines = [];
324
- }
325
- message.generatedLineNumber !== undefined && (obj.generatedLineNumber = Math.round(message.generatedLineNumber));
326
- message.generatedColumnNumber !== undefined &&
327
- (obj.generatedColumnNumber = Math.round(message.generatedColumnNumber));
328
- message.sourceFunctionName !== undefined && (obj.sourceFunctionName = message.sourceFunctionName);
329
- return obj;
330
- },
331
-
332
- create(base?: DeepPartial<MappedChunk>): MappedChunk {
333
- return MappedChunk.fromPartial(base ?? {});
334
- },
335
-
336
- fromPartial(object: DeepPartial<MappedChunk>): MappedChunk {
337
- const message = createBaseMappedChunk();
338
- message.chunkName = object.chunkName ?? "";
339
- message.originalLineNumber = object.originalLineNumber ?? 0;
340
- message.originalColumnNumber = object.originalColumnNumber ?? 0;
341
- message.sourceFileName = object.sourceFileName ?? "";
342
- message.sourceCodeLines = object.sourceCodeLines?.map((e) => CodeLine.fromPartial(e)) || [];
343
- message.generatedLineNumber = object.generatedLineNumber ?? 0;
344
- message.generatedColumnNumber = object.generatedColumnNumber ?? 0;
345
- message.sourceFunctionName = object.sourceFunctionName ?? "";
346
- return message;
347
- },
348
- };
349
-
350
- declare var self: any | undefined;
351
- declare var window: any | undefined;
352
- declare var global: any | undefined;
353
- var tsProtoGlobalThis: any = (() => {
354
- if (typeof globalThis !== "undefined") {
355
- return globalThis;
356
- }
357
- if (typeof self !== "undefined") {
358
- return self;
359
- }
360
- if (typeof window !== "undefined") {
361
- return window;
362
- }
363
- if (typeof global !== "undefined") {
364
- return global;
365
- }
366
- throw "Unable to locate global object";
367
- })();
368
-
369
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
370
-
371
- export type DeepPartial<T> = T extends Builtin ? T
372
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
373
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
374
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
375
- : Partial<T>;
376
-
377
- function longToNumber(long: Long): number {
378
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
379
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
380
- }
381
- return long.toNumber();
382
- }
383
-
384
- if (_m0.util.Long !== Long) {
385
- _m0.util.Long = Long as any;
386
- _m0.configure();
387
- }
388
-
389
- function isSet(value: any): boolean {
390
- return value !== null && value !== undefined;
391
- }