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

@google-cloud/data-fusion

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/data-fusion - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

13

build/src/v1/data_fusion_client.d.ts
/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';

@@ -66,4 +66,11 @@ import * as protos from '../../protos/protos';

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new DataFusionClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts?: ClientOptions);
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**

@@ -70,0 +77,0 @@ * Initialize the client.

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

exports.DataFusionClient = void 0;
/* global window */
const gax = require("google-gax");
const jsonProtos = require("../../protos/protos.json");

@@ -31,3 +29,2 @@ /**

const gapicConfig = require("./data_fusion_client_config.json");
const google_gax_1 = require("google-gax");
const version = require('../../../package.json').version;

@@ -74,4 +71,11 @@ /**

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new DataFusionClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts) {
constructor(opts, gaxInstance) {
var _a, _b;

@@ -97,4 +101,8 @@ this._terminated = false;

}
// Load google-gax module synchronously if needed
if (!gaxInstance) {
gaxInstance = require('google-gax');
}
// Choose either gRPC or proto-over-HTTP implementation of google-gax.
this._gaxModule = opts.fallback ? gax.fallback : gax;
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.

@@ -224,3 +232,3 @@ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
this.warn = this._gaxModule.warn;
}

@@ -273,3 +281,3 @@ /**

undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -334,3 +342,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -355,3 +363,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -375,5 +383,5 @@ });

async checkCreateInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -395,3 +403,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -415,5 +423,5 @@ });

async checkDeleteInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -435,3 +443,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
'instance.name': request.instance.name || '',

@@ -455,5 +463,5 @@ });

async checkUpdateInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -475,3 +483,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -495,5 +503,5 @@ });

async checkRestartInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.restartInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.restartInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -515,3 +523,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -556,3 +564,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -602,3 +610,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -625,3 +633,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -668,3 +676,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -716,3 +724,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -719,0 +727,0 @@ });

/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';

@@ -66,4 +66,11 @@ import * as protos from '../../protos/protos';

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new DataFusionClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts?: ClientOptions);
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**

@@ -70,0 +77,0 @@ * Initialize the client.

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

exports.DataFusionClient = void 0;
/* global window */
const gax = require("google-gax");
const jsonProtos = require("../../protos/protos.json");

@@ -31,3 +29,2 @@ /**

const gapicConfig = require("./data_fusion_client_config.json");
const google_gax_1 = require("google-gax");
const version = require('../../../package.json').version;

@@ -74,4 +71,11 @@ /**

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new DataFusionClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts) {
constructor(opts, gaxInstance) {
var _a, _b;

@@ -97,4 +101,8 @@ this._terminated = false;

}
// Load google-gax module synchronously if needed
if (!gaxInstance) {
gaxInstance = require('google-gax');
}
// Choose either gRPC or proto-over-HTTP implementation of google-gax.
this._gaxModule = opts.fallback ? gax.fallback : gax;
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.

@@ -247,3 +255,3 @@ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
this.warn = this._gaxModule.warn;
}

@@ -302,3 +310,3 @@ /**

undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -363,3 +371,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -384,3 +392,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
resource: request.resource || '',

@@ -405,3 +413,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -426,3 +434,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -447,3 +455,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -467,5 +475,5 @@ });

async checkCreateInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -487,3 +495,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -507,5 +515,5 @@ });

async checkDeleteInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -527,3 +535,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
'instance.name': request.instance.name || '',

@@ -547,5 +555,5 @@ });

async checkUpdateInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -567,3 +575,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -587,5 +595,5 @@ });

async checkRestartInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.restartInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.restartInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -607,3 +615,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
name: request.name || '',

@@ -627,5 +635,5 @@ });

async checkUpgradeInstanceProgress(name) {
const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.upgradeInstance, gax.createDefaultBackoffSettings());
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.upgradeInstance, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;

@@ -647,3 +655,3 @@ }

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -688,3 +696,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -734,3 +742,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -757,3 +765,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -800,3 +808,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -848,3 +856,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -871,3 +879,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -912,3 +920,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -958,3 +966,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -981,3 +989,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -1017,3 +1025,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -1058,3 +1066,3 @@ });

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',

@@ -1061,0 +1069,0 @@ });

# Changelog
## [2.1.1](https://github.com/googleapis/nodejs-data-fusion/compare/v2.1.0...v2.1.1) (2022-09-01)
### Bug Fixes
* Allow passing gax instance to client constructor ([#66](https://github.com/googleapis/nodejs-data-fusion/issues/66)) ([42a24b7](https://github.com/googleapis/nodejs-data-fusion/commit/42a24b79cd87fed6cb480edf9e10ab72b6d63aba))
* Better support for fallback mode ([#61](https://github.com/googleapis/nodejs-data-fusion/issues/61)) ([0098350](https://github.com/googleapis/nodejs-data-fusion/commit/0098350779b5f2d26d4385c44981ebe2a2ba1d17))
* Change import long to require ([#62](https://github.com/googleapis/nodejs-data-fusion/issues/62)) ([b284743](https://github.com/googleapis/nodejs-data-fusion/commit/b284743fe36fa68aa5fe47f09dece179ad9915d4))
* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-data-fusion/issues/1553)) ([#65](https://github.com/googleapis/nodejs-data-fusion/issues/65)) ([5a66df0](https://github.com/googleapis/nodejs-data-fusion/commit/5a66df00bce6554e077cc554867cd5f4289681b4))
* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-data-fusion/issues/1546)) ([#64](https://github.com/googleapis/nodejs-data-fusion/issues/64)) ([428bfd4](https://github.com/googleapis/nodejs-data-fusion/commit/428bfd495a60857a1c5fc8b4f5e57c67d598b8cf))
## [2.1.0](https://github.com/googleapis/nodejs-data-fusion/compare/v2.0.0...v2.1.0) (2022-06-30)

@@ -4,0 +15,0 @@

{
"name": "@google-cloud/data-fusion",
"version": "2.1.0",
"version": "2.1.1",
"description": "datafusion client for Node.js",

@@ -42,3 +42,3 @@ "repository": "googleapis/nodejs-data-fusion",

"dependencies": {
"google-gax": "^3.0.1"
"google-gax": "^3.3.0"
},

@@ -54,3 +54,3 @@ "devDependencies": {

"jsdoc-region-tag": "^2.0.0",
"linkinator": "^2.13.6",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",

@@ -57,0 +57,0 @@ "null-loader": "^4.0.1",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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