yousafn
2022-05-09 17:59
has joined #pact-nestjs

omer.moradd
2022-05-09 17:59
has joined #pact-nestjs

danielglazer123
2022-05-09 17:59
has joined #pact-nestjs

heytaco
2022-05-09 18:00
has joined #pact-nestjs

orbit
2022-05-09 18:00
has joined #pact-nestjs

yousafn
2022-05-09 18:00
:wave: Hey all! We are now public :slightly_smiling_face:

slacksync
2022-06-08 17:22
has joined #pact-nestjs

igor.sharfman
2022-06-12 15:03
has joined #pact-nestjs

igor.sharfman
2022-06-12 15:06
Hey all :slightly_smiling_face: Is there any simple example of pact with nestJS? I work with TypeScript and Jest Steps that are written in https://github.com/pact-foundation/nestjs-pact are not working for me

julian.schmidt
2022-08-16 11:51
has joined #pact-nestjs

julian.schmidt
2022-08-16 11:52
Hello guys, we hope you can help us or push us into a direction :slightly_smiling_face: *Nestjs with Google PubSub (consumer driven event architecture)* We have multiple Nestjs applications that talk via Google PubSub via Push Configuration. Simplified, we send an event to Google PubSub and it will then send an HTTP Request to every subscriber. We want to make sure, that the provider sends the right data and thus want to create consumer driven contracts. The Provider sends a payload and Google PubSub sends the event payload wrapped. It looks something like this: `{` `messageId: '234857239457234',` `data: 'ewpmb286ICdiYXInCn0='` `}` The json payload is base64 encoded. The nestjs controller/route uses a pipe to convert the base64 encoded payload back to json format. Theres also a validation pipe that checks if the data is valid. `@Controller('orders')` `export class OrdersController {` `public constructor(private readonly ordersService: OrdersService) {}` `@Post('events/order-placed')` `@UsePipes(new PubsubPipe<OrderPlacedEvent>(), new ValidationPipe())` `public async create(@Body() createOrderDto: OrderPlacedEvent): Promise<void> {` `await this.ordersService.create(createOrderDto);` `}` `}` The messaging approach doesn't make a request and thus the pipes are not invoked. Should we find a way to still invoke the pipes when just calling the method (With the syncronousBodyHandler)? Or should we make a request with something like supertest? But how would the verify argument look like? Also we would like to write a typesafe test. Is there a way to use typescript to its fullest and have compilation errors when you define the expected objected and it doesn't match the Endpoint/Controller method?

duynguyenptithcm
2022-08-20 07:25
has joined #pact-nestjs

dekkofilms
2022-08-25 20:12
has joined #pact-nestjs

dekkofilms
2022-08-25 20:14
Wanted to bump this message, to see if there were anymore support with NestJS and the support that exists there. I can possibly hack another path, but this comment still stands true with this example app not working. Also seems like certain dependencies aren't using correct imports anymore either with the updates to pact core.

lennart.querter
2022-09-08 11:15
has joined #pact-nestjs

lennart.querter
2022-09-08 11:42
Hello everyone :slightly_smiling_face: I am working to implement pactflow for my company, and we are using nestjs for all our providers. We use nestjs v9.x, and are looking to use the nestjs-pact. I would like to upgrade this to use the 10.x version of pact (to match my react consumers). I have created a working version locally, if you are open to it, I can clean it up and create a PR :slightly_smiling_face:

yousafn
2022-09-08 11:53
cc: @omer.moradd @danielglazer123 you both might be keen on the above

omer.moradd
2022-09-10 14:07
Hi Lennart :slightly_smiling_face: That?s awesome, and yes, I will appreciate if you can create a PR for that :slightly_smiling_face:

lennart.querter
2022-09-12 05:29
Cool, I will do some testing on the consumer side, clean it up and create a PR.

lennart.querter
2022-09-12 05:29
I also updates the dependencies for all npm packages, but that is giving me some problems

omer.moradd
2022-10-07 12:17
DMing you

yousafn
2022-11-30 11:55
@omer.moradd - @lennart.querter has managed to get the NestJS and Pact V3 updates in place and is using them at his company, the PR could do with a review, and maybe we could publish as a beta version so people can start using as well and give us feedback Might save waiting for extra eyes on the PR

lennart.querter
2022-11-30 14:21
I would just need some support on the tests, as the structure is a bit different. I can't trigger the tests on github to see what goes wrong myself

yousafn
2022-11-30 14:36
It looks like it can?t checkout the git head ref for the pull on this line https://github.com/pact-foundation/nestjs-pact/blob/58a3209671483c93e6df835dcaede1a23bf19576/.github/workflows/ci.yml#L16 Seems to be ok for contribs from the repo authors. I can kick off a new branch in the repo from your changes. Otherwise you could try removing that line. And The gh action will check out the sha associated with your commit

lennart.querter
2022-11-30 14:53
I think it should be fine to upgrade to v3 and remove the reference (AFAIK, will try!)

yousafn
2022-11-30 14:55
just kicked it off


yousafn
2022-11-30 15:08
also if you add `fail-fast: false` to the matrix, it won't hard exit if one job fails, which is good if you are testing behaviour between the diff node versions it runs

lennart.querter
2022-11-30 15:42
I don't have any knowledge about lerna tbh, let me check that :slightly_smiling_face:

lennart.querter
2022-11-30 15:43
I guess that was our company thing, I will update!


lennart.querter
2022-11-30 15:45
should I add this as dev dep? or should I just remove this step?

lennart.querter
2022-11-30 15:52
Can you trigger it once again? I removed Lerna, should not be needed: https://github.com/pact-foundation/nestjs-pact/pull/17

yousafn
2022-11-30 15:54
lerna is used for monorepos in javascript projects, and allows the subprojects to share the same deps I believe, and for nicer arrangment of multiple packages rather than having several js repos

yousafn
2022-11-30 15:56
I think it will probably be needed, the step was there for a reason :sweat_smile: ahh lerna is in https://github.com/pact-foundation/nestjs-pact/pull/14 maybe there wasn't a CI pipeline before that change, for testing

yousafn
2022-11-30 15:57
There is only one successful run on that branch from the head of `next` not `master`

yousafn
2022-11-30 15:58
so yeah removing it should be fine, looks like we have the tests running now but with a failure, so at least we are somewhere :+1:

lennart.querter
2022-11-30 15:58
Okay, but the tests are now running, and these 2 that are failing are also the one's I just can't get to work. I think it should be something that @omer.moradd can help me with, it's some jest config

lennart.querter
2022-11-30 15:58
(mocking out the required resource, but I just can't figure it out!)

yousafn
2022-11-30 15:58
Cheers for your efforts fella, appreciate it!

orbit
2022-12-01 15:45
has joined #pact-nestjs

jithinjacob2011
2022-12-27 09:08
has joined #pact-nestjs

morin.td
2023-01-06 12:57
has joined #pact-nestjs

donald.robertson
2023-04-12 10:43
has joined #pact-nestjs

kgrady
2023-09-05 15:32
has joined #pact-nestjs

elaine.silva
2023-11-29 13:53
has joined #pact-nestjs