open-index/open-npm huggingface dataset:
npm package: @nestio/pam
Description: Nestio UI modules
Author: Funnel Leasing, Inc.
Latest version: 2.0.8

# Pam

![Pam Poovey](http://i.imgur.com/in35Gcv.jpg)

Nestio React Component Kit

### How To Develop

- `npm install`
- `npm start`
- `http://localhost:8888`
- develop...

### How to Release a new version

- Update version in package.json, commit, and push
- Create a new release in github
    - Tag: new version number
    - Name: new version number
    - Description: Reference all PRs that are in the release

    ![Release form](http://nestio-wiki.s3.amazonaws.com/pam/release.png)

- Release a new version to npm

    `npm publish`

- Bump the version in corresponding package.json where pam is a dependency

### Required Webpack Loaders

Pam loads css via sass-loader and css-loader with cssModules. To use in webpack, the following loaders need to be added to your webpack config(s).

```javascript
{
    test: /\.(css|scss)$/,
    loaders: [
        'style-loader',
        'css-loader?modules&importLoaders=1&localIdentName=pam__[name]__[local]',
        'sass-loader'
    ],
    include: [/node_modules\/@nestio\/pam\//]
},
{
    test: /\.(eot|otf|svg|ttf|woff|woff2)$/,
    loaders: ['url-loader'],
    include: [/node_modules\/@nestio\/pam\//],
},
```

### Legal Stuff

~~~
MIT License

Copyright (c) 2022 Funnel Leasing, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
~~~
npm package: @nestixis/cache-manager
Description: Cache Manager is a lightweight and efficient library for managing redis caching in your applications.
Latest version: 0.0.9

# Cache Manager

Cache Manager is a lightweight and efficient library for managing redis caching in your applications.

## Features

- Simple API for adding, retrieving, and deleting cache entries.
- Configurable expiration policies for cached items.
- Supports redis
- Lightweight and fast.

## Installation

Install the package using npm

```sh
npm i @nestixis/cache-manager
```

## Usage

Here’s a quick example of how to use Cache Manager:

Module registration

```ts
@Module({
  imports: [
    CacheModule.registerAsync({
      isGlobal: true,
      imports: [ConfigModule],
      useFactory: (configService: ConfigService) => ({
        redis: {
          host: configService.get('REDIS_HOST') || 'localhost',
          port: +configService.get('REDIS_PORT') || 6379,
        },
        cachePrefix: 'cache:',
        defaultCacheTTL: 1000,
      }),
      inject: [ConfigService],
    }),
  ],
})
export class AppModule {}
```

Manual interaction with CacheManager

```ts
export class Service {
  constructor(private readonly cacheManager: CacheManager) {}

  async add(): Promise<void> {
    //...
    await this.cacheManager.set('key', { value: 1 }, 1000);
  }

  async remove(): Promise<void> {
    //...
    await this.cacheManager.delete('key');
  }

  async get(): Promise<any> {
    const cached = await this.cacheManager.get('key');
    if (cached) return cached;
  }
}
```

Automatic response caching. There are two interceptors first

- CacheInterceptor - saves response for time defined by ttl.

- CacheRemoveInterceptor - removes cache, can be used on POST, DELETE, PUT, PATCH methods. It ensures that cache will be removed.

```ts
@Controller('site/:token')
@CacheTrackBy({
  prefix: 'site'
  ttl: 10000,
  by: [
    {
      by: 'param',
      name: 'token',
    }
  ]
})
export class SiteController {
  constructor(
    private readonly service: Service
  )

  @Get()
  @UseInterceptors(CacheInterceptor)
  async get(): Promise<any> {
    return this.service.get();
  }

  @Post()
  @UseInterceptors(CacheRemoveInterceptor)
  async add(): Promise<void> {
    await this.service.add();
  }

  @Delete()
  @UseInterceptors(CacheRemoveInterceptor)
  async remove(): Promise<void> {
    await this.service.remove();
  }
}
```
npm package: @nestixis/nestjs-meilisearch
Description: NestJS wrapper for Meilisearch SDK
Author: Nestixis
Latest version: 1.0.0

# nestjs-meilisearch

## Installation

To install the package, run:
```bash
npm i @nestixis/nestjs-meilisearch
```

## Registration

To register the module in your application, you can use the `MeilisearchSdkModule.registerAsync` method with a factory pattern:

```typescript
import { MeilisearchSdkModule } from "@nestixis/nestjs-meilisearch";
import { ConfigModule, ConfigService } from "@nestjs/config";

MeilisearchSdkModule.registerAsync({
  imports: [ConfigModule],
  useFactory: (configService: ConfigService) => ({
    auth: {
      url: configService.get<string>('MEILISEARCH_URL'),
      key: configService.get<string>('MEILISEARCH_AUTH_KEY'),
    },
  }),
  inject: [ConfigService],
});
```

## Usage

To use the Meilisearch client in your service, inject it using the `MEILISEARCH_SDK_CLIENT` token:

```typescript
import { MeiliSearch } from 'meilisearch';
import { Inject } from '@nestjs/common';
import { MEILISEARCH_SDK_CLIENT } from '@nestixis/nestjs-meilisearch';

@Injectable()
export class YourService {
  constructor(
    @Inject(MEILISEARCH_SDK_CLIENT) private readonly meiliSearchClient: MeiliSearch
  ) {}

  async yourMethod() {
    const index = this.meiliSearchClient.index('your_index');
    const { hits } = await index.search('your_query');
    return hits;
  }
}
```
npm package: @nestixis/nestjs-supabase
Description: NestJS wrapper for Supabase SDK
Author: Nestixis
Latest version: 1.0.0

# nestjs-supabase

## Installation

To install the package, run:
```bash
npm i @nestixis/nestjs-supabase
```

## Registration

To register the module in your application, you can use the `SupabaseSdkModule.registerAsync` method with a factory pattern:

```typescript
import { SupabaseSdkModule } from "@nestixis/nestjs-supabase";
import { ConfigModule, ConfigService } from "@nestjs/config";

SupabaseSdkModule.registerAsync({
  imports: [ConfigModule],
  useFactory: (configService: ConfigService) => ({
    auth: {
      url: configService.get<string>('SUPABASE_AUTH_URL'),
      key: configService.get<string>('SUPABASE_SERVICE_ROLE_KEY'),
    },
  }),
  inject: [ConfigService],
});
```

## Usage

To use the Supabase client in your service, inject it using the `SUPABASE_SDK_CLIENT` token:

```typescript
import { SupabaseClient } from '@supabase/supabase-js';
import { Inject } from '@nestjs/common';
import { SUPABASE_SDK_CLIENT } from '@nestixis/nestjs-supabase';

@Injectable()
export class YourService {
  constructor(
    @Inject(SUPABASE_SDK_CLIENT) private readonly supabaseClient: SupabaseClient
  ) {}

  async yourMethod() {
    const { data, error } = await this.supabaseClient
      .from('your_table')
      .select('*');
    if (error) {
      throw error;
    }
    return data;
  }
}
```
npm package: @nestjs-architects/aop
Description: A library that makes aspect-oriented programming simpler
Author: Maciej Sikorski
Latest version: 0.2.0

# @nestjs-architects/aop

[![version](https://img.shields.io/npm/v/@nestjs-architects/aop.svg)](https://www.npmjs.com/package/@nestjs-architects/aop)
[![downloads](https://img.shields.io/npm/dt/@nestjs-architects/aop.svg)](https://www.npmjs.com/package/@nestjs-architects/aop)

## Profit

This package will help you make your services clean and focused on the feature.
Many **non-functional** requirements can be easily added using Aspect-Oriented Programming.

### Learn more

[Aspect-oriented programming with NestJS](https://medium.com/@maciejsikorski/aspect-oriented-programming-with-nestjs-a2e420d9980e)

## Usage

```sh
$ npm i @nestjs-architects/aop
```

Create your own advice (additional piece of code executed along with the original method)

```typescript
import { AdviceProvider } from '@nestjs-architects/aop';

interface LoggingOptions {
  format: 'JSON' | 'TEXT';
}

class LoggingAdvice implements AdviceProvider {
  async attach(
    originalMethod: Function,
    args: unknown[],
    options: LoggingOptions,
    targetObject: Record<string, (arg: unknown) => Promise<unknown> | unknown>
  ): Promise<unknown> {
    console.log('Before...');
    const result = await originalMethod(...args);
    console.log('After...');
    return result;
  }
}
```

Define a decorator and attach it to your methods

```typescript
import { SetMetadata } from '@nestjs/common';

const LOGGING_KEY = 'LOGGING';
export const Logging = (options: LoggingOptions) =>
  SetMetadata(LOGGING_KEY, options);
```

```typescript
@Injectable()
export class AppService {
  @Logging()
  getHello(): string {
    console.log('Initial method called');
    return 'Hello World!';
  }
}
```

Register both as your own aspect

```typescript
import { AopModule, AspectsRegistry } from '@nestjs-architects/aop';
import { Module } from '@nestjs/common';

@Module({
  imports: [AopModule],
  providers: [LoggingAdvice],
})
export class LoggingModule {
  constructor(
    private readonly registry: AspectsRegistry,
    private readonly loggingAdvice: LoggingAdvice
  ) {
    this.registry.addAspect(LOGGING_KEY, this.loggingAdvice);
  }
}
```

## Profit

Now, every time the decoreted method is called the additional code provided by you is executed too.

![showcase](showcase.png)

## Adding aspects to services created manually

There are cases when you would like to create a new service dynamically, not just inject it.

For such services you can use `AspectsApplier`.

```typescript
import { AspectsApplier } from '@nestjs-architects/aop';
import { Injectable } from '@nestjs/common';

export class Speaker {
  @Logging()
  speak() {
    console.log('I am not a singleton');
  }
}

@Injectable()
export class AppService {
  constructor(private readonly aspectsApplier: AspectsApplier) {}
  speak() {
    const service = new Speaker();
    this.aspectsApplier.applyToProvider(service);
    service.speak();
  }
}
```
npm package: @nestjs-architects/cqrs
Description: Extended CQRS module for NestJS framework
Latest version: 8.0.0-beta.0

<h1 align="center"> CQRS from NestJS Architects</h1>

<p align="center">
<a href="https://www.npmjs.com/~nestjs-architects"><img src="https://img.shields.io/npm/v/@nestjs-architects/cqrs.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjs-architects"><img src="https://img.shields.io/npm/l/@nestjs-architects/cqrs.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjs-architects"><img src="https://img.shields.io/npm/dm/@nestjs-architects/cqrs.svg" alt="NPM Downloads" /></a>
  <a href="https://twitter.com/NestJSArchitect"><img src="https://img.shields.io/twitter/follow/NestJSArchitect.svg?style=social&label=Follow"></a>
</p>

## Description

Extended **CQRS** module for NestJS framework.

## Installation

```bash
$ npm install --save @nestjs-architects/cqrs
```

## Quick Start

[Overview & CQRS Tutorial](https://docs.nestjs.com/recipes/cqrs)

Additionally this package introduces many bugfixes and built in [Typed CQRS](https://www.npmjs.com/package/@nestjs-architects/typed-cqrs).

## Stay in touch

* Twitter - [@NestJSArchitect](https://twitter.com/NestJSArchitect)

## Authors

* [Maciej Sikorski](https://github.com/Sikora00)
* [Kamil Gajowy](https://github.com/kgajowy)
* [Dominik Ostrowski](https://github.com/Dyostiq)
npm package: @nestjs-architects/typed-cqrs
Description: Enhance the @nestjs/cqrs building blocks with auto-inferring types.
Latest version: 2.1.0

# @nestjs-architects/typed-cqrs

[![version](https://img.shields.io/npm/v/@nestjs-architects/typed-cqrs.svg)](https://www.npmjs.com/package/@nestjs-architects/typed-cqrs)
[![downloads](https://img.shields.io/npm/dt/@nestjs-architects/typed-cqrs.svg)](https://www.npmjs.com/package/@nestjs-architects/typed-cqrs)

Tired of hand-typing types for NestJS CQRS package? We got you covered!

# Usage

First install base `@nestjs/cqrs` package.

```sh
$ npm i @nestjs/cqrs
```

All you need to do, is to extend your query with type of expected response.

```typescript
import { Query } from '@nestjs-architects/typed-cqrs';

export class GetProfileQuery extends Query<ResultType> {}
```

# Profit

Now, when implementing handler, you get all type completion & safety!

![showcase-handler](typed-handler.gif)

```typescript
import { IInferredQueryHandler, QueryHandler } from '@nestjs/cqrs';

@QueryHandler(GetProfileQuery)
export class GetProfileHandler implements IInferredQueryHandler<GetProfileQuery> {}
```

As well as, results are correctly typed as well!
![showcase-handler](typed-outcome.gif)

# Development - verify if package works

After running `npm run build`, run `npm link` from the root directory to have it visible as globally installed package.

Next, in the project you want to use it, within its root directory, run `npm link @nestjs-architects/typed-cqrs`
npm package: @nestjs-auth/email-password
Description: A plug-and-play auth module for the NestJS framework
Author: jumper
Latest version: 0.0.51

# `nestjs-jwt-auth` A plug-and-play auth module for the NestJS framework 🚀.

_This project is currently in development. More updates and a stable release to come!_

## Installation

`npm install --save nestjs-jwt-auth`

## Usage

```ts
// app.module.ts
import { NestAuthModule } from 'nestjs-jwt-auth';


imports: [
	NestAuthModule,
]
```

The `nestjs-jwt-auth` module will automatically load your database connection.

You must have a database table called `user` with at least the fields:

- username
- password
npm package: @nestjs-bff/backend
Description: A backend module for nestjs-bff
Author: ahrnee
Latest version: 1.1.4

# nestjs-bff-backend

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the infrastructure code for the backend api

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The client-side example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/frontend
Description: A frontend module for nestjs-bff
Author: ahrnee
Latest version: 0.4.0

# nestjs-bff-frontend

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the infrastructure code for the frontend

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The client-side example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/global
Description: A backend and frontend module for nestjs-bff
Author: ahrnee
Latest version: 0.4.0

# nestjs-bff-global

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the global code that is shared between the backend api and the client. Typically, this is contracts and DTOs, but it can also contain global logic.

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The client-side example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/global-contracts
Description: A backend and frontend module for nestjs-bff
Author: ahrnee
Latest version: 1.1.4

# nestjs-bff-global

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the global code that is shared between the backend api and the client. Typically, this is contracts and DTOs, but it can also contain global logic.

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The frontend example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/global-utils-dev
Description: A backend and frontend module for nestjs-bff
Author: ahrnee
Latest version: 1.1.4

# nestjs-bff-global

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the global code that is shared between the backend api and the client. Typically, this is contracts and DTOs, but it can also contain global logic.

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The frontend example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/global-utils-prod
Description: A backend and frontend module for nestjs-bff
Author: ahrnee
Latest version: 1.1.4

# nestjs-bff-global

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the global code that is shared between the backend api and the client. Typically, this is contracts and DTOs, but it can also contain global logic.

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The frontend example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)
npm package: @nestjs-bff/universal
Description: A backend and frontend module for nestjs-bff
Author: ahrnee
Latest version: 0.1.0

# nestjs-bff-universal

This is a companion package for [nestjs-bff](https://github.com/ahrnee/nestjs-bff). This package contains the universal code that is shared between the backend api and the client. Typically, this is contracts and DTOs, but it can also contain universal logic.

## Overview

[NestJS-BFF](https://github.com/ahrnee/nestjs-bff) is a starter project for those looking to fast-track building a strongly typed, enterprise-grade, modern NodeJs application, with supporting tooling.

This implementation uses the [BFF](https://samnewman.io/patterns/architectural/bff/) pattern, leveraging [NestJS](https://nestjs.com/) as the primary framework for the backend API. The client-side example is in [Angular](https://angular.io/), although any client-side Javascript framework can easily be used, including [React](https://reactjs.org/), or [Vue](https://vuejs.org/) js.

## Documentation

Documentation and further details can be found in the [nestjs-bff github repo](https://github.com/ahrnee/nestjs-bff)