@google-cloud/dlp 5.3.0 → 5.4.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/PACKAGE NAME?activeTab=versions
6
6
 
7
+ ## [5.4.0](https://github.com/googleapis/google-cloud-node/compare/dlp-v5.3.0...dlp-v5.4.0) (2024-03-29)
8
+
9
+
10
+ ### Features
11
+
12
+ * [Many APIs] add several fields to manage state of database encryption update ([#5193](https://github.com/googleapis/google-cloud-node/issues/5193)) ([333b409](https://github.com/googleapis/google-cloud-node/commit/333b40951a255ecfab249bd6e7ace5877270ec85))
13
+
7
14
  ## [5.3.0](https://github.com/googleapis/google-cloud-node/compare/dlp-v5.2.0...dlp-v5.3.0) (2024-03-07)
8
15
 
9
16
 
@@ -80,7 +80,7 @@ class DlpServiceClient {
80
80
  * ```
81
81
  */
82
82
  constructor(opts, gaxInstance) {
83
- var _a, _b, _c, _d;
83
+ var _a, _b, _c, _d, _e;
84
84
  this._terminated = false;
85
85
  this.descriptors = {
86
86
  page: {},
@@ -95,14 +95,17 @@ class DlpServiceClient {
95
95
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
96
96
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
97
97
  }
98
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
99
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
100
+ : undefined;
98
101
  this._universeDomain =
99
- (_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 : 'googleapis.com';
102
+ (_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';
100
103
  this._servicePath = 'dlp.' + this._universeDomain;
101
104
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
102
105
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
103
106
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
104
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
105
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
107
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
108
+ 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');
106
109
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
107
110
  // Request numeric enum values if REST transport is used.
108
111
  opts.numericEnums = true;
@@ -133,7 +136,7 @@ class DlpServiceClient {
133
136
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
134
137
  // Determine the client header string.
135
138
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
136
- if (typeof process !== 'undefined' && 'versions' in process) {
139
+ if (typeof process === 'object' && 'versions' in process) {
137
140
  clientHeader.push(`gl-node/${process.versions.node}`);
138
141
  }
139
142
  else {
@@ -300,7 +303,7 @@ class DlpServiceClient {
300
303
  * @returns {string} The DNS address for this service.
301
304
  */
302
305
  static get servicePath() {
303
- if (typeof process !== undefined &&
306
+ if (typeof process === 'object' &&
304
307
  typeof process.emitWarning === 'function') {
305
308
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
306
309
  }
@@ -312,7 +315,7 @@ class DlpServiceClient {
312
315
  * @returns {string} The DNS address for this service.
313
316
  */
314
317
  static get apiEndpoint() {
315
- if (typeof process !== undefined &&
318
+ if (typeof process === 'object' &&
316
319
  typeof process.emitWarning === 'function') {
317
320
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
318
321
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@google-cloud/dlp",
3
3
  "description": "DLP API client for Node.js",
4
- "version": "5.3.0",
4
+ "version": "5.4.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Google Inc",
7
7
  "engines": {