diff --git a/package.json b/package.json index 04dbf29ba6d..369e4ba64b4 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "npm-run-all": "4.1.5", "npm-watch": "0.11.0", "prettier": "2.1.2", - "protoc-gen-ts": "0.4.0", + "protoc-gen-ts": "0.6.0", "run-time-error": "1.4.0", "secp256k1": "4.0.2", "shebang-loader": "0.0.1", diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts index b7e69f9aaac..dd3c86b2d03 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/google/protobuf/empty.ts @@ -13,6 +13,10 @@ export namespace google.protobuf { pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], []); if (!Array.isArray(data) && typeof data == "object") { } } + static fromObject(data: {}) { + const message = new Empty({}); + return message; + } toObject() { const data: {} = {}; return data; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts index 14065d3222c..bf488d209e9 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/health_check_response_pb.ts @@ -46,6 +46,23 @@ export namespace org.hyperledger.cactus.cmd_api_server { set memoryUsage(value: dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB) { pb_1.Message.setWrapperField(this, 335792418, value); } + static fromObject(data: { + success?: boolean; + createdAt?: string; + memoryUsage?: ReturnType; + }) { + const message = new HealthCheckResponsePB({}); + if (data.success != null) { + message.success = data.success; + } + if (data.createdAt != null) { + message.createdAt = data.createdAt; + } + if (data.memoryUsage != null) { + message.memoryUsage = dependency_1.org.hyperledger.cactus.cmd_api_server.MemoryUsagePB.fromObject(data.memoryUsage); + } + return message; + } toObject() { const data: { success?: boolean; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts index ee17b4c3718..3936d155f26 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/models/memory_usage_pb.ts @@ -65,6 +65,31 @@ export namespace org.hyperledger.cactus.cmd_api_server { set arrayBuffers(value: number) { pb_1.Message.setField(this, 116952168, value); } + static fromObject(data: { + rss?: number; + heapTotal?: number; + heapUsed?: number; + external?: number; + arrayBuffers?: number; + }) { + const message = new MemoryUsagePB({}); + if (data.rss != null) { + message.rss = data.rss; + } + if (data.heapTotal != null) { + message.heapTotal = data.heapTotal; + } + if (data.heapUsed != null) { + message.heapUsed = data.heapUsed; + } + if (data.external != null) { + message.external = data.external; + } + if (data.arrayBuffers != null) { + message.arrayBuffers = data.arrayBuffers; + } + return message; + } toObject() { const data: { rss?: number; diff --git a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts index de628e92b3b..e97b1ec5646 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/generated/proto/protoc-gen-ts/services/default_service.ts @@ -28,6 +28,15 @@ export namespace org.hyperledger.cactus.cmd_api_server { set data(value: string) { pb_1.Message.setField(this, 1, value); } + static fromObject(data: { + data?: string; + }) { + const message = new GetPrometheusMetricsV1Response({}); + if (data.data != null) { + message.data = data.data; + } + return message; + } toObject() { const data: { data?: string; diff --git a/yarn.lock b/yarn.lock index e2901365c77..b483ad20507 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19641,10 +19641,10 @@ protobufjs@6.11.2, protobufjs@^6.10.0, protobufjs@^6.10.2, protobufjs@^6.11.2: "@types/node" ">=13.7.0" long "^4.0.0" -protoc-gen-ts@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.4.0.tgz#4be7e2086dc32db15f01733a7a200793f1e1081a" - integrity sha512-TUoAT45fC9Fpcbp+rOdjzUPytnYkV8YR0xQ9atZi69RNV2/if600cDxBPXXbujGIegTmiEaUkQIz4Rrk2lOyUQ== +protoc-gen-ts@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/protoc-gen-ts/-/protoc-gen-ts-0.6.0.tgz#a2c3e117ae43fa7821a7f46dee25fb6d20d12565" + integrity sha512-bO9uI49c1IyYW0r+yyydtsYknY+U/QFOePbvcoikB4zPEGBtZwDXwMEPbpCn14U+DqeNAMlzb3IuuUQGORnk1w== protocols@^1.1.0, protocols@^1.4.0: version "1.4.8"