@graphql-mesh/grpc 0.94.0 → 0.94.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/cjs/index.js +4 -5
- package/esm/index.js +1 -2
- package/package.json +2 -2
- package/typings/index.d.cts +2 -4
- package/typings/index.d.ts +2 -4
package/cjs/index.js
CHANGED
|
@@ -12,7 +12,6 @@ const protobufjs_1 = tslib_1.__importDefault(require("protobufjs"));
|
|
|
12
12
|
const index_js_1 = tslib_1.__importDefault(require("protobufjs/ext/descriptor/index.js"));
|
|
13
13
|
const grpc_reflection_js_1 = require("@ardatan/grpc-reflection-js");
|
|
14
14
|
const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
|
|
15
|
-
const cross_helpers_2 = require("@graphql-mesh/cross-helpers");
|
|
16
15
|
const store_1 = require("@graphql-mesh/store");
|
|
17
16
|
const string_interpolation_1 = require("@graphql-mesh/string-interpolation");
|
|
18
17
|
const utils_1 = require("@graphql-mesh/utils");
|
|
@@ -69,7 +68,7 @@ class GrpcHandler {
|
|
|
69
68
|
? fileName
|
|
70
69
|
: cross_helpers_1.path.join(this.baseDir, fileName);
|
|
71
70
|
this.logger.debug(`Using the descriptor set from ${absoluteFilePath} `);
|
|
72
|
-
const descriptorSetBuffer = await
|
|
71
|
+
const descriptorSetBuffer = await cross_helpers_1.fs.promises.readFile(absoluteFilePath);
|
|
73
72
|
this.logger.debug(`Reading ${absoluteFilePath} `);
|
|
74
73
|
let decodedDescriptorSet;
|
|
75
74
|
if (absoluteFilePath.endsWith('json')) {
|
|
@@ -164,14 +163,14 @@ class GrpcHandler {
|
|
|
164
163
|
? this.config.credentialsSsl.certChain
|
|
165
164
|
: cross_helpers_1.path.join(this.baseDir, this.config.credentialsSsl.certChain);
|
|
166
165
|
const sslFiles = [
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
cross_helpers_1.fs.promises.readFile(absolutePrivateKeyPath),
|
|
167
|
+
cross_helpers_1.fs.promises.readFile(absoluteCertChainPath),
|
|
169
168
|
];
|
|
170
169
|
if (this.config.credentialsSsl.rootCA !== 'rootCA') {
|
|
171
170
|
const absoluteRootCAPath = cross_helpers_1.path.isAbsolute(this.config.credentialsSsl.rootCA)
|
|
172
171
|
? this.config.credentialsSsl.rootCA
|
|
173
172
|
: cross_helpers_1.path.join(this.baseDir, this.config.credentialsSsl.rootCA);
|
|
174
|
-
sslFiles.unshift(
|
|
173
|
+
sslFiles.unshift(cross_helpers_1.fs.promises.readFile(absoluteRootCAPath));
|
|
175
174
|
}
|
|
176
175
|
const [rootCA, privateKey, certChain] = await Promise.all(sslFiles);
|
|
177
176
|
return grpc_js_1.credentials.createSsl(rootCA, privateKey, certChain);
|
package/esm/index.js
CHANGED
|
@@ -8,8 +8,7 @@ import lodashHas from 'lodash.has';
|
|
|
8
8
|
import protobufjs from 'protobufjs';
|
|
9
9
|
import descriptor from 'protobufjs/ext/descriptor/index.js';
|
|
10
10
|
import { Client } from '@ardatan/grpc-reflection-js';
|
|
11
|
-
import { path, process } from '@graphql-mesh/cross-helpers';
|
|
12
|
-
import { fs } from '@graphql-mesh/cross-helpers';
|
|
11
|
+
import { fs, path, process } from '@graphql-mesh/cross-helpers';
|
|
13
12
|
import { PredefinedProxyOptions } from '@graphql-mesh/store';
|
|
14
13
|
import { stringInterpolator } from '@graphql-mesh/string-interpolation';
|
|
15
14
|
import { readFileOrUrl } from '@graphql-mesh/utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/grpc",
|
|
3
|
-
"version": "0.94.
|
|
3
|
+
"version": "0.94.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@graphql-mesh/cross-helpers": "^0.4.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@grpc/proto-loader": "0.7.7",
|
|
19
19
|
"globby": "11.1.0",
|
|
20
20
|
"graphql-compose": "9.0.10",
|
|
21
|
-
"graphql-scalars": "^1.
|
|
21
|
+
"graphql-scalars": "^1.22.2",
|
|
22
22
|
"lodash.get": "4.4.2",
|
|
23
23
|
"lodash.has": "4.5.2",
|
|
24
24
|
"long": "4.0.0",
|
package/typings/index.d.cts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { GraphQLFieldResolver, GraphQLSchema } from 'graphql';
|
|
2
|
-
import { AnyNestedObject, IParseOptions } from 'protobufjs';
|
|
3
|
-
import
|
|
4
|
-
import { Logger, MeshHandler, MeshHandlerOptions, YamlConfig } from '@graphql-mesh/types';
|
|
5
|
-
import { GetMeshSourcePayload } from '@graphql-mesh/types';
|
|
2
|
+
import protobufjs, { AnyNestedObject, IParseOptions } from 'protobufjs';
|
|
3
|
+
import { GetMeshSourcePayload, Logger, MeshHandler, MeshHandlerOptions, YamlConfig } from '@graphql-mesh/types';
|
|
6
4
|
import { ChannelCredentials, loadPackageDefinition } from '@grpc/grpc-js';
|
|
7
5
|
import { ServiceClient } from '@grpc/grpc-js/build/src/make-client.cjs';
|
|
8
6
|
import './patchLongJs.cjs';
|
package/typings/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { GraphQLFieldResolver, GraphQLSchema } from 'graphql';
|
|
2
|
-
import { AnyNestedObject, IParseOptions } from 'protobufjs';
|
|
3
|
-
import
|
|
4
|
-
import { Logger, MeshHandler, MeshHandlerOptions, YamlConfig } from '@graphql-mesh/types';
|
|
5
|
-
import { GetMeshSourcePayload } from '@graphql-mesh/types';
|
|
2
|
+
import protobufjs, { AnyNestedObject, IParseOptions } from 'protobufjs';
|
|
3
|
+
import { GetMeshSourcePayload, Logger, MeshHandler, MeshHandlerOptions, YamlConfig } from '@graphql-mesh/types';
|
|
6
4
|
import { ChannelCredentials, loadPackageDefinition } from '@grpc/grpc-js';
|
|
7
5
|
import { ServiceClient } from '@grpc/grpc-js/build/src/make-client.js';
|
|
8
6
|
import './patchLongJs.js';
|