@gravity-ui/gateway 1.2.2 → 1.3.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.
package/README.md CHANGED
@@ -265,7 +265,6 @@ The cache key for reflections consists of `protoKey` and `endpoint`. Therefore,
265
265
 
266
266
  This function is experimental. Fixes have been applied to `protobufjs` using [patch-package](https://github.com/ds300/patch-package) based on the following PRs:
267
267
 
268
- - Fix for duplicated field [PR 1784](https://github.com/protobufjs/protobuf.js/pull/1784)
269
268
  - Conversion of parameter names to camelCase [PR 1073](https://github.com/protobufjs/protobuf.js/pull/1073)
270
269
  - Fix for handling Map [PR 1478](https://github.com/protobufjs/protobuf.js/pull/1478)
271
270
  grpc-reflection-js has also been patched to support custom options.
package/bin/patch.js CHANGED
@@ -1,13 +1,12 @@
1
1
  #! /usr/bin/env node
2
2
  const {execSync} = require('child_process');
3
- const {copyFileSync, mkdirSync} = require('fs');
4
- mkdirSync('patches', {recursive: true});
5
- copyFileSync(
6
- 'node_modules/@gravity-ui/gateway/patches/grpc-reflection-js+0.1.2.patch',
7
- 'patches/grpc-reflection-js+0.1.2.patch',
8
- );
9
- copyFileSync(
10
- 'node_modules/@gravity-ui/gateway/patches/protobufjs+6.11.3.patch',
11
- 'patches/protobufjs+6.11.3.patch',
3
+ const {copyFileSync, mkdirSync, readdirSync, rmSync} = require('fs');
4
+ const srcPatchesDir = 'node_modules/@gravity-ui/gateway/patches';
5
+ const dstPatchesDir = 'patches';
6
+
7
+ mkdirSync(dstPatchesDir, {recursive: true});
8
+ readdirSync(dstPatchesDir).forEach((patch) => rmSync(`${dstPatchesDir}/${patch}`));
9
+ readdirSync(srcPatchesDir).forEach((patch) =>
10
+ copyFileSync(`${srcPatchesDir}/${patch}`, `${dstPatchesDir}/${patch}`),
12
11
  );
13
12
  execSync('npx patch-package', {stdio: 'inherit'});
@@ -11,7 +11,7 @@ function getCachedClient(actionEndpoint, credentials, descriptorExtensionProto)
11
11
  let client = reflectionClientsMap[actionEndpoint];
12
12
  if (!client) {
13
13
  const grpcReflection = require('grpc-reflection-js');
14
- client = new grpcReflection.Client(actionEndpoint, credentials, undefined, descriptorExtensionProto);
14
+ client = new grpcReflection.Client(actionEndpoint, credentials, undefined, undefined, descriptorExtensionProto);
15
15
  reflectionClientsMap[actionEndpoint] = client;
16
16
  }
17
17
  return client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/gateway",
3
- "version": "1.2.2",
3
+ "version": "1.3.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/index.js",
@@ -37,14 +37,14 @@
37
37
  "test-integration-no-server": "jest --colors --config=jest.config-integration.js"
38
38
  },
39
39
  "dependencies": {
40
- "@grpc/grpc-js": "^1.9.7",
41
- "@grpc/proto-loader": "^0.6.13",
40
+ "@grpc/grpc-js": "^1.9.9",
41
+ "@grpc/proto-loader": "^0.7.8",
42
42
  "ajv": "^8.12.0",
43
43
  "axios": "^1.3.5",
44
44
  "axios-retry": "^3.4.0",
45
45
  "lodash": "^4.17.21",
46
46
  "object-sizeof": "^2.6.1",
47
- "protobufjs": "^6.11.3",
47
+ "protobufjs": "^7.2.5",
48
48
  "uuid": "^9.0.0"
49
49
  },
50
50
  "devDependencies": {
@@ -61,7 +61,7 @@
61
61
  "axios-mock-adapter": "^1.21.2",
62
62
  "eslint": "^8.44.0",
63
63
  "eslint-plugin-import": "^2.27.5",
64
- "grpc-reflection-js": "^0.1.2",
64
+ "grpc-reflection-js": "^0.3.0",
65
65
  "grpc-server-reflection": "^0.1.5",
66
66
  "grpc-tools": "^1.12.4",
67
67
  "husky": "^8.0.3",
@@ -74,7 +74,7 @@
74
74
  "typescript": "^5.0.2"
75
75
  },
76
76
  "peerDependencies": {
77
- "grpc-reflection-js": "^0.1.2"
77
+ "grpc-reflection-js": "^0.3.0"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "grpc-reflection-js": {
@@ -0,0 +1,92 @@
1
+ diff --git a/node_modules/grpc-reflection-js/build/src/client.d.ts b/node_modules/grpc-reflection-js/build/src/client.d.ts
2
+ index 72b4587..b4bb034 100644
3
+ --- a/node_modules/grpc-reflection-js/build/src/client.d.ts
4
+ +++ b/node_modules/grpc-reflection-js/build/src/client.d.ts
5
+ @@ -5,7 +5,8 @@ export declare class Client {
6
+ metadata: Metadata;
7
+ grpcClient: services.IServerReflectionClient;
8
+ private fileDescriptorCache;
9
+ - constructor(url: string, credentials: ChannelCredentials, options?: object, metadata?: Metadata);
10
+ + private descriptor;
11
+ + constructor(url: string, credentials: ChannelCredentials, options?: object, metadata?: Metadata, descriptorExtensionProto?: string[]);
12
+ listServices(): Promise<string[]>;
13
+ fileContainingSymbol(symbol: string): Promise<Root>;
14
+ fileByFilename(filename: string): Promise<Root>;
15
+ diff --git a/node_modules/grpc-reflection-js/build/src/client.js b/node_modules/grpc-reflection-js/build/src/client.js
16
+ index 3747349..bc2ac34 100644
17
+ --- a/node_modules/grpc-reflection-js/build/src/client.js
18
+ +++ b/node_modules/grpc-reflection-js/build/src/client.js
19
+ @@ -27,14 +27,19 @@ const grpc_js_1 = require("@grpc/grpc-js");
20
+ const descriptor_1 = require("./descriptor");
21
+ const services = __importStar(require("./reflection_grpc_pb"));
22
+ const reflection_pb_1 = require("./reflection_pb");
23
+ -const descriptor_2 = require("protobufjs/ext/descriptor");
24
+ +const protobufjs_1 = require("protobufjs");
25
+ const lodash_set_1 = __importDefault(require("lodash.set"));
26
+ class Client {
27
+ - constructor(url, credentials, options, metadata) {
28
+ + constructor(url, credentials, options, metadata, descriptorExtensionProto) {
29
+ this.fileDescriptorCache = new Map();
30
+ this.fileDescriptorCache = new Map();
31
+ this.metadata = metadata || new grpc_js_1.Metadata();
32
+ this.grpcClient = new services.ServerReflectionClient(url, credentials, options);
33
+ + const descriptorRoot = protobufjs_1.Root.fromJSON(require('protobufjs/google/protobuf/descriptor.json'));
34
+ + if (descriptorExtensionProto) {
35
+ + descriptorRoot.loadSync(descriptorExtensionProto);
36
+ + }
37
+ + this.descriptor = descriptorRoot.lookup('.google.protobuf');
38
+ }
39
+ listServices() {
40
+ return new Promise((resolve, reject) => {
41
+ @@ -79,7 +84,7 @@ class Client {
42
+ }
43
+ async resolveFileDescriptorSet(fileDescriptorProtos) {
44
+ const fileDescriptorMap = await this.resolveDescriptorRecursive(fileDescriptorProtos);
45
+ - const fileDescriptorSet = descriptor_2.FileDescriptorSet.create();
46
+ + const fileDescriptorSet = this.descriptor.FileDescriptorSet.create();
47
+ lodash_set_1.default(fileDescriptorSet, 'file', Array.from(fileDescriptorMap.values()));
48
+ return descriptor_1.getDescriptorRootFromDescriptorSet(fileDescriptorSet);
49
+ }
50
+ @@ -100,6 +105,7 @@ class Client {
51
+ }
52
+ getFileContainingSymbol(symbol) {
53
+ const fileDescriptorCache = this.fileDescriptorCache;
54
+ + const descriptor = this.descriptor;
55
+ return new Promise((resolve, reject) => {
56
+ function dataCallback(response) {
57
+ var _a;
58
+ @@ -107,7 +113,7 @@ class Client {
59
+ const fileDescriptorProtoBytes = (((_a = response
60
+ .getFileDescriptorResponse()) === null || _a === void 0 ? void 0 : _a.getFileDescriptorProtoList()) || []);
61
+ resolve(fileDescriptorProtoBytes.map(descriptorByte => {
62
+ - const fileDescriptorProto = descriptor_2.FileDescriptorProto.decode(descriptorByte);
63
+ + const fileDescriptorProto = descriptor.FileDescriptorProto.decode(descriptorByte);
64
+ fileDescriptorCache.set(fileDescriptorProto.name, fileDescriptorProto);
65
+ return fileDescriptorProto;
66
+ }));
67
+ @@ -131,6 +137,7 @@ class Client {
68
+ getFilesByFilenames(symbols) {
69
+ const result = [];
70
+ const fileDescriptorCache = this.fileDescriptorCache;
71
+ + const descriptor = this.descriptor;
72
+ const symbolsToFetch = symbols.filter(symbol => {
73
+ const cached = fileDescriptorCache.get(symbol);
74
+ if (cached) {
75
+ @@ -149,7 +156,7 @@ class Client {
76
+ (_b = (_a = response
77
+ .getFileDescriptorResponse()) === null || _a === void 0 ? void 0 : _a.getFileDescriptorProtoList()) === null || _b === void 0 ? void 0 : _b.forEach(descriptorByte => {
78
+ if (descriptorByte instanceof Uint8Array) {
79
+ - const fileDescriptorProto = descriptor_2.FileDescriptorProto.decode(descriptorByte);
80
+ + const fileDescriptorProto = descriptor.FileDescriptorProto.decode(descriptorByte);
81
+ fileDescriptorCache.set(fileDescriptorProto.name, fileDescriptorProto);
82
+ result.push(fileDescriptorProto);
83
+ }
84
+ diff --git a/node_modules/grpc-reflection-js/build/src/client.js.map b/node_modules/grpc-reflection-js/build/src/client.js.map
85
+ index e589db9..0284c65 100644
86
+ --- a/node_modules/grpc-reflection-js/build/src/client.js.map
87
+ +++ b/node_modules/grpc-reflection-js/build/src/client.js.map
88
+ @@ -1 +1 @@
89
+ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,6CAAgE;AAChE,+DAAiD;AACjD,mDAGyB;AAEzB,0DAImC;AACnC,4DAA6B;AAE7B,MAAa,MAAM;IAIjB,YACE,GAAW,EACX,WAA+B,EAC/B,OAAgB,EAChB,QAAmB;QALb,wBAAmB,GAAsC,IAAI,GAAG,EAAE,CAAC;QAOzE,IAAI,CAAC,mBAAmB,GAAG,IAAI,GAAG,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,kBAAQ,EAAE,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,QAAQ,CAAC,sBAAsB,CACnD,GAAG,EACH,WAAW,EACX,OAAO,CACR,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,SAAS,YAAY,CAAC,QAAkC;;gBACtD,IAAI,QAAQ,CAAC,uBAAuB,EAAE,EAAE;oBACtC,MAAM,QAAQ,SAAG,QAAQ;yBACtB,uBAAuB,EAAE,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AC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApOD,wBAoOC"}
92
+
@@ -105,17 +105,3 @@ index 6aafd2a..b8e9f58 100644
105
105
  return out.length ? $protobuf.util.toObject(out) : undefined;
106
106
  }
107
107
 
108
- diff --git a/node_modules/protobufjs/src/root.js b/node_modules/protobufjs/src/root.js
109
- index df6f11f..98303aa 100644
110
- --- a/node_modules/protobufjs/src/root.js
111
- +++ b/node_modules/protobufjs/src/root.js
112
- @@ -273,6 +273,9 @@ function tryHandleExtension(root, field) {
113
- var extendedType = field.parent.lookup(field.extend);
114
- if (extendedType) {
115
- var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);
116
- + if (extendedType.get(sisterField.name)) {
117
- + return true;
118
- + }
119
- sisterField.declaringField = field;
120
- field.extensionField = sisterField;
121
- extendedType.add(sisterField);
@@ -1,87 +0,0 @@
1
- diff --git a/node_modules/grpc-reflection-js/build/src/client.d.ts b/node_modules/grpc-reflection-js/build/src/client.d.ts
2
- index e8acad8..9919874 100644
3
- --- a/node_modules/grpc-reflection-js/build/src/client.d.ts
4
- +++ b/node_modules/grpc-reflection-js/build/src/client.d.ts
5
- @@ -3,7 +3,7 @@ import * as services from './reflection_grpc_pb';
6
- import { Root } from 'protobufjs';
7
- export declare class Client {
8
- grpcClient: services.IServerReflectionClient;
9
- - constructor(url: string, credentials: ChannelCredentials, options?: object);
10
- + constructor(url: string, credentials: ChannelCredentials, options?: object, descriptorExtensionProto?: string[]);
11
- listServices(): Promise<string[] | void[]>;
12
- fileContainingSymbol(symbol: string): Promise<Root>;
13
- fileByFilename(filename: string): Promise<Root>;
14
- diff --git a/node_modules/grpc-reflection-js/build/src/client.js b/node_modules/grpc-reflection-js/build/src/client.js
15
- index d21ff4d..0f10f0b 100644
16
- --- a/node_modules/grpc-reflection-js/build/src/client.js
17
- +++ b/node_modules/grpc-reflection-js/build/src/client.js
18
- @@ -26,11 +26,17 @@ exports.Client = void 0;
19
- const descriptor_1 = require("./descriptor");
20
- const services = __importStar(require("./reflection_grpc_pb"));
21
- const reflection_pb_1 = require("./reflection_pb");
22
- -const descriptor_2 = require("protobufjs/ext/descriptor");
23
- +const pb = require("protobufjs");
24
- const lodash_set_1 = __importDefault(require("lodash.set"));
25
- class Client {
26
- - constructor(url, credentials, options) {
27
- + constructor(url, credentials, options, descriptorExtensionProto) {
28
- this.grpcClient = new services.ServerReflectionClient(url, credentials, options);
29
- +
30
- + const descriptorRoot = pb.Root.fromJSON(require("protobufjs/google/protobuf/descriptor.json"));
31
- + if (descriptorExtensionProto) {
32
- + descriptorExtensionProto.forEach((proto) => descriptorRoot.loadSync(proto));
33
- + }
34
- + this.descriptor = descriptorRoot.lookup(".google.protobuf");
35
- }
36
- listServices() {
37
- return new Promise((resolve, reject) => {
38
- @@ -74,15 +80,15 @@ class Client {
39
- });
40
- }
41
- async resolveFileDescriptorSet(fileDescriptorProtoBytes) {
42
- - const fileDescriptorSet = descriptor_2.FileDescriptorSet.create();
43
- + const fileDescriptorSet = this.descriptor.FileDescriptorSet.create();
44
- const fileDescriptorProtos = await this.resolveDescriptorRecursive(fileDescriptorProtoBytes);
45
- lodash_set_1.default(fileDescriptorSet, 'file', Array.from(fileDescriptorProtos.values()));
46
- - return descriptor_1.getDescriptorRootFromDescriptorSet(fileDescriptorSet);
47
- + return descriptor_1.getDescriptorRootFromDescriptorSet(fileDescriptorSet, this.descriptor);
48
- }
49
- async resolveDescriptorRecursive(fileDescriptorProtoBytes) {
50
- let fileDescriptorProtos = new Map();
51
- for (const descriptorByte of fileDescriptorProtoBytes) {
52
- - const fileDescriptorProto = descriptor_2.FileDescriptorProto.decode(descriptorByte);
53
- + const fileDescriptorProto = this.descriptor.FileDescriptorProto.decode(descriptorByte);
54
- if (fileDescriptorProto.dependency) {
55
- const dependencies = fileDescriptorProto.dependency;
56
- for (const dep of dependencies) {
57
- diff --git a/node_modules/grpc-reflection-js/build/src/descriptor.js b/node_modules/grpc-reflection-js/build/src/descriptor.js
58
- index a00a919..c680d3b 100644
59
- --- a/node_modules/grpc-reflection-js/build/src/descriptor.js
60
- +++ b/node_modules/grpc-reflection-js/build/src/descriptor.js
61
- @@ -2,7 +2,7 @@
62
- Object.defineProperty(exports, "__esModule", { value: true });
63
- exports.getDescriptorRootFromDescriptorSet = exports.getDescriptorRoot = void 0;
64
- const protobuf = require('protobufjs');
65
- -const Descriptor = require('protobufjs/ext/descriptor');
66
- +const Descriptor_1 = require('protobufjs/ext/descriptor');
67
- const set = require('lodash.set');
68
- /**
69
- * @typedef {import('protobufjs').Root} Root
70
- @@ -15,7 +15,7 @@ const set = require('lodash.set');
71
- * @return {Root} Protobuf.js Root object
72
- */
73
- // eslint-disable-next-line node/no-unsupported-features/es-syntax
74
- -function getDescriptorRoot(file_descriptor_protos) {
75
- +function getDescriptorRoot(file_descriptor_protos, Descriptor = Descriptor_1) {
76
- const descriptorSet = Descriptor.FileDescriptorSet.create();
77
- file_descriptor_protos.forEach((descriptorByte, i) => {
78
- const descriptor = Descriptor.FileDescriptorProto.decode(descriptorByte);
79
- @@ -30,7 +30,7 @@ exports.getDescriptorRoot = getDescriptorRoot;
80
- * @return {Root} Protobuf.js Root object
81
- */
82
- // eslint-disable-next-line node/no-unsupported-features/es-syntax
83
- -function getDescriptorRootFromDescriptorSet(file_descriptor_set) {
84
- +function getDescriptorRootFromDescriptorSet(file_descriptor_set, Descriptor = Descriptor_1) {
85
- return protobuf.Root.fromDescriptor(file_descriptor_set);
86
- }
87
- exports.getDescriptorRootFromDescriptorSet = getDescriptorRootFromDescriptorSet;