Skip to content

Commit 4d5d694

Browse files
yoshi-automationJustinBeckwith
authored andcommitted
refactor: drop dependency on lodash.merge and update links (#167)
1 parent 18b3a79 commit 4d5d694

File tree

3 files changed

+35
-44
lines changed

3 files changed

+35
-44
lines changed

packages/google-cloud-kms/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"predocs-test": "npm run docs"
4040
},
4141
"dependencies": {
42-
"google-gax": "^1.0.0",
43-
"lodash.merge": "^4.6.0"
42+
"google-gax": "^1.0.0"
4443
},
4544
"devDependencies": {
4645
"codecov": "^3.0.4",

packages/google-cloud-kms/src/v1/key_management_service_client.js

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./key_management_service_client_config.json');
1818
const gax = require('google-gax');
19-
const merge = require('lodash.merge');
2019
const path = require('path');
2120

2221
const VERSION = require('../../package.json').version;
@@ -98,16 +97,9 @@ class KeyManagementServiceClient {
9897
}
9998

10099
// Load the applicable protos.
101-
const protos = merge(
102-
{},
103-
gaxGrpc.loadProto(
104-
path.join(__dirname, '..', '..', 'protos'),
105-
'google/cloud/kms/v1/service.proto'
106-
),
107-
gaxGrpc.loadProto(
108-
path.join(__dirname, '..', '..', 'protos'),
109-
'google/iam/v1/iam_policy.proto'
110-
)
100+
const protos = gaxGrpc.loadProto(
101+
path.join(__dirname, '..', '..', 'protos'),
102+
['google/cloud/kms/v1/service.proto', 'google/iam/v1/iam_policy.proto']
111103
);
112104

113105
// This API contains "path templates"; forward-slash-separated
@@ -298,7 +290,7 @@ class KeyManagementServiceClient {
298290
* resources in a page.
299291
* @param {Object} [options]
300292
* Optional parameters. You can override the default settings for this call, e.g, timeout,
301-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
293+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
302294
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
303295
* The function which will be called with the result of the API call.
304296
*
@@ -411,7 +403,7 @@ class KeyManagementServiceClient {
411403
* resources in a page.
412404
* @param {Object} [options]
413405
* Optional parameters. You can override the default settings for this call, e.g, timeout,
414-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
406+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
415407
* @returns {Stream}
416408
* An object stream which emits an object representing [KeyRing]{@link google.cloud.kms.v1.KeyRing} on 'data' event.
417409
*
@@ -461,7 +453,7 @@ class KeyManagementServiceClient {
461453
* The number should be among the values of [CryptoKeyVersionView]{@link google.cloud.kms.v1.CryptoKeyVersionView}
462454
* @param {Object} [options]
463455
* Optional parameters. You can override the default settings for this call, e.g, timeout,
464-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
456+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
465457
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
466458
* The function which will be called with the result of the API call.
467459
*
@@ -577,7 +569,7 @@ class KeyManagementServiceClient {
577569
* The number should be among the values of [CryptoKeyVersionView]{@link google.cloud.kms.v1.CryptoKeyVersionView}
578570
* @param {Object} [options]
579571
* Optional parameters. You can override the default settings for this call, e.g, timeout,
580-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
572+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
581573
* @returns {Stream}
582574
* An object stream which emits an object representing [CryptoKey]{@link google.cloud.kms.v1.CryptoKey} on 'data' event.
583575
*
@@ -628,7 +620,7 @@ class KeyManagementServiceClient {
628620
* The number should be among the values of [CryptoKeyVersionView]{@link google.cloud.kms.v1.CryptoKeyVersionView}
629621
* @param {Object} [options]
630622
* Optional parameters. You can override the default settings for this call, e.g, timeout,
631-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
623+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
632624
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
633625
* The function which will be called with the result of the API call.
634626
*
@@ -749,7 +741,7 @@ class KeyManagementServiceClient {
749741
* The number should be among the values of [CryptoKeyVersionView]{@link google.cloud.kms.v1.CryptoKeyVersionView}
750742
* @param {Object} [options]
751743
* Optional parameters. You can override the default settings for this call, e.g, timeout,
752-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
744+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
753745
* @returns {Stream}
754746
* An object stream which emits an object representing [CryptoKeyVersion]{@link google.cloud.kms.v1.CryptoKeyVersion} on 'data' event.
755747
*
@@ -789,7 +781,7 @@ class KeyManagementServiceClient {
789781
* KeyRing to get.
790782
* @param {Object} [options]
791783
* Optional parameters. You can override the default settings for this call, e.g, timeout,
792-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
784+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
793785
* @param {function(?Error, ?Object)} [callback]
794786
* The function which will be called with the result of the API call.
795787
*
@@ -845,7 +837,7 @@ class KeyManagementServiceClient {
845837
* CryptoKey to get.
846838
* @param {Object} [options]
847839
* Optional parameters. You can override the default settings for this call, e.g, timeout,
848-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
840+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
849841
* @param {function(?Error, ?Object)} [callback]
850842
* The function which will be called with the result of the API call.
851843
*
@@ -900,7 +892,7 @@ class KeyManagementServiceClient {
900892
* CryptoKeyVersion to get.
901893
* @param {Object} [options]
902894
* Optional parameters. You can override the default settings for this call, e.g, timeout,
903-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
895+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
904896
* @param {function(?Error, ?Object)} [callback]
905897
* The function which will be called with the result of the API call.
906898
*
@@ -963,7 +955,7 @@ class KeyManagementServiceClient {
963955
* This object should have the same structure as [KeyRing]{@link google.cloud.kms.v1.KeyRing}
964956
* @param {Object} [options]
965957
* Optional parameters. You can override the default settings for this call, e.g, timeout,
966-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
958+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
967959
* @param {function(?Error, ?Object)} [callback]
968960
* The function which will be called with the result of the API call.
969961
*
@@ -1036,7 +1028,7 @@ class KeyManagementServiceClient {
10361028
* This object should have the same structure as [CryptoKey]{@link google.cloud.kms.v1.CryptoKey}
10371029
* @param {Object} [options]
10381030
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1039-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1031+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
10401032
* @param {function(?Error, ?Object)} [callback]
10411033
* The function which will be called with the result of the API call.
10421034
*
@@ -1121,7 +1113,7 @@ class KeyManagementServiceClient {
11211113
* This object should have the same structure as [CryptoKeyVersion]{@link google.cloud.kms.v1.CryptoKeyVersion}
11221114
* @param {Object} [options]
11231115
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1124-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1116+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
11251117
* @param {function(?Error, ?Object)} [callback]
11261118
* The function which will be called with the result of the API call.
11271119
*
@@ -1189,7 +1181,7 @@ class KeyManagementServiceClient {
11891181
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
11901182
* @param {Object} [options]
11911183
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1192-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1184+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
11931185
* @param {function(?Error, ?Object)} [callback]
11941186
* The function which will be called with the result of the API call.
11951187
*
@@ -1265,7 +1257,7 @@ class KeyManagementServiceClient {
12651257
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
12661258
* @param {Object} [options]
12671259
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1268-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1260+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
12691261
* @param {function(?Error, ?Object)} [callback]
12701262
* The function which will be called with the result of the API call.
12711263
*
@@ -1358,7 +1350,7 @@ class KeyManagementServiceClient {
13581350
* than 8KiB.
13591351
* @param {Object} [options]
13601352
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1361-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1353+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
13621354
* @param {function(?Error, ?Object)} [callback]
13631355
* The function which will be called with the result of the API call.
13641356
*
@@ -1427,7 +1419,7 @@ class KeyManagementServiceClient {
14271419
* EncryptRequest.additional_authenticated_data.
14281420
* @param {Object} [options]
14291421
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1430-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1422+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
14311423
* @param {function(?Error, ?Object)} [callback]
14321424
* The function which will be called with the result of the API call.
14331425
*
@@ -1493,7 +1485,7 @@ class KeyManagementServiceClient {
14931485
* CryptoKeyVersion to use as primary.
14941486
* @param {Object} [options]
14951487
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1496-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1488+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
14971489
* @param {function(?Error, ?Object)} [callback]
14981490
* The function which will be called with the result of the API call.
14991491
*
@@ -1573,7 +1565,7 @@ class KeyManagementServiceClient {
15731565
* CryptoKeyVersion to destroy.
15741566
* @param {Object} [options]
15751567
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1576-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1568+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
15771569
* @param {function(?Error, ?Object)} [callback]
15781570
* The function which will be called with the result of the API call.
15791571
*
@@ -1639,7 +1631,7 @@ class KeyManagementServiceClient {
16391631
* CryptoKeyVersion to restore.
16401632
* @param {Object} [options]
16411633
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1642-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1634+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
16431635
* @param {function(?Error, ?Object)} [callback]
16441636
* The function which will be called with the result of the API call.
16451637
*
@@ -1702,7 +1694,7 @@ class KeyManagementServiceClient {
17021694
* CryptoKeyVersion public key to get.
17031695
* @param {Object} [options]
17041696
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1705-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1697+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
17061698
* @param {function(?Error, ?Object)} [callback]
17071699
* The function which will be called with the result of the API call.
17081700
*
@@ -1765,7 +1757,7 @@ class KeyManagementServiceClient {
17651757
* OAEP.
17661758
* @param {Object} [options]
17671759
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1768-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1760+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
17691761
* @param {function(?Error, ?Object)} [callback]
17701762
* The function which will be called with the result of the API call.
17711763
*
@@ -1835,7 +1827,7 @@ class KeyManagementServiceClient {
18351827
* This object should have the same structure as [Digest]{@link google.cloud.kms.v1.Digest}
18361828
* @param {Object} [options]
18371829
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1838-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1830+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
18391831
* @param {function(?Error, ?Object)} [callback]
18401832
* The function which will be called with the result of the API call.
18411833
*
@@ -1902,7 +1894,7 @@ class KeyManagementServiceClient {
19021894
* This object should have the same structure as [Policy]{@link google.iam.v1.Policy}
19031895
* @param {Object} [options]
19041896
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1905-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1897+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
19061898
* @param {function(?Error, ?Object)} [callback]
19071899
* The function which will be called with the result of the API call.
19081900
*
@@ -1963,7 +1955,7 @@ class KeyManagementServiceClient {
19631955
* See the operation documentation for the appropriate value for this field.
19641956
* @param {Object} [options]
19651957
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1966-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1958+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
19671959
* @param {function(?Error, ?Object)} [callback]
19681960
* The function which will be called with the result of the API call.
19691961
*
@@ -2028,7 +2020,7 @@ class KeyManagementServiceClient {
20282020
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
20292021
* @param {Object} [options]
20302022
* Optional parameters. You can override the default settings for this call, e.g, timeout,
2031-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
2023+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
20322024
* @param {function(?Error, ?Object)} [callback]
20332025
* The function which will be called with the result of the API call.
20342026
*

packages/google-cloud-kms/synth.metadata

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"updateTime": "2019-05-17T19:46:41.997491Z",
2+
"updateTime": "2019-05-21T11:17:12.709646Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.19.0",
8-
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
7+
"version": "0.20.0",
8+
"dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744",
16-
"internalRef": "248724297"
15+
"sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
16+
"internalRef": "249058354"
1717
}
1818
},
1919
{
2020
"template": {
2121
"name": "node_library",
2222
"origin": "synthtool.gcp",
23-
"version": "2019.4.10"
23+
"version": "2019.5.2"
2424
}
2525
}
2626
],

0 commit comments

Comments
 (0)