diff options
author | murgatroid99 <mlumish@google.com> | 2015-05-12 12:39:22 -0700 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2015-05-12 12:39:22 -0700 |
commit | f4b2832850e9e77dd116adbcaf4f0f24c7044a7f (patch) | |
tree | 964a59d2a2614151682cff0807e9a6c3d77a6121 /src/node | |
parent | 43a75af0d06b6c8f3a4f1f7075906bce2131f7cc (diff) |
service_packager now properly generates service and package files
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/cli/service_packager.js | 5 | ||||
-rw-r--r-- | src/node/cli/service_packager/index.js | 3 | ||||
-rw-r--r-- | src/node/cli/service_packager/package.json.template | 3 |
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": [ |