remove copied test proto file and modify npm command

This commit is contained in:
Robert 2021-10-25 19:00:59 -07:00
parent 16f1356050
commit 9d70f39b7e
5 changed files with 4 additions and 46 deletions

View File

@ -54,7 +54,7 @@
"fix": "gts fix src/*.ts",
"pretest": "npm run generate-types && npm run compile",
"posttest": "npm run check && madge -c ./build/src",
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ -O src/generated/ --grpcLib ../index channelz.proto test_service.proto"
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto test_service.proto"
},
"dependencies": {
"@grpc/proto-loader": "^0.6.4",

View File

@ -1,42 +0,0 @@
/*
* Copyright 2019 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.
*
*/
syntax = "proto3";
message Request {
bool error = 1;
string message = 2;
int32 errorAfter = 3;
}
message Response {
int32 count = 1;
}
service TestService {
rpc Unary (Request) returns (Response) {
}
rpc ClientStream (stream Request) returns (Response) {
}
rpc ServerStream (Request) returns (stream Response) {
}
rpc BidiStream (stream Request) returns (stream Response) {
}
}

View File

@ -1,4 +1,4 @@
// Original file: proto/test_service.proto
// Original file: test/fixtures/test_service.proto
export interface Request {

View File

@ -1,4 +1,4 @@
// Original file: proto/test_service.proto
// Original file: test/fixtures/test_service.proto
export interface Response {

View File

@ -1,4 +1,4 @@
// Original file: proto/test_service.proto
// Original file: test/fixtures/test_service.proto
import type * as grpc from './../index'
import type { MethodDefinition } from '@grpc/proto-loader'