Skip to content

Commit

Permalink
Merge remote-tracking branch 'remote/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
omermorad committed Jul 2, 2023
2 parents 36b8b65 + 294de30 commit ead4d02
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>

<p align="center">
A collection of Badass modules and utilities to help you level up your NestJS application.
A collection of Badass modules and utilities to help you level up your NestJS application.
</p>

<p align="center">
Expand All @@ -19,6 +19,7 @@ A collection of Badass modules and utilities to help you level up your NestJS ap
| [`@golevelup/nestjs-graphql-request`](./packages/graphql-request) | Dependency Injection for GraphQLClient. Make type safe requests to third party GQL APIs | [![version](https://img.shields.io/npm/v/@golevelup/nestjs-graphql-request.svg)](https://www.npmjs.com/package/@golevelup/nestjs-graphql-request) | [changelog](./packages/graphql-request/CHANGELOG.md) |
| [`@golevelup/nestjs-webhooks`](./packages/webhooks) | Middlewares and helpers for processing webhooks | [![version](https://img.shields.io/npm/v/@golevelup/nestjs-webhooks.svg)](https://www.npmjs.com/package/@golevelup/nestjs-webhooks) | [changelog](./packages/webhooks/CHANGELOG.md) |
| [`@golevelup/nestjs-stripe`](./packages/stripe) | Stripe client and webhook processing | [![version](https://img.shields.io/npm/v/@golevelup/nestjs-stripe.svg)](https://www.npmjs.com/package/@golevelup/nestjs-stripe) | [changelog](./packages/stripe/CHANGELOG.md) |
| [`@golevelup/ts-jest`](./packages/testing) | Jest utilities for making testing NestJS applications easier. | [![version](https://img.shields.io/npm/v/@golevelup/ts-jest.svg)](https://www.npmjs.com/package/@golevelup/ts-jest) | [changelog](./packages/testing/CHANGELOG.md) |

## Contribute

Expand Down
6 changes: 5 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
"access": "public"
},
"dependencies": {
"nanoid": "^3.2.0"
"nanoid": "^3.2.0",
"lodash": "^4.17.21"
},
"peerDependencies": {
"@nestjs/common": "^9.x"
},
"jest": {
"moduleFileExtensions": [
Expand Down
4 changes: 4 additions & 0 deletions packages/discovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"dependencies": {
"lodash": "^4.17.15"
},
"peerDependencies": {
"@nestjs/common": "^9.x",
"@nestjs/core": "^9.x"
},
"bugs": {
"url": "https://github.com/golevelup/nestjs/issues"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/discovery/src/discovery.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
import { Module } from '@nestjs/core/injector/module';
import { ModulesContainer } from '@nestjs/core/injector/modules-container';
import { MetadataScanner } from '@nestjs/core/metadata-scanner';
import { flatMap, get, some, uniqBy } from 'lodash';
import { flatMap, get, isNil, some, uniqBy } from 'lodash';
import {
DiscoveredClass,
DiscoveredClassWithMeta,
Expand Down Expand Up @@ -172,7 +172,7 @@ export class DiscoveryService {
.scanFromPrototype(instance, prototype, (name) =>
this.extractMethodMetaAtKey<T>(metaKey, component, prototype, name)
)
.filter((x) => !!x.meta);
.filter((x) => !isNil(x.meta));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ const typeMap = {
{ json: "webhook", js: "webhook", typ: "" },
], "any"),
"RetryConfST": o([
{ json: "num_retries", js: "num_retries", typ: u(undefined, 0) },
{ json: "retry_interval_seconds", js: "retry_interval_seconds", typ: u(undefined, 0) },
{ json: "num_retries", js: "num_retries", typ: u(undefined, 0) },
{ json: "timeout_seconds", js: "timeout_seconds", typ: u(undefined, 0) },
{ json: "tolerance_seconds", js: "tolerance_seconds", typ: u(undefined, 0) },
], "any"),
Expand Down
9 changes: 8 additions & 1 deletion packages/rabbitmq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,19 @@
"@golevelup/nestjs-discovery": "^3.0.0",
"@golevelup/nestjs-modules": "^0.6.1",
"amqp-connection-manager": "^3.0.0",
"amqplib": "^0.8.0"
"amqplib": "^0.8.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@types/amqp-connection-manager": "^2.0.4",
"@types/amqplib": "^0.5.9"
},
"peerDependencies": {
"@nestjs/common": "^9.x",
"@nestjs/core": "^9.x",
"reflect-metadata": "^0.1.0",
"rxjs": "^7.x"
},
"publishConfig": {
"access": "public"
},
Expand Down
6 changes: 5 additions & 1 deletion packages/rabbitmq/src/amqp/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class AmqpConnection {
map((x) => x.message as T),
first()
);

const timeout$ = interval(timeout).pipe(
first(),
map(() => {
Expand Down Expand Up @@ -723,6 +723,10 @@ export class AmqpConnection {
return this._consumers[consumerTag];
}

get consumerTags(): string[] {
return Object.keys(this._consumers);
}

public async cancelConsumer(consumerTag: ConsumerTag) {
const consumer = this.getConsumer(consumerTag);
if (consumer && consumer.channel) {
Expand Down
2 changes: 2 additions & 0 deletions packages/testing/ts-jest/src/mocks.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { jest } from '@jest/globals';

type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer U>
? Array<DeepPartial<U>>
Expand Down

0 comments on commit ead4d02

Please sign in to comment.