🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@google-cloud/redis

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/redis - npm Package Compare versions

Comparing version

to
5.0.0

build/src/v1/cloud_redis_proto_list.json

3

build/src/v1/cloud_redis_client.d.ts

@@ -34,2 +34,3 @@ import type * as gax from 'google-gax';

private _servicePath;
private _log;
auth: gax.GoogleAuth;

@@ -71,3 +72,3 @@ descriptors: Descriptors;

* app is running in an environment which supports
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.

@@ -74,0 +75,0 @@ * @param {string} [options.apiEndpoint] - The domain name of the

@@ -34,2 +34,3 @@ import type * as gax from 'google-gax';

private _servicePath;
private _log;
auth: gax.GoogleAuth;

@@ -70,3 +71,3 @@ descriptors: Descriptors;

* app is running in an environment which supports
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.

@@ -73,0 +74,0 @@ * @param {string} [options.apiEndpoint] - The domain name of the

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

const jsonProtos = require("../../protos/protos.json");
const google_gax_1 = require("google-gax");
/**

@@ -50,2 +51,24 @@ * Client JSON configuration object, loaded from

class CloudRedisClient {
_terminated = false;
_opts;
_providedCustomServicePath;
_gaxModule;
_gaxGrpc;
_protos;
_defaults;
_universeDomain;
_servicePath;
_log = google_gax_1.loggingUtils.log('redis');
auth;
descriptors = {
page: {},
stream: {},
longrunning: {},
batching: {},
};
warn;
innerApiCalls;
pathTemplates;
operationsClient;
cloudRedisStub;
/**

@@ -73,3 +96,3 @@ * Construct an instance of CloudRedisClient.

* app is running in an environment which supports
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.

@@ -92,15 +115,7 @@ * @param {string} [options.apiEndpoint] - The domain name of the

constructor(opts, gaxInstance) {
var _a, _b, _c, _d, _e;
this._terminated = false;
this.descriptors = {
page: {},
stream: {},
longrunning: {},
batching: {},
};
// Ensure that options include all the required fields.
const staticMembers = this.constructor;
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
if (opts?.universe_domain &&
opts?.universeDomain &&
opts?.universe_domain !== opts?.universeDomain) {
throw new Error('Please set either universe_domain or universeDomain, but not both.');

@@ -112,9 +127,13 @@ }

this._universeDomain =
(_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
opts?.universeDomain ??
opts?.universe_domain ??
universeDomainEnvVar ??
'googleapis.com';
this._servicePath = 'redis.' + this._universeDomain;
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
const port = opts?.port || staticMembers.port;
const clientConfig = opts?.clientConfig ?? {};
const fallback = opts?.fallback ??
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);

@@ -370,3 +389,2 @@ // Request numeric enum values if REST transport is used.

getInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -386,9 +404,20 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getInstance(request, options, callback);
this._log.info('getInstance request %j', request);
const wrappedCallback = callback
? (error, response, options, rawResponse) => {
this._log.info('getInstance response %j', response);
callback(error, response, options, rawResponse); // We verified callback above.
}
: undefined;
return this.innerApiCalls
.getInstance(request, options, wrappedCallback)
?.then(([response, options, rawResponse]) => {
this._log.info('getInstance response %j', response);
return [response, options, rawResponse];
});
}
getInstanceAuthString(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -408,9 +437,20 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getInstanceAuthString(request, options, callback);
this._log.info('getInstanceAuthString request %j', request);
const wrappedCallback = callback
? (error, response, options, rawResponse) => {
this._log.info('getInstanceAuthString response %j', response);
callback(error, response, options, rawResponse); // We verified callback above.
}
: undefined;
return this.innerApiCalls
.getInstanceAuthString(request, options, wrappedCallback)
?.then(([response, options, rawResponse]) => {
this._log.info('getInstanceAuthString response %j', response);
return [response, options, rawResponse];
});
}
createInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -430,6 +470,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('createInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('createInstance request %j', request);
return this.innerApiCalls
.createInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('createInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -448,2 +500,3 @@ /**

async checkCreateInstanceProgress(name) {
this._log.info('createInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -455,3 +508,2 @@ const [operation] = await this.operationsClient.getOperation(request);

updateInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -471,6 +523,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
'instance.name': (_a = request.instance.name) !== null && _a !== void 0 ? _a : '',
'instance.name': request.instance.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('updateInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('updateInstance request %j', request);
return this.innerApiCalls
.updateInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('updateInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -489,2 +553,3 @@ /**

async checkUpdateInstanceProgress(name) {
this._log.info('updateInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -496,3 +561,2 @@ const [operation] = await this.operationsClient.getOperation(request);

upgradeInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -512,6 +576,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.upgradeInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('upgradeInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('upgradeInstance request %j', request);
return this.innerApiCalls
.upgradeInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('upgradeInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -530,2 +606,3 @@ /**

async checkUpgradeInstanceProgress(name) {
this._log.info('upgradeInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -537,3 +614,2 @@ const [operation] = await this.operationsClient.getOperation(request);

importInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -553,6 +629,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.importInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('importInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('importInstance request %j', request);
return this.innerApiCalls
.importInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('importInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -571,2 +659,3 @@ /**

async checkImportInstanceProgress(name) {
this._log.info('importInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -578,3 +667,2 @@ const [operation] = await this.operationsClient.getOperation(request);

exportInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -594,6 +682,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.exportInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('exportInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('exportInstance request %j', request);
return this.innerApiCalls
.exportInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('exportInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -612,2 +712,3 @@ /**

async checkExportInstanceProgress(name) {
this._log.info('exportInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -619,3 +720,2 @@ const [operation] = await this.operationsClient.getOperation(request);

failoverInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -635,6 +735,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.failoverInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('failoverInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('failoverInstance request %j', request);
return this.innerApiCalls
.failoverInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('failoverInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -653,2 +765,3 @@ /**

async checkFailoverInstanceProgress(name) {
this._log.info('failoverInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -660,3 +773,2 @@ const [operation] = await this.operationsClient.getOperation(request);

deleteInstance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -676,6 +788,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteInstance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('deleteInstance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('deleteInstance request %j', request);
return this.innerApiCalls
.deleteInstance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('deleteInstance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -694,2 +818,3 @@ /**

async checkDeleteInstanceProgress(name) {
this._log.info('deleteInstance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -701,3 +826,2 @@ const [operation] = await this.operationsClient.getOperation(request);

rescheduleMaintenance(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -717,6 +841,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.rescheduleMaintenance(request, options, callback);
const wrappedCallback = callback
? (error, response, rawResponse, _) => {
this._log.info('rescheduleMaintenance response %j', rawResponse);
callback(error, response, rawResponse, _); // We verified callback above.
}
: undefined;
this._log.info('rescheduleMaintenance request %j', request);
return this.innerApiCalls
.rescheduleMaintenance(request, options, wrappedCallback)
?.then(([response, rawResponse, _]) => {
this._log.info('rescheduleMaintenance response %j', rawResponse);
return [response, rawResponse, _];
});
}

@@ -735,2 +871,3 @@ /**

async checkRescheduleMaintenanceProgress(name) {
this._log.info('rescheduleMaintenance long-running');
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });

@@ -742,3 +879,2 @@ const [operation] = await this.operationsClient.getOperation(request);

listInstances(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -758,6 +894,18 @@ let options;

this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listInstances(request, options, callback);
const wrappedCallback = callback
? (error, values, nextPageRequest, rawResponse) => {
this._log.info('listInstances values %j', values);
callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
}
: undefined;
this._log.info('listInstances request %j', request);
return this.innerApiCalls
.listInstances(request, options, wrappedCallback)
?.then(([response, input, output]) => {
this._log.info('listInstances values %j', response);
return [response, input, output];
});
}

@@ -795,3 +943,2 @@ /**

listInstancesStream(request, options) {
var _a;
request = request || {};

@@ -803,3 +950,3 @@ options = options || {};

this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
parent: request.parent ?? '',
});

@@ -809,2 +956,3 @@ const defaultCallSettings = this._defaults['listInstances'];

this.initialize();
this._log.info('listInstances stream %j', request);
return this.descriptors.page.listInstances.createStream(this.innerApiCalls.listInstances, request, callSettings);

@@ -846,3 +994,2 @@ }

listInstancesAsync(request, options) {
var _a;
request = request || {};

@@ -854,3 +1001,3 @@ options = options || {};

this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
parent: request.parent ?? '',
});

@@ -860,2 +1007,3 @@ const defaultCallSettings = this._defaults['listInstances'];

this.initialize();
this._log.info('listInstances iterate %j', request);
return this.descriptors.page.listInstances.asyncIterate(this.innerApiCalls['listInstances'], request, callSettings);

@@ -953,2 +1101,3 @@ }

return this.cloudRedisStub.then(stub => {
this._log.info('ending gRPC channel');
this._terminated = true;

@@ -955,0 +1104,0 @@ stub.close();

@@ -7,2 +7,18 @@ # Changelog

## [5.0.0](https://github.com/googleapis/google-cloud-node/compare/redis-v4.3.1...redis-v5.0.0) (2025-03-18)
### ⚠ BREAKING CHANGES
* upgrade to Node 18 ([#6096](https://github.com/googleapis/google-cloud-node/issues/6096))
### Features
* [Many APIs] add request/response debug logging to gapics ([b99c5f8](https://github.com/googleapis/google-cloud-node/commit/b99c5f8269a8401c72e9c913971c7e90467209e2))
### Miscellaneous Chores
* Upgrade to Node 18 ([#6096](https://github.com/googleapis/google-cloud-node/issues/6096)) ([eadae64](https://github.com/googleapis/google-cloud-node/commit/eadae64d54e07aa2c65097ea52e65008d4e87436))
## [4.3.1](https://github.com/googleapis/google-cloud-node/compare/redis-v4.3.0...redis-v4.3.1) (2025-02-12)

@@ -9,0 +25,0 @@

{
"name": "@google-cloud/redis",
"description": "Google Cloud Memorystore for Redis API client for Node.js",
"version": "4.3.1",
"version": "5.0.0",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},

@@ -52,22 +52,22 @@ "repository": {

"dependencies": {
"google-gax": "^4.0.3"
"google-gax": "^5.0.0-rc.0"
},
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/node": "^22.0.0",
"@types/sinon": "^17.0.0",
"c8": "^9.0.0",
"codecov": "^3.1.0",
"gapic-tools": "^0.4.0",
"gts": "^5.0.0",
"jsdoc": "^4.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.13.9",
"@types/sinon": "^17.0.4",
"c8": "^10.1.3",
"codecov": "^3.8.3",
"gapic-tools": "^1.0.0",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"linkinator": "4.1.2",
"long": "^5.2.3",
"mocha": "^9.2.2",
"pack-n-play": "^2.0.0",
"sinon": "^18.0.0",
"typescript": "^5.1.6"
"linkinator": "^6.1.2",
"long": "^5.3.1",
"mocha": "^11.1.0",
"pack-n-play": "^3.0.0",
"sinon": "^19.0.2",
"typescript": "^5.8.2"
}
}

@@ -47,3 +47,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

1. [Enable the Cloud Redis API][enable_api].
1. [Set up authentication][auth] so you can access the
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

@@ -179,2 +179,2 @@

[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=redis.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
[auth]: https://cloud.google.com/docs/authentication/getting-started

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 too big to display

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