grpc-js-reflection-client 1.3.7 → 1.4.0-alpha-1

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 (50) hide show
  1. package/Readme.md +4 -0
  2. package/examples/helpers.js +1 -1
  3. package/examples/otherMethods.ts +1 -1
  4. package/package.json +8 -8
  5. package/dist/Descriptor.d.ts +0 -13
  6. package/dist/Descriptor.js +0 -28
  7. package/dist/Descriptor.js.map +0 -1
  8. package/dist/Exceptions/ReflectionException.d.ts +0 -2
  9. package/dist/Exceptions/ReflectionException.js +0 -7
  10. package/dist/Exceptions/ReflectionException.js.map +0 -1
  11. package/dist/Exceptions/ReflectionRequestException.d.ts +0 -2
  12. package/dist/Exceptions/ReflectionRequestException.js +0 -7
  13. package/dist/Exceptions/ReflectionRequestException.js.map +0 -1
  14. package/dist/Exceptions/index.d.ts +0 -2
  15. package/dist/Exceptions/index.js +0 -19
  16. package/dist/Exceptions/index.js.map +0 -1
  17. package/dist/GrpcReflection.d.ts +0 -23
  18. package/dist/GrpcReflection.js +0 -152
  19. package/dist/GrpcReflection.js.map +0 -1
  20. package/dist/Helpers/index.d.ts +0 -2
  21. package/dist/Helpers/index.js +0 -19
  22. package/dist/Helpers/index.js.map +0 -1
  23. package/dist/Helpers/packageObjectHelper.d.ts +0 -16
  24. package/dist/Helpers/packageObjectHelper.js +0 -13
  25. package/dist/Helpers/packageObjectHelper.js.map +0 -1
  26. package/dist/Helpers/serviceHelper.d.ts +0 -5
  27. package/dist/Helpers/serviceHelper.js +0 -20
  28. package/dist/Helpers/serviceHelper.js.map +0 -1
  29. package/dist/Helpers/serviceHelper.spec.d.ts +0 -1
  30. package/dist/Helpers/serviceHelper.spec.js +0 -73
  31. package/dist/Helpers/serviceHelper.spec.js.map +0 -1
  32. package/dist/Proto/v1.d.ts +0 -299
  33. package/dist/Proto/v1.js +0 -843
  34. package/dist/Proto/v1.js.map +0 -1
  35. package/dist/Proto/v1alpha.d.ts +0 -299
  36. package/dist/Proto/v1alpha.js +0 -843
  37. package/dist/Proto/v1alpha.js.map +0 -1
  38. package/dist/Types/ListMethodsType.d.ts +0 -5
  39. package/dist/Types/ListMethodsType.js +0 -3
  40. package/dist/Types/ListMethodsType.js.map +0 -1
  41. package/dist/Types/getAllExtensionNumbersOfTypeType.d.ts +0 -4
  42. package/dist/Types/getAllExtensionNumbersOfTypeType.js +0 -3
  43. package/dist/Types/getAllExtensionNumbersOfTypeType.js.map +0 -1
  44. package/dist/Types/index.d.ts +0 -1
  45. package/dist/Types/index.js +0 -18
  46. package/dist/Types/index.js.map +0 -1
  47. package/dist/index.d.ts +0 -5
  48. package/dist/index.js +0 -22
  49. package/dist/index.js.map +0 -1
  50. package/dist/tsconfig.tsbuildinfo +0 -1
package/Readme.md CHANGED
@@ -5,6 +5,10 @@ Reflection client for Node/Typescript for @grpc/grpc-js. Working with @grpc/refl
5
5
  Package use Grpc reflection api to download gprc proto descriptor. Now you don't have to add proto file
6
6
  to each package. Simple direct download proto package from example microservice without any files.
7
7
 
8
+ # Upgrades Protobufjs
9
+ - If you want to use `protobufjs >= 8.x.x` use `grpc-js-reflection-client >= 1.4`
10
+ - If you want to use `protobufjs 7.x.x` use `grpc-js-reflection-client < 1.4`
11
+
8
12
  ## Install
9
13
  ```sh
10
14
  npm install grpc-js-reflection-client @grpc/grpc-js
@@ -1,4 +1,4 @@
1
- const { serviceHelper } = require('../');
1
+ const { GrpcReflection } = require('grpc-js-reflection-client');
2
2
  const grpc = require('@grpc/grpc-js');
3
3
 
4
4
  (async()=>{
@@ -24,7 +24,7 @@ try {
24
24
  //console.log(packageDefinition);
25
25
 
26
26
  // Get protobufer descriptor
27
- const buffer = descriptor.getBuffer();
27
+ const buffer = descriptor.getDescriptorBuffer();
28
28
  //console.log(buffer);
29
29
 
30
30
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grpc-js-reflection-client",
3
- "version": "1.3.7",
3
+ "version": "1.4.0-alpha-1",
4
4
  "description": "Package use Grpc reflection api to download grpc proto descriptor. Now you don't have to add proto file to each package. Simple direct download proto package from example microservice without any files.",
5
5
  "author": "gawsoft.com",
6
6
  "main": "dist/index.js",
@@ -14,13 +14,13 @@
14
14
  "prepack": "npm run build",
15
15
  "prepare": "npm run build",
16
16
  "prebuild": "rimraf dist",
17
- "build": "tsc",
17
+ "build": "tsc -p tsconfig.build.json",
18
18
  "release": "bin/release.sh",
19
19
  "test:start-node-server": "ts-node tests/e2e/grpc-node-server-reflection/server.ts",
20
20
  "test:start-node-server2": "ts-node tests/e2e/grpc-node-grpc-reflection-server/server.ts",
21
21
  "test": "jest --forceExit",
22
22
  "test:e2e": "jest --config ./tests/jest-e2e.json --forceExit",
23
- "start:dev": "nodemon --watch './**/*.ts' --exec 'ts-node' src/index.ts"
23
+ "start:dev": "nodemon --watch './**/*.ts' --exec 'ts-node' src/test.ts"
24
24
  },
25
25
  "homepage": "https://gawsoft.com",
26
26
  "repository": {
@@ -33,20 +33,20 @@
33
33
  "dependencies": {
34
34
  "lodash": "^4.18.1",
35
35
  "google-protobuf": "^4.0.2",
36
- "protobufjs": "^7.5.5"
36
+ "protobufjs": "^8.0.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@grpc/reflection": "^1.0.4",
40
40
  "@types/jest": "^30.0.0",
41
- "@types/node": "^25.3.3",
42
- "@types/google-protobuf": "^3.15.12",
41
+ "@types/node": "^25.6.0",
43
42
  "@types/lodash": "^4.17.24",
44
43
  "jest": "^30.2.0",
45
44
  "reflect-metadata": "^0.2.2",
46
45
  "rimraf": "^6.1.3",
47
- "ts-jest": "^29.4.6",
46
+ "ts-jest": "^29.4.9",
47
+ "ts-loader": "^9.5.7",
48
48
  "ts-node": "^10.9.2",
49
- "typescript": "^5.9.3"
49
+ "typescript": "^6.0.3"
50
50
  },
51
51
  "jest": {
52
52
  "moduleFileExtensions": [
@@ -1,13 +0,0 @@
1
- import { Root } from 'protobufjs';
2
- import * as protoLoader from '@grpc/proto-loader';
3
- import * as grpc from '@grpc/grpc-js';
4
- import { PackageDefinition } from "@grpc/proto-loader";
5
- export declare class Descriptor {
6
- private root;
7
- constructor(protoBufJsRoot: Root);
8
- getProtobufJsRoot(): Root;
9
- getDescriptorMessage(protoVersion?: string): import("protobufjs").Message<import("protobufjs/ext/descriptor").IFileDescriptorSet> & import("protobufjs/ext/descriptor").IFileDescriptorSet;
10
- getBuffer(protoVersion?: string): Uint8Array;
11
- getPackageDefinition(options?: protoLoader.Options, protoVersion?: string): PackageDefinition;
12
- getPackageObject(options?: protoLoader.Options): grpc.GrpcObject;
13
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Descriptor = void 0;
4
- const descriptor_1 = require("protobufjs/ext/descriptor");
5
- const protoLoader = require("@grpc/proto-loader");
6
- const grpc = require("@grpc/grpc-js");
7
- class Descriptor {
8
- constructor(protoBufJsRoot) {
9
- this.root = protoBufJsRoot;
10
- }
11
- getProtobufJsRoot() {
12
- return this.root;
13
- }
14
- getDescriptorMessage(protoVersion = "proto3") {
15
- return this.root.toDescriptor(protoVersion);
16
- }
17
- getBuffer(protoVersion = "proto3") {
18
- return descriptor_1.FileDescriptorSet.encode(this.getDescriptorMessage(protoVersion)).finish();
19
- }
20
- getPackageDefinition(options, protoVersion = "proto3") {
21
- return protoLoader.loadFileDescriptorSetFromObject(this.getDescriptorMessage(protoVersion), options);
22
- }
23
- getPackageObject(options) {
24
- return grpc.loadPackageDefinition(this.getPackageDefinition(options));
25
- }
26
- }
27
- exports.Descriptor = Descriptor;
28
- //# sourceMappingURL=Descriptor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Descriptor.js","sourceRoot":"","sources":["../src/Descriptor.ts"],"names":[],"mappings":";;;AACA,0DAEmC;AACnC,kDAAkD;AAClD,sCAAsC;AAGtC,MAAa,UAAU;IAInB,YAAY,cAAoB;QAC5B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC/B,CAAC;IAED,iBAAiB;QACb,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,oBAAoB,CAAC,eAAuB,QAAQ;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED,SAAS,CAAC,eAAuB,QAAQ;QACrC,OAAO,8BAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtF,CAAC;IAED,oBAAoB,CAAC,OAA6B,EAAE,eAAuB,QAAQ;QAC/E,OAAO,WAAW,CAAC,+BAA+B,CAC9C,IAAI,CAAC,oBAAoB,CAAC,YAAY,CAAC,EACvC,OAAO,CACV,CAAC;IACN,CAAC;IAED,gBAAgB,CAAC,OAA6B;QAC1C,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1E,CAAC;CAEJ;AA/BD,gCA+BC"}
@@ -1,2 +0,0 @@
1
- export declare class ReflectionException extends Error {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReflectionException = void 0;
4
- class ReflectionException extends Error {
5
- }
6
- exports.ReflectionException = ReflectionException;
7
- //# sourceMappingURL=ReflectionException.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReflectionException.js","sourceRoot":"","sources":["../../src/Exceptions/ReflectionException.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAoB,SAAQ,KAAK;CAAE;AAAhD,kDAAgD"}
@@ -1,2 +0,0 @@
1
- export declare class ReflectionRequestException extends Error {
2
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReflectionRequestException = void 0;
4
- class ReflectionRequestException extends Error {
5
- }
6
- exports.ReflectionRequestException = ReflectionRequestException;
7
- //# sourceMappingURL=ReflectionRequestException.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReflectionRequestException.js","sourceRoot":"","sources":["../../src/Exceptions/ReflectionRequestException.ts"],"names":[],"mappings":";;;AAAA,MAAa,0BAA2B,SAAQ,KAAK;CAAE;AAAvD,gEAAuD"}
@@ -1,2 +0,0 @@
1
- export * from './ReflectionException';
2
- export * from './ReflectionRequestException';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ReflectionException"), exports);
18
- __exportStar(require("./ReflectionRequestException"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,+DAA6C"}
@@ -1,23 +0,0 @@
1
- import * as grpc from '@grpc/grpc-js';
2
- import { Descriptor } from "./Descriptor";
3
- import { GetAllExtensionNumbersOfType } from "./Types";
4
- import { ListMethodsType } from "./Types/ListMethodsType";
5
- export declare class GrpcReflection {
6
- private client;
7
- private version;
8
- private reflectionRequestConstructor;
9
- constructor(host: string, credentials: any, options?: grpc.ChannelOptions, version?: string);
10
- listServices(prefix?: string, options?: grpc.CallOptions): Promise<Array<string>>;
11
- listMethods(service: string, options?: grpc.CallOptions): Promise<Array<ListMethodsType>>;
12
- protected generateServicePath(service: string): Array<string>;
13
- getServiceMethods(descriptor: grpc.GrpcObject, service: string): Array<ListMethodsType>;
14
- getDescriptorByFileName(file_name: string, options?: grpc.CallOptions): Promise<Descriptor>;
15
- getDescriptorBySymbol(symbol: string, options?: grpc.CallOptions): Promise<Descriptor>;
16
- getAllExtensionNumbersOfType(package_type: string, options?: grpc.CallOptions): Promise<GetAllExtensionNumbersOfType>;
17
- private request;
18
- private resolveFileDescriptorSet;
19
- private resolveDescriptorRecursive;
20
- private getProtoDescriptorBySymbol;
21
- private getProtoDescriptorByFileName;
22
- private setProtoReflectionClient;
23
- }
@@ -1,152 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GrpcReflection = void 0;
4
- const Exceptions_1 = require("./Exceptions");
5
- const protobufjs = require("protobufjs");
6
- const Descriptor_1 = require("./Descriptor");
7
- const descriptor_1 = require("protobufjs/ext/descriptor");
8
- const lodash_1 = require("lodash");
9
- const v1 = require("./Proto/v1");
10
- const v1alpha = require("./Proto/v1alpha");
11
- class GrpcReflection {
12
- constructor(host, credentials, options = {}, version = "v1alpha") {
13
- this.version = version;
14
- this.setProtoReflectionClient(host, credentials, options);
15
- }
16
- async listServices(prefix = '*', options = {}) {
17
- const response = await this.request({
18
- listServices: prefix
19
- }, options);
20
- return response.listServicesResponse.service.map(service => service.name);
21
- }
22
- async listMethods(service, options = {}) {
23
- const descriptor = await this.getDescriptorBySymbol(service, options);
24
- const packageObject = descriptor.getPackageObject({
25
- keepCase: true,
26
- enums: String,
27
- longs: String
28
- });
29
- return this.getServiceMethods(packageObject, service);
30
- }
31
- generateServicePath(service) {
32
- return service.split('.').reverse();
33
- }
34
- getServiceMethods(descriptor, service) {
35
- let anti_recursive = 0;
36
- let actualDescriptor = descriptor;
37
- const path = this.generateServicePath(service);
38
- do {
39
- const serviceName = path.pop();
40
- if (serviceName && serviceName in actualDescriptor) {
41
- actualDescriptor = actualDescriptor[serviceName];
42
- }
43
- anti_recursive++;
44
- } while (path.length > 0 && anti_recursive < 100);
45
- if ('service' in actualDescriptor) {
46
- return Object.entries(actualDescriptor.service)
47
- .map(([methodName, methodDefinition]) => ({
48
- name: methodName,
49
- definition: methodDefinition
50
- }));
51
- }
52
- throw new Exceptions_1.ReflectionRequestException('Not found service');
53
- }
54
- async getDescriptorByFileName(file_name, options = {}) {
55
- const descriptor = await this.getProtoDescriptorByFileName(file_name, options);
56
- return await this.resolveFileDescriptorSet(descriptor, options);
57
- }
58
- async getDescriptorBySymbol(symbol, options = {}) {
59
- const descriptor = await this.getProtoDescriptorBySymbol(symbol, options);
60
- return await this.resolveFileDescriptorSet(descriptor, options);
61
- }
62
- async getAllExtensionNumbersOfType(package_type, options = {}) {
63
- const response = await this.request({
64
- allExtensionNumbersOfType: package_type
65
- }, options);
66
- return {
67
- base_type_name: response.allExtensionNumbersResponse.baseTypeName,
68
- extension_number: typeof (response.allExtensionNumbersResponse.extensionNumber) !== "undefined" ? response.allExtensionNumbersResponse.extensionNumber : []
69
- };
70
- }
71
- async request(payload, options) {
72
- return new Promise((resolve, reject) => {
73
- const payloadObject = this.reflectionRequestConstructor(payload);
74
- const call = this.client.ServerReflectionInfo(options);
75
- call.on('data', (data) => {
76
- if (data.errorResponse) {
77
- reject(new Exceptions_1.ReflectionRequestException(data.errorResponse.errorMessage));
78
- return;
79
- }
80
- resolve(data);
81
- });
82
- call.on('error', (err) => {
83
- reject(new Exceptions_1.ReflectionRequestException(err));
84
- });
85
- call.on('end', () => { });
86
- call.write(payloadObject);
87
- call.end();
88
- });
89
- }
90
- async resolveFileDescriptorSet(fileDescriptorProtoBytes, options) {
91
- const fileDescriptorSet = descriptor_1.FileDescriptorSet.create();
92
- const fileDescriptorProtos = await this.resolveDescriptorRecursive(fileDescriptorProtoBytes, options);
93
- (0, lodash_1.set)(fileDescriptorSet, 'file', Array.from(fileDescriptorProtos.values()));
94
- return new Descriptor_1.Descriptor(protobufjs.Root.fromDescriptor(fileDescriptorSet));
95
- }
96
- async resolveDescriptorRecursive(fileDescriptorProtoBytes, options) {
97
- let fileDescriptorProtos = new Map();
98
- let needsDependencyResolution = new Set();
99
- for (const item of fileDescriptorProtoBytes) {
100
- const fileDescriptorProto = descriptor_1.FileDescriptorProto.decode(item);
101
- if (fileDescriptorProto.dependency) {
102
- const dependencies = fileDescriptorProto.dependency;
103
- for (const dep of dependencies) {
104
- needsDependencyResolution.add(dep);
105
- }
106
- }
107
- if (!fileDescriptorProtos.has(fileDescriptorProto.name)) {
108
- fileDescriptorProtos.set(fileDescriptorProto.name, fileDescriptorProto);
109
- }
110
- }
111
- for (const dep of needsDependencyResolution) {
112
- if (fileDescriptorProtos.has(dep)) {
113
- continue;
114
- }
115
- const depProtoBytes = await this.getProtoDescriptorByFileName(dep, options);
116
- const protoDependencies = await this.resolveDescriptorRecursive(depProtoBytes, options);
117
- fileDescriptorProtos = new Map([
118
- ...fileDescriptorProtos,
119
- ...protoDependencies,
120
- ]);
121
- }
122
- return fileDescriptorProtos;
123
- }
124
- async getProtoDescriptorBySymbol(symbol, options) {
125
- const response = await this.request({
126
- fileContainingSymbol: symbol
127
- }, options);
128
- return response.fileDescriptorResponse.fileDescriptorProto;
129
- }
130
- async getProtoDescriptorByFileName(file_name, options) {
131
- const response = await this.request({
132
- fileByFilename: file_name
133
- }, options);
134
- return response.fileDescriptorResponse.fileDescriptorProto;
135
- }
136
- setProtoReflectionClient(host, credentials, options = {}) {
137
- switch (this.version) {
138
- case 'v1':
139
- this.client = new v1.grpc.reflection.v1.ServerReflectionClient(host, credentials, options);
140
- this.reflectionRequestConstructor = v1.grpc.reflection.v1.ServerReflectionRequest.fromObject;
141
- break;
142
- case 'v1alpha':
143
- this.client = new v1alpha.grpc.reflection.v1alpha.ServerReflectionClient(host, credentials, options);
144
- this.reflectionRequestConstructor = v1alpha.grpc.reflection.v1alpha.ServerReflectionRequest.fromObject;
145
- break;
146
- default:
147
- throw new Exceptions_1.ReflectionRequestException('Unknown proto version available: [v1, v1alpha]');
148
- }
149
- }
150
- }
151
- exports.GrpcReflection = GrpcReflection;
152
- //# sourceMappingURL=GrpcReflection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GrpcReflection.js","sourceRoot":"","sources":["../src/GrpcReflection.ts"],"names":[],"mappings":";;;AACA,6CAA0D;AAC1D,yCAAyC;AACzC,6CAA0C;AAE1C,0DAImC;AACnC,mCAA6B;AAG7B,iCAAkC;AAClC,2CAA4C;AAG5C,MAAa,cAAc;IAKvB,YACI,IAAY,EACZ,WAAgB,EAChB,UAA+B,EAAE,EACjC,UAAkB,SAAS;QAE3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAQD,KAAK,CAAC,YAAY,CAAC,SAAiB,GAAG,EAAE,UAA4B,EAAE;QACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;YAChC,YAAY,EAAE,MAAM;SACvB,EAAE,OAAO,CAAC,CAAC;QACZ,OAAO,QAAQ,CAAC,oBAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,UAA4B,EAAE;QAG7D,MAAM,UAAU,GAAe,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClF,MAAM,aAAa,GAAG,UAAU,CAAC,gBAAgB,CAAC;YAC9C,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,MAAM;SAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAQS,mB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EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,sBAAsB,CAC1D,IAAI,EACJ,WAAW,EACX,OAAO,CACV,CAAC;gBACF,IAAI,CAAC,4BAA4B,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,uBAAuB,CAAC,UAAU,CAAC;gBAC7F,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,sBAAsB,CACpE,IAAI,EACJ,WAAW,EACX,OAAO,CACV,CAAC;gBACF,IAAI,CAAC,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC;gBACvG,MAAM;YACV;gBACI,MAAM,IAAI,uCAA0B,CAAC,gDAAgD,CAAC,CAAA;QAC1F,CAAC;IACT,CAAC;CACJ;AA7QD,wCA6QC"}
@@ -1,2 +0,0 @@
1
- export * from './packageObjectHelper';
2
- export * from './serviceHelper';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./packageObjectHelper"), exports);
18
- __exportStar(require("./serviceHelper"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,kDAA+B"}
@@ -1,16 +0,0 @@
1
- import { ChannelCredentials, GrpcObject } from "@grpc/grpc-js";
2
- import { Options } from "@grpc/proto-loader";
3
- type DescriptorServiceHelperOptionsByProtoFileName = {
4
- proto_filename: string;
5
- };
6
- type DescriptorServiceHelperOptionsByProtoSymbol = {
7
- proto_symbol: string;
8
- };
9
- type DescriptorServiceHelperOptionsSelector = DescriptorServiceHelperOptionsByProtoFileName | DescriptorServiceHelperOptionsByProtoSymbol;
10
- export type DescriptorServiceHelperOptions = {
11
- host: string;
12
- credentials: ChannelCredentials;
13
- protoLoaderOptions?: Options;
14
- } & DescriptorServiceHelperOptionsSelector;
15
- export declare const packageObjectHelper: <T = GrpcObject>(options: DescriptorServiceHelperOptions) => Promise<T>;
16
- export {};
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.packageObjectHelper = void 0;
4
- const GrpcReflection_1 = require("../GrpcReflection");
5
- const packageObjectHelper = async (options) => {
6
- const client = new GrpcReflection_1.GrpcReflection(options.host, options.credentials);
7
- const descriptor = 'proto_filename' in options
8
- ? await client.getDescriptorByFileName(options.proto_filename)
9
- : await client.getDescriptorBySymbol(options.proto_symbol);
10
- return descriptor.getPackageObject(options.protoLoaderOptions);
11
- };
12
- exports.packageObjectHelper = packageObjectHelper;
13
- //# sourceMappingURL=packageObjectHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"packageObjectHelper.js","sourceRoot":"","sources":["../../src/Helpers/packageObjectHelper.ts"],"names":[],"mappings":";;;AAEA,sDAAiD;AAmC1C,MAAM,mBAAmB,GAAG,KAAK,EAAe,OAAuC,EAAe,EAAE;IAG3G,MAAM,MAAM,GAAG,IAAI,+BAAc,CAC7B,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,CACtB,CAAC;IAGF,MAAM,UAAU,GACZ,gBAAgB,IAAI,OAAO;QACvB,CAAC,CAAC,MAAM,MAAM,CAAC,uBAAuB,CAAC,OAAO,CAAC,cAAc,CAAC;QAC9D,CAAC,CAAC,MAAM,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAGnE,OAAO,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,kBAAkB,CAAM,CAAC;AACxE,CAAC,CAAA;AAhBY,QAAA,mBAAmB,uBAgB/B"}
@@ -1,5 +0,0 @@
1
- import { DescriptorServiceHelperOptions } from "./packageObjectHelper";
2
- export type ServiceHelperOptionsType = {
3
- servicePath: string;
4
- } & DescriptorServiceHelperOptions;
5
- export declare const serviceHelper: <T>(options: ServiceHelperOptionsType) => Promise<T>;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serviceHelper = void 0;
4
- const packageObjectHelper_1 = require("./packageObjectHelper");
5
- const serviceHelper = async (options) => {
6
- const packageObject = await (0, packageObjectHelper_1.packageObjectHelper)(options);
7
- const pathToService = options.servicePath.split('.');
8
- let service = packageObject;
9
- let concatenatePath = [];
10
- do {
11
- const servicePath = pathToService.shift();
12
- concatenatePath.push(servicePath);
13
- if (!(servicePath in service))
14
- throw new Error(`Wrong servicePath ${concatenatePath.join('.')} do not exists in packageObject. Try method: listServices in GrpcReflection class to list all services in grpc server`);
15
- service = service[servicePath];
16
- } while (pathToService.length > 0);
17
- return new service(options.host, options.credentials);
18
- };
19
- exports.serviceHelper = serviceHelper;
20
- //# sourceMappingURL=serviceHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serviceHelper.js","sourceRoot":"","sources":["../../src/Helpers/serviceHelper.ts"],"names":[],"mappings":";;;AAAA,+DAA0F;AAsBnF,MAAM,aAAa,GAAG,KAAK,EAAI,OAAiC,EAAc,EAAE;IAEnF,MAAM,aAAa,GAAG,MAAM,IAAA,yCAAmB,EAAC,OAAO,CAAC,CAAC;IAEzD,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,IAAI,OAAO,GAAQ,aAAa,CAAC;IACjC,IAAI,eAAe,GAAG,EAAE,CAAC;IACzB,GAAG,CAAC;QACA,MAAM,WAAW,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;QAC1C,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,CAAC,CAAC,WAAW,IAAI,OAAO,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,uHAAuH,CAAC,CAAC;QACtN,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC,QAAM,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;IAGjC,OAAO,IAAI,OAAO,CACd,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,WAAW,CACtB,CAAC;AACN,CAAC,CAAA;AAnBY,QAAA,aAAa,iBAmBzB"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const grpc = require("@grpc/grpc-js");
4
- const proto_loader_1 = require("@grpc/proto-loader");
5
- const path_1 = require("path");
6
- jest.mock('./packageObjectHelper', () => {
7
- const originalModule = jest.requireActual('./packageObjectHelper');
8
- originalModule.packageObjectHelper = jest.fn().mockImplementation((options) => {
9
- const packageDefinition = (0, proto_loader_1.loadSync)((0, path_1.join)(__dirname, `../../tests/protos/${options['proto_filename']}`), options.protoLoaderOptions);
10
- return grpc.loadPackageDefinition(packageDefinition);
11
- });
12
- return Object.assign({ __esModule: true }, originalModule);
13
- });
14
- const serviceHelper_1 = require("./serviceHelper");
15
- describe("Test Helpers", () => {
16
- it('Should return grpc service for addressbook', (done) => {
17
- (0, serviceHelper_1.serviceHelper)({
18
- host: "localhost:545f4",
19
- servicePath: "addressbook.AddressesService",
20
- credentials: grpc.ChannelCredentials.createInsecure(),
21
- proto_filename: 'addressbook.proto',
22
- protoLoaderOptions: {
23
- keepCase: true
24
- }
25
- }).then(d => {
26
- expect(d['Add']).toBeDefined();
27
- done();
28
- });
29
- });
30
- it('Should return grpc service for helloworld', (done) => {
31
- (0, serviceHelper_1.serviceHelper)({
32
- host: "localhost:545f4",
33
- servicePath: "helloworld.Greeter",
34
- credentials: grpc.ChannelCredentials.createInsecure(),
35
- proto_filename: 'helloworld.proto',
36
- protoLoaderOptions: {
37
- keepCase: true
38
- }
39
- }).then(proto => {
40
- expect(proto['SayHello']).toBeDefined();
41
- done();
42
- });
43
- });
44
- it('Should raise exception on wrong servicePath', (done) => {
45
- (0, serviceHelper_1.serviceHelper)({
46
- host: "localhost:545f4",
47
- servicePath: "addressbook.WrongServiceName",
48
- credentials: grpc.ChannelCredentials.createInsecure(),
49
- proto_filename: 'addressbook.proto',
50
- protoLoaderOptions: {
51
- keepCase: true
52
- }
53
- }).catch(e => {
54
- expect(e.message).toContain('Wrong servicePath');
55
- done();
56
- });
57
- });
58
- it('Should raise exception on wrong servicePath #2', (done) => {
59
- (0, serviceHelper_1.serviceHelper)({
60
- host: "localhost:545f4",
61
- servicePath: "addressbook.AddressesService.WrongServicename",
62
- credentials: grpc.ChannelCredentials.createInsecure(),
63
- proto_filename: 'addressbook.proto',
64
- protoLoaderOptions: {
65
- keepCase: true
66
- }
67
- }).catch(e => {
68
- expect(e.message).toContain('Wrong servicePath addressbook.AddressesService.WrongServicename');
69
- done();
70
- });
71
- });
72
- });
73
- //# sourceMappingURL=serviceHelper.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serviceHelper.spec.js","sourceRoot":"","sources":["../../src/Helpers/serviceHelper.spec.ts"],"names":[],"mappings":";;AAAA,sCAAsC;AACtC,qDAA8C;AAC9C,+BAA4B;AAE5B,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAA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