Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dependencies to newer versions #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

A prometheus module for Nest.

__BREAKING CHANGE__

> nestjs-prom v0.2.x has been moved to [stable/0.2](https://github.com/digikare/nestjs-prom/tree/stable/0.2) branch.
>
> To migrate from v0.2 to v1.x please see [Migrate from 0.2.x to 1.x](./doc/migrate_0.2_1.x.md)
This is an updated fork from `@digikare/nestjs-prom`!

## Installation

```bash
$ npm install --save @digikare/nestjs-prom prom-client
$ npm install --save @khaledez/nestjs-prom prom-client
```

## How to use
Expand All @@ -20,7 +16,7 @@ Import `PromModule` into the root `ApplicationModule`

```typescript
import { Module } from '@nestjs/common';
import { PromModule } from '@digikare/nestjs-prom';
import { PromModule } from '@khaledez/nestjs-prom';

@Module({
imports: [
Expand Down
16 changes: 6 additions & 10 deletions lib/prom-core.module.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import {
Global,
DynamicModule,
Module,
NestModule,
MiddlewareConsumer,
Inject,
DynamicModule, Global, Inject, MiddlewareConsumer, Module,
NestModule
} from '@nestjs/common';
import { PromModuleOptions } from './interfaces';
import { DEFAULT_PROM_REGISTRY, PROM_REGISTRY_NAME, DEFAULT_PROM_OPTIONS } from './prom.constants';

import * as client from 'prom-client';
import { Registry, collectDefaultMetrics, DefaultMetricsCollectorConfiguration } from 'prom-client';
import { collectDefaultMetrics, DefaultMetricsCollectorConfiguration, Registry } from 'prom-client';
import { getRegistryName } from './common/prom.utils';
import { PromModuleOptions } from './interfaces';
import { InboundMiddleware } from './middleware';
import { DEFAULT_PROM_OPTIONS, DEFAULT_PROM_REGISTRY, PROM_REGISTRY_NAME } from './prom.constants';
import { PromService } from './prom.service';


@Global()
@Module({})
export class PromCoreModule implements NestModule {
Expand Down
2 changes: 1 addition & 1 deletion lib/prom.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Controller, Get, Header } from "@nestjs/common";
import * as client from 'prom-client';
import { PATH_METADATA } from '@nestjs/common/constants';
import * as client from 'prom-client';

@Controller()
export class PromController {
Expand Down
8 changes: 4 additions & 4 deletions lib/prom.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Module, DynamicModule } from '@nestjs/common';
import { PromCoreModule } from './prom-core.module';
import { PromModuleOptions } from './interfaces';
import { PromController } from './prom.controller';
import { DynamicModule, Module } from '@nestjs/common';
import { APP_FILTER } from '@nestjs/core';
import { PromModuleOptions } from './interfaces';
import { PromCatchAllExceptionsFilter } from './prom-catch-all.exception-filter';
import { PromCoreModule } from './prom-core.module';
import { PromController } from './prom.controller';

@Module({})
export class PromModule {
Expand Down
Loading