Add files, dependencies, and generation script to package.json

This commit is contained in:
Michael Lumish 2020-07-08 14:49:28 -07:00
parent 8a2c5af8f7
commit dbef861948
2 changed files with 11 additions and 24 deletions

View File

@ -1,20 +0,0 @@
#!/bin/sh
# Copyright 2020 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
base=$(dirname $0)
./node_modules/.bin/proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --json\
--includeDirs deps/envoy-api/ deps/udpa/ node_modules/protobufjs/ deps/googleapis/ deps/protoc-gen-validate/ \
-O src/generated/ --grpcLib ../index envoy/service/discovery/v2/ads.proto envoy/api/v2/listener.proto envoy/api/v2/route.proto envoy/api/v2/cluster.proto envoy/api/v2/endpoint.proto

View File

@ -15,7 +15,6 @@
"types": "build/src/index.d.ts",
"license": "Apache-2.0",
"devDependencies": {
"@grpc/proto-loader": "^0.6.0-pre5",
"@types/gulp": "^4.0.6",
"@types/gulp-mocha": "0.0.32",
"@types/lodash": "^4.14.108",
@ -48,6 +47,7 @@
"clean": "node -e 'require(\"rimraf\")(\"./build\", () => {})'",
"compile": "tsc -p .",
"format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts",
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --json --includeDirs deps/envoy-api/ deps/udpa/ node_modules/protobufjs/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib ../index envoy/service/discovery/v2/ads.proto envoy/api/v2/listener.proto envoy/api/v2/route.proto envoy/api/v2/cluster.proto envoy/api/v2/endpoint.proto",
"lint": "npm run check",
"prepare": "npm run compile",
"test": "gulp test",
@ -57,16 +57,23 @@
"posttest": "npm run check"
},
"dependencies": {
"@grpc/proto-loader": "^0.6.0-pre6",
"semver": "^6.2.0"
},
"peerDependencies": {
"google-auth-library": "5.x || 6.x"
},
"files": [
"src/*.ts",
"src/**/*.ts",
"build/src/*.{js,d.ts,js.map}",
"LICENSE",
"deps/envoy-api/envoy/**/*.proto",
"deps/udpa/udpa/**/*.proto"
"deps/envoy-api/envoy/api/v2/**/*.proto",
"deps/envoy-api/envoy/config/**/*.proto",
"deps/envoy-api/envoy/service/**/*.proto",
"deps/envoy-api/envoy/type/**/*.proto",
"deps/udpa/udpa/**/*.proto",
"deps/googleapis/google/api/*.proto",
"deps/googleapis/google/rpc/*.proto",
"deps/protoc-gen-validate/validate/**/*.proto"
]
}