Commit Graph

37 Commits

Author SHA1 Message Date
Alex Dukhnovskiy
cf2c1ae626 fix(microservices): fix tests and CS grpc-multipackage 2019-10-04 10:26:44 +03:00
Alex Dukhnovskiy
8ff5d1df8b Merge branch 'master' into feature/grpc-multipackage
# Conflicts:
#	integration/microservices/src/grpc/grpc.controller.ts
#	packages/microservices/client/client-grpc.ts
#	packages/microservices/server/server-grpc.ts
2019-10-04 01:06:32 +03:00
Alex Dukhnovskiy
9e2d606382 feat(microservices): add multiple grpc packages and proto files to config
before:

grpcOptions: <GrpcOptions>{
    transport: Transport.GRPC,
    options: {
        url: 'url',
        package: 'name.package',
        protoPath: 'alone.proto'
    }
}
after:

grpcOptions: <GrpcOptions>{
    transport: Transport.GRPC,
    options: {
        url: 'url',
        package: ['name.package', 'other.package'],
        protoPath: [
        'one.proto',
        'two.proto',
        'any.proto'
        ]
    }
}
2019-10-03 20:22:19 +03:00
Alex Dukhnovskiy
fc7b44c474 feature(microservices): add multiple proto to grpc config
before:
grpcOptions: <GrpcOptions>{
    transport: Transport.GRPC,
    options: {
        url: 'url',
        package: 'name.package',
        protoPath: 'alone.proto'
    }
}
after:
grpcOptions: <GrpcOptions>{
    transport: Transport.GRPC,
    options: {
        url: 'url',
        package: ['name.package', 'other.package'],
        protoPath: [
        'one.proto',
        'two.proto',
        'any.proto'
        ]
    }
}
2019-10-02 16:29:29 +03:00
Kamil Myśliwiec
733560d873 refactor(microservices) use delete instead of object destructing 2019-09-10 14:22:42 +02:00
Kamil Myśliwiec
73c1cf34c1 feat(microservices) add getClientByServiceName to client grpc 2019-09-10 14:20:35 +02:00
TychoTa
44126e9636 bugfix(microservices) remove credentials from options to fix TypeError
I use to have the following exception:
```
(node:19) UnhandledPromiseRejectionWarning: TypeError: Channel options must be an object with string keys and integer or string values
```
I was passing down a credential object to the options like this:
```
const credentials = grpc.credentials.createSsl(
  readFileSync('/srv/certs/rootCA.pem'),
  readFileSync('/srv/certs/server.key'),
  readFileSync('/srv/certs/server.crt')
  );

// later
  @Client({
    transport: Transport.GRPC,
    options: {
      url: 'ms-proxy:50051',
      package: 'hero',
      protoPath: join(__dirname, '..', 'proto/hero.proto'),
      credentials,
    },
  })
``
2019-06-22 17:18:53 +02:00
Kamil Myśliwiec
d88b920dba refactor(microservices): move client options for every client 2019-05-30 15:36:34 +02:00
Kamil Myśliwiec
275a97a84d feat(grpc): add more options to grpcClient (max message length) 2019-05-30 14:53:19 +02:00
Kamil Myśliwiec
e4179eb380 enhancement() add loader function to load package utility 2019-01-30 23:07:34 +01:00
Kamil Myśliwiec
4f767080bf feature() add external context, microservices event patterns 2019-01-04 16:59:11 +01:00
Kamil Myśliwiec
4796023e02 chore() resolve conflicts 2018-12-10 22:03:06 +01:00
Kamil Myśliwiec
1cac0a99fd feature: more typings, refactor 2018-11-28 23:08:27 +01:00
Kamil Myśliwiec
0b23422ab1 refactor: reduce implicit types 2018-11-24 17:28:28 +01:00
Kamil Myśliwiec
1cb3ed7f87 refactor: general refactor reorganize, rename things 2018-11-24 16:01:29 +01:00
Aleksey Tsvetkov
4b55261aeb feat(client-grpc): added protoLoader option for grpc client 2018-11-08 11:32:32 +03:00
Kamil Myśliwiec
4b6ca2a3e0 bugfix(microservices) fix client with loader settings 2018-09-13 10:41:28 +02:00
Kamil Myśliwiec
d048f23ff8 improvement(microservices) ensure that connection is shared across promises 2018-09-05 09:37:09 +02:00
Kamil Myśliwiec
b6fe9b06cc refactor(microservices) remove unecessary options object 2018-09-02 22:31:11 +02:00
Jean-Baptiste Pionnier
5415659fb9 feature(@nestjs/microservices) use grpc/proto-loader 2018-08-08 16:58:09 +02:00
Kamil Myśliwiec
614d57f130 feature(@nestjs) expose default exception filters 2018-07-25 18:47:40 +02:00
Kamil Myśliwiec
0f62bcd41f chore(@nestjs) publish 5.1.0 release 2018-07-05 14:31:21 +02:00
Kamil Myśliwiec
3cf8607b20 enhancement(@nestjs/microservices) disable internal gRPC errors swallow 2018-07-04 23:17:02 +02:00
Kamil Myśliwiec
f80cd9edd1 refactor(@nestjs/microservices) extract magic strings into constants 2018-06-21 21:51:48 +02:00
Michael
89fe60a213 chore(@nestjs/microservices) improve ClientGrpcProxy.getService typing 2018-06-08 15:24:24 +02:00
Michael
3ebec419fe feature(@nestjs/microservices) allow grpc clients to disconnect
- when client cancels the server stream gets completed too
- client introduced disconnection does not throw errors on the client side
- release client's event listener on 'end'
2018-06-08 15:21:37 +02:00
Kamil Myśliwiec
17a609cd9c feature(@nestjs/microservices) grpc improvements (add root), cleanup 2018-05-25 12:44:18 +02:00
Kamil Myśliwiec
663ca6981e feature(@nestjs/microservices) more descriptive gRPC errors 2018-05-13 10:24:33 +02:00
Kamil Myśliwiec
6016f8d175 feature(@nestjs/microservices) expose connect method, improvements & fixes 2018-05-09 17:21:21 +02:00
Kamil Myśliwiec
181d8c6585 feature(@nestjs/common) add package loader utility 2018-04-30 13:01:37 +02:00
Kamil Myśliwiec
3ad570e62e bugfix(@nestjs/microservices) extract external typings #594 2018-04-28 15:23:03 +02:00
Kamil Myśliwiec
944921f2e9 external(@nestjs) update to rxjs@6.0.0 2018-04-27 13:13:02 +02:00
Kamil Myśliwiec
3160245145 refactor(@nestjs) fix tslint issues, format code 2018-04-21 14:22:24 +02:00
Kamil Myśliwiec
b144dbef8c chore(release) publish v5.0.0-beta.0 2018-04-17 18:22:27 +02:00
Kamil Myśliwiec
91b4974d2c samples(@nestjs) update sample applications 2018-03-25 21:38:52 +02:00
Kamil Myśliwiec
e50ddf9cb9 tests(@nestjs) fix broken unit tests 2018-03-24 20:55:06 +01:00
Kamil Myśliwiec
614de27310 refactor(@nestjs) rename directories, add script, fix tests 2018-03-24 15:11:48 +01:00