aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node
diff options
context:
space:
mode:
Diffstat (limited to 'src/node')
-rw-r--r--src/node/cli/service_packager.js5
-rw-r--r--src/node/cli/service_packager/index.js3
-rw-r--r--src/node/cli/service_packager/package.json.template3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/node/cli/service_packager.js b/src/node/cli/service_packager.js
index 7bf54b1c62..41875b5420 100644
--- a/src/node/cli/service_packager.js
+++ b/src/node/cli/service_packager.js
@@ -78,7 +78,9 @@ function copyFile(src_path, dest_path) {
function main(argv) {
var args = parseArgs(argv, arg_format);
var out_path = path.resolve(args.out);
- var include_dirs = _.map(path.resolve, args.include);
+ var include_dirs = _.map(_.flatten([args.include]), function(p) {
+ return path.resolve(p);
+ });
args.grpc_version = package_json.version;
generatePackage(args, function(err, rendered) {
if (err) throw err;
@@ -97,6 +99,7 @@ function main(argv) {
'service.json'));
var pbjs_args = _.flatten(['node', 'pbjs',
args._[0],
+ '-legacy',
_.map(include_dirs, function(dir) {
return "-path=" + dir;
})]);
diff --git a/src/node/cli/service_packager/index.js b/src/node/cli/service_packager/index.js
index 8a22120ce0..811e08b89a 100644
--- a/src/node/cli/service_packager/index.js
+++ b/src/node/cli/service_packager/index.js
@@ -32,4 +32,5 @@
*/
var grpc = require('grpc');
-module.exports = grpc.load(__dirname + '/service.json');
+exports.client = grpc.load(__dirname + '/service.json', 'json');
+exports.auth = require('google-auth-library');
diff --git a/src/node/cli/service_packager/package.json.template b/src/node/cli/service_packager/package.json.template
index 4f199f2f95..9f9019172e 100644
--- a/src/node/cli/service_packager/package.json.template
+++ b/src/node/cli/service_packager/package.json.template
@@ -5,7 +5,8 @@
"description": "Client library for {{{name}}} built on gRPC",
"license": "Apache-2.0",
"dependencies": {
- "grpc": "{{{grpc_version}}}"
+ "grpc": "{{{grpc_version}}}",
+ "google-auth-library": "^0.9.2"
},
"main": "index.js",
"files": [