Skip to content

Commit

Permalink
refactor: drop dependency on lodash.merge and update links (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed May 21, 2019
1 parent 79017bc commit bb136d3
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 75 deletions.
1 change: 0 additions & 1 deletion packages/google-cloud-videointelligence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
},
"dependencies": {
"google-gax": "^1.0.0",
"lodash.merge": "^4.6.1",
"protobufjs": "^6.8.8"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1beta1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1beta1/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -251,13 +247,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1beta2/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1beta2/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1p1beta1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1p1beta1/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1p2beta1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1p2beta1/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./streaming_video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');

const VERSION = require('../../package.json').version;
Expand Down Expand Up @@ -88,12 +87,9 @@ class StreamingVideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1p3beta1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1p3beta1/video_intelligence.proto']
);

// Some of the methods on this service provide streaming responses.
Expand Down Expand Up @@ -191,7 +187,7 @@ class StreamingVideoIntelligenceServiceClient {
*
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @returns {Stream}
* An object stream which is both readable and writable. It accepts objects
* representing [StreamingAnnotateVideoRequest]{@link google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest} for write() method, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

const gapicConfig = require('./video_intelligence_service_client_config.json');
const gax = require('google-gax');
const merge = require('lodash.merge');
const path = require('path');
const protobuf = require('protobufjs');

Expand Down Expand Up @@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
}

// Load the applicable protos.
const protos = merge(
{},
gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
'google/cloud/videointelligence/v1p3beta1/video_intelligence.proto'
)
const protos = gaxGrpc.loadProto(
path.join(__dirname, '..', '..', 'protos'),
['google/cloud/videointelligence/v1p3beta1/video_intelligence.proto']
);
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
protoFilesRoot = protobuf.loadSync(
Expand Down Expand Up @@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
* is specified, a region will be determined based on video file location.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
* @param {function(?Error, ?Object)} [callback]
* The function which will be called with the result of the API call.
*
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
* The promise has a method named "cancel" which cancels the ongoing API call.
*
* @example
Expand Down
12 changes: 6 additions & 6 deletions packages/google-cloud-videointelligence/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"updateTime": "2019-05-17T19:54:44.439574Z",
"updateTime": "2019-05-21T11:29:32.143324Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.19.0",
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
"version": "0.20.0",
"dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744",
"internalRef": "248724297"
"sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
"internalRef": "249058354"
}
},
{
"template": {
"name": "node_library",
"origin": "synthtool.gcp",
"version": "2019.4.10"
"version": "2019.5.2"
}
}
],
Expand Down

0 comments on commit bb136d3

Please sign in to comment.