Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

google-gax

Package Overview
Dependencies
Maintainers
3
Versions
362
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-gax - npm Package Compare versions

Comparing version 2.28.0-pre.0 to 2.28.0

build/protos/google/api/expr/conformance/v1alpha1/conformance_service.proto

7

build/src/fallback.js

@@ -33,3 +33,2 @@ "use strict";

const fallbackServiceStub_1 = require("./fallbackServiceStub");
const _1 = require(".");
var pathTemplate_1 = require("./pathTemplate");

@@ -276,7 +275,5 @@ Object.defineProperty(exports, "PathTemplate", { enumerable: true, get: function () { return pathTemplate_1.PathTemplate; } });

function createApiCall(func, settings, descriptor) {
if (descriptor &&
'streaming' in descriptor &&
descriptor.type !== _1.StreamType.SERVER_STREAMING) {
if (descriptor && 'streaming' in descriptor) {
return () => {
throw new Error('The gRPC-fallback client library (e.g. browser version of the library) currently does not support client-streaming or bidi-stream calls.');
throw new Error('The gRPC-fallback client library (e.g. browser version of the library) currently does not support streaming calls.');
};

@@ -283,0 +280,0 @@ }

@@ -18,5 +18,4 @@ /**

import { AuthClient } from './fallback';
import { StreamArrayParser } from './streamArrayParser';
export interface FallbackServiceStub {
[method: string]: (request: {}, options: {}, metadata: {}, callback: (err?: Error, response?: {} | undefined) => void) => StreamArrayParser | {
[method: string]: (request: {}, options: {}, metadata: {}, callback: (err?: Error, response?: {} | undefined) => void) => {
cancel: () => void;

@@ -23,0 +22,0 @@ };

@@ -24,4 +24,2 @@ "use strict";

const featureDetection_1 = require("./featureDetection");
const streamArrayParser_1 = require("./streamArrayParser");
const stream_1 = require("stream");
function generateServiceStub(rpcs, protocol, servicePath, servicePort, authClient, requestEncoder, responseDecoder) {

@@ -47,3 +45,2 @@ const fetch = featureDetection_1.hasWindowFetch()

}
const streamArrayParser = new streamArrayParser_1.StreamArrayParser(rpc);
authClient

@@ -68,31 +65,16 @@ .getRequestHeaders()

.then((response) => {
if (response.ok && rpc.responseStream) {
stream_1.pipeline(response.body, streamArrayParser, (err) => {
if (err &&
(!cancelRequested ||
(err instanceof Error && err.name !== 'AbortError'))) {
callback(err);
}
});
return;
return Promise.all([
Promise.resolve(response.ok),
response.arrayBuffer(),
]);
})
.then(([ok, buffer]) => {
const response = responseDecoder(rpc, ok, buffer);
callback(null, response);
})
.catch((err) => {
if (!cancelRequested || err.name !== 'AbortError') {
callback(err);
}
else {
return Promise.all([
Promise.resolve(response.ok),
response.arrayBuffer(),
])
.then(([ok, buffer]) => {
const response = responseDecoder(rpc, ok, buffer);
callback(null, response);
})
.catch((err) => {
if (!cancelRequested || err.name !== 'AbortError') {
callback(err);
}
});
}
});
if (rpc.responseStream) {
return streamArrayParser;
}
return {

@@ -99,0 +81,0 @@ cancel: () => {

@@ -14,4 +14,5 @@ [

"google/api/endpoint.proto",
"google/api/error_reason.proto",
"google/api/expr/conformance/v1alpha1/conformance_service.proto",
"google/api/expr/v1alpha1/checked.proto",
"google/api/expr/v1alpha1/conformance_service.proto",
"google/api/expr/v1alpha1/eval.proto",

@@ -38,2 +39,3 @@ "google/api/expr/v1alpha1/explain.proto",

"google/api/resource.proto",
"google/api/routing.proto",
"google/api/service.proto",

@@ -50,5 +52,10 @@ "google/api/servicecontrol/v1/check_error.proto",

"google/api/servicemanagement/v1/servicemanager.proto",
"google/api/serviceusage/v1/resources.proto",
"google/api/serviceusage/v1/serviceusage.proto",
"google/api/serviceusage/v1beta1/resources.proto",
"google/api/serviceusage/v1beta1/serviceusage.proto",
"google/api/source_info.proto",
"google/api/system_parameter.proto",
"google/api/usage.proto",
"google/api/visibility.proto",
"google/cloud/location/locations.proto",

@@ -73,2 +80,3 @@ "google/iam/v1/iam_policy.proto",

"google/monitoring/v3/notification_service.proto",
"google/monitoring/v3/query_service.proto",
"google/monitoring/v3/service.proto",

@@ -84,2 +92,3 @@ "google/monitoring/v3/service_service.proto",

"google/protobuf/compiler/ruby/ruby_generated_code_proto2.proto",
"google/protobuf/compiler/ruby/ruby_generated_code_proto2_import.proto",
"google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto",

@@ -108,2 +117,3 @@ "google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto",

"google/type/dayofweek.proto",
"google/type/decimal.proto",
"google/type/expr.proto",

@@ -110,0 +120,0 @@ "google/type/fraction.proto",

@@ -19,3 +19,2 @@ "use strict";

exports.StreamProxy = exports.StreamType = void 0;
const streamArrayParser_1 = require("../streamArrayParser");
// eslint-disable-next-line @typescript-eslint/no-var-requires

@@ -71,5 +70,2 @@ const duplexify = require('duplexify');

const eventsToForward = ['metadata', 'response', 'status'];
if (stream instanceof streamArrayParser_1.StreamArrayParser) {
eventsToForward.push('data', 'end', 'error');
}
eventsToForward.forEach(event => {

@@ -76,0 +72,0 @@ stream.on(event, this.emit.bind(this, event));

{
"name": "google-gax",
"version": "2.28.0-pre.0",
"version": "2.28.0",
"description": "Google API Extensions",

@@ -50,3 +50,3 @@ "main": "build/src/index.js",

"fs-extra": "^10.0.0",
"google-proto-files": "^2.1.0",
"google-proto-files": "^2.5.0",
"gts": "^2.0.0",

@@ -53,0 +53,0 @@ "is-docker": "^2.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc