@faramircinema/contracts 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gen/auth.ts CHANGED
@@ -26,36 +26,20 @@ export interface AuthServiceClient {
26
26
  }
27
27
 
28
28
  export interface AuthServiceController {
29
- sendOtp(
30
- request: SendOtpRequest,
31
- ): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
29
+ sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
32
30
  }
33
31
 
34
32
  export function AuthServiceControllerMethods() {
35
33
  return function (constructor: Function) {
36
34
  const grpcMethods: string[] = ["sendOtp"];
37
35
  for (const method of grpcMethods) {
38
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
39
- constructor.prototype,
40
- method,
41
- );
42
- GrpcMethod("AuthService", method)(
43
- constructor.prototype[method],
44
- method,
45
- descriptor,
46
- );
36
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
37
+ GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
47
38
  }
48
39
  const grpcStreamMethods: string[] = [];
49
40
  for (const method of grpcStreamMethods) {
50
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
51
- constructor.prototype,
52
- method,
53
- );
54
- GrpcStreamMethod("AuthService", method)(
55
- constructor.prototype[method],
56
- method,
57
- descriptor,
58
- );
41
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
42
+ GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
59
43
  }
60
44
  };
61
45
  }
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "devDependencies": {
3
- "protoc": "^36.2.0",
4
- "ts-proto": "1.180.0"
5
- },
6
- "name": "@faramircinema/contracts",
7
- "version": "1.0.2",
8
- "description": "Protobuf definitions and generated Typescript types",
9
- "dependencies": {
10
- "@nestjs/microservices": "^12.1.3",
11
- "case-anything": "^2.1.13",
12
- "detect-libc": "^1.0.3",
13
- "dprint-node": "^1.0.8",
14
- "rxjs": "^7.8.2",
15
- "ts-poet": "^6.12.0",
16
- "ts-proto-descriptors": "^2.1.0"
17
- },
18
- "scripts": {
19
- "generate": "mkdir -p ./gen && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit -I ./proto ./proto/*.proto",
20
- "generate:win": "gen-proto.bat"
21
- },
22
- "files": [
23
- "proto",
24
- "gen"
25
- ],
26
- "publishConfig": {
27
- "access": "public"
28
- }
29
- }
1
+ {
2
+ "devDependencies": {
3
+ "protoc": "^36.2.0",
4
+ "ts-proto": "1.180.0"
5
+ },
6
+ "name": "@faramircinema/contracts",
7
+ "version": "1.0.3",
8
+ "description": "Protobuf definitions and generated Typescript types",
9
+ "dependencies": {
10
+ "@nestjs/microservices": "^12.1.3",
11
+ "case-anything": "^2.1.13",
12
+ "detect-libc": "^1.0.3",
13
+ "dprint-node": "^1.0.8",
14
+ "rxjs": "^7.8.2",
15
+ "ts-poet": "^6.12.0",
16
+ "ts-proto-descriptors": "^2.1.0"
17
+ },
18
+ "scripts": {
19
+ "generate": "mkdir -p ./gen && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit -I ./proto ./proto/*.proto",
20
+ "generate:win": "gen-proto.bat"
21
+ },
22
+ "files": [
23
+ "proto",
24
+ "gen"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ }
29
+ }
package/proto/auth.proto CHANGED
@@ -1,18 +1,18 @@
1
- syntax = "proto3";
2
-
3
- package auth.v1;
4
-
5
- service AuthService {
6
- rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
7
- }
8
-
9
- message SendOtpRequest {
10
- string identifier = 1;
11
- string type = 2;
12
-
13
- }
14
-
15
- message SendOtpResponse {
16
- bool ok = 1;
17
- }
18
-
1
+ syntax = "proto3";
2
+
3
+ package auth.v1;
4
+
5
+ service AuthService {
6
+ rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
7
+ }
8
+
9
+ message SendOtpRequest {
10
+ string identifier = 1;
11
+ string type = 2;
12
+
13
+ }
14
+
15
+ message SendOtpResponse {
16
+ bool ok = 1;
17
+ }
18
+