open-index/open-npm huggingface dataset:
npm package: @habibovulugbek/logger
Description: Logger for NestJS
Author: Tune Consulting
Latest version: 1.1.2

# Logger for NestJS

<!-- ### Disclaimer -->

<!-- This is a **private package**, you need an **access token** to install this package. Please contact
[me](https://t.me/iaxel) to get an access token. -->

### Before installation

If you want to use `Logger`, you must install additional packages:

```bash
$ npm install --save @nestjs/common @habibovulugbek/logger
```

## Getting started

### HttpLoggerInterceptor

You can use `HttpLoggerInterceptor` in your `main.ts` file to represent your request and response.

```ts
// main.ts
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
import { HttpLoggerInterceptor } from '@habibovulugbek/logger'

async function bootstrap() {
  const app = await NestFactory.create(AppModule)
  app.useGlobalInterceptors(new HttpLoggerInterceptor())
  await app.listen(3000)
}
```

### RpcLoggingInterceptor

You can use `RpcLoggingInterceptor` in your `main.ts` file to represent your request and response.

```ts
//main.ts

import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'
import { RpcLoggingInterceptor } from '@habibovulugbek/logger'

async function bootstrap() {
  const app = await NestFactory.createMicroservice(AppModule, {
    transport: Transport.TCP,
    options: {
      host: '127.0.0.1',
      port: 3000,
    },
  })
  app.useGlobalInterceptors(new RpcLoggingInterceptor())
  await app.listenAsync()
}
bootstrap()
```

Enjoy!
npm package: @habibovulugbek/nest-circuit-breaker
Description: Circuit breaker for NestJS
Author: Habibov Ulugbek
Latest version: 0.0.17

# Circuit Breaker for NestJS

### Before installation

To install this package, run the following commands:

## Installation

```bash
$ pnpm add --save-prod @habibovulugbek/nest-circuit-breaker
```

If you want to use the `RpcExceptionFilter`, `ExpressExceptionFilter` or `FastifyExceptionFilter` filter with the
`ExceptionInterceptor` interceptor, you must install additional packages:

```bash
$ pnpm add --save-prod @nestjs/common reflect-metadata rxjs
```

## Getting started

You can use the `RpcExceptionFilter` filter with the `ExceptionInterceptor` interceptor in the `main.ts` file to handle
all exceptions in the rpc application:

```ts
// main.ts
import type { NatsOptions } from '@nestjs/microservices'
import { NestFactory } from '@nestjs/core'
import { Transport } from '@nestjs/microservices'
import { RpcExceptionFilter, ExceptionInterceptor } from '@sello-lab/exceptions'
import { AppModule } from './app.module'

setImmediate(async (): Promise<void> => {
  const app = await NestFactory.createMicroservice<NatsOptions>(AppModule, {
    transport: Transport.NATS,
    options: {
      servers: ['nats://127.0.0.1:4222'],
    },
  })

  app.useGlobalFilters(new RpcExceptionFilter())
  app.useGlobalInterceptors(new ExceptionInterceptor())

  await app.listen()
})
```

You can use the `ExpressExceptionFilter` filter with the `ExceptionInterceptor` interceptor in the `main.ts` file to
handle all exceptions in the express application:

```ts
// main.ts
import type { NestExpressApplication } from '@nestjs/platform-express'
import { NestFactory } from '@nestjs/core'
import { ExpressAdapter } from '@nestjs/platform-express'
import { ExpressExceptionFilter, ExceptionInterceptor } from '@sello-lab/exceptions'
import { AppModule } from './app.module'

setImmediate(async (): Promise<void> => {
  const app = await NestFactory.create<NestExpressApplication>(AppModule, new ExpressAdapter())

  app.useGlobalFilters(new ExpressExceptionFilter())
  app.useGlobalInterceptors(new ExceptionInterceptor())

  await app.listen(3000, '127.0.0.1')
})
```

You can use the `FastifyExceptionFilter` filter with the `ExceptionInterceptor` interceptor in the `main.ts` file to
handle all exceptions in the fastify application:

```ts
// main.ts
import type { NestFastifyApplication } from '@nestjs/platform-fastify'
import { NestFactory } from '@nestjs/core'
import { FastifyAdapter } from '@nestjs/platform-fastify'
import { FastifyExceptionFilter, ExceptionInterceptor } from '@sello-lab/exceptions'
import { AppModule } from './app.module'

setImmediate(async (): Promise<void> => {
  const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter())

  app.useGlobalFilters(new FastifyExceptionFilter())
  app.useGlobalInterceptors(new ExceptionInterceptor())

  await app.listen(3000, '127.0.0.1')
})
```

There are **11 exceptions** in this package. You can use them in your project.

Enjoy!
npm package: @habini86/lint-ts-node
Description: It's the lightest and simplest TypeScript linter for Node.js!
Latest version: 3.0.0

# Habini ESLint Config

## Setup

### Instalar dependências:
```bash
npm i -D eslint @vitest/eslint-plugin @habini86/lint-ts-node
```

# Configuração do ESLint para Node.js

## Passo a passo

### 1. Dentro do arquivo `eslint.config.mjs`:
Adicione o seguinte código:

```javascript
import config from '@habini86/lint-ts-node/node.mjs';

export default config;
```