open-index/open-npm huggingface dataset:
npm package: @nesto-software/tsc-watch
Description: The TypeScript compiler with onSuccess command
Author: Gil Amran
Latest version: 2.1.2

[![Build Status](https://travis-ci.com/gilamran/tsc-watch.svg?branch=master)](https://travis-ci.com/gilamran/tsc-watch)

# The TypeScript compiler with `--onSuccess` argument

`tsc-watch` starts a TypeScript compiler with `--watch` parameter, there are 5 new arguments.

- `--onSuccess COMMAND` - The `COMMAND` will be executed on every successful TypeScript compilation.
- `--onFirstSuccess COMMAND` - The `COMMAND` will be executed only one time, on the first successful TypeScript compilation.
- `--onFailure COMMAND` - The `COMMAND` will be executed on failed TypeScript compilation.
- `--noColors` - `tsc-watch` colors the output with green on success, and in red on failiure. Add this argument to prevent that.
- `--noClear` - In watch mode the `tsc` compiler clears the screen before reporting, using this option will prevent that.
- `--compiler PATH` - The `PATH` will be used instead of typescript compiler. Defaults typescript/bin/tsc.

All above `COMMAND`s will be killed on process exit

## Install

```sh
npm install tsc-watch --save-dev
```

## Usage

### From Command-Line

```sh
## Compiles the server.ts into the dist folder and run it
tsc-watch server.ts --outDir ./dist --onSuccess "node ./dist/server.js" --onFailure "echo Beep! Compilation Failed" --compiler typescript/bin/tsc

## With tsconfig.json
tsc-watch --onSuccess "node ./dist/server.js" --onFailure "echo Beep! Compilation Failed" --compiler typescript/bin/tsc
```

### From Code

The client is implemented as an instance of `Node.JS`'s `EventEmitter`, with the following events:

- `first_success` - Emitted upon first successful compilation.
- `subsequent_success` - Emitted upon every subsequent successful compilation.
- `compile_errors` - Emitted upon every failing compilation.

Once subscribed to the relevant events, start the client by running `watch.start()`

To kill the client, run `watch.kill()`

Example usage:

```javascript
const TscWatchClient = require('tsc-watch/client');
const watch = new TscWatchClient();

watch.on('first_success', () => {
  console.log('First success!');
});

watch.on('subsequent_success', () => {
  // Your code goes here...
});

watch.on('compile_errors', () => {
  // Your code goes here...
});

watch.start('--project', '.');

try {
  // do something...
} catch (e) {
  watch.kill(); // Fatal error, kill the compiler instance.
}
```

Notes:

- The (`onSuccess`) `COMMAND` will not run if the compilation failed.
- Any child process (`COMMAND`) will be terminated before creating a new one.
- `tsc-watch` is using the currently installed TypeScript compiler.
- `tsc-watch` is not changing the compiler, just adds the new arguments, compilation is the same, and all other arguments are the same.
- `tsc-watch` was created to allow an easy dev process with TypeScript. Commonly used to restart a node server.
npm package: @nestorcalvo/ps-list
Description: Get running processes
Author: Nestor Calvo
Latest version: 1.1.2

# ps-list [![Build Status](https://travis-ci.org/sindresorhus/ps-list.svg?branch=master)](https://travis-ci.org/sindresorhus/ps-list)

> Get running processes

Works on macOS, Linux, and Windows.

Main difference from [sindresorhus/ps-list](https://www.npmjs.com/package/ps-list/v/6.3.0) is that on Windows, we are able to add a path for the fastlist.exe. If the path is missing, the package works as the original one from verision v6.3.0.

## Install

```
$ npm install ps-list
```

## Usage

```js
const psList = require("ps-list");

(async () => {
	console.log(await psList());
	//=> [{pid: 3213, name: 'node', cmd: 'node test.js', ppid: 1, uid: 501, cpu: 0.1, memory: 1.5}, …]
})();
```

> The `cmd`, `cpu`, `memory`, and `uid` properties are not supported on Windows.

## API

### psList([options])

Returns a `Promise<Array>` with the running processes.

#### options

Type: `Object`

##### all

Type: `boolean`<br>
Default: `true`

Include other users' processes as well as your own.

On Windows this has no effect and will always be the users' own processes.

##### path

Type: `string`<br>
Default: `undefined`

Path for the fastlist.exe (Windows).

If path is not set, it works as the original package [sindresorhus/ps-list](https://github.com/sindresorhus/ps-list).

## License

MIT © [Sindre Sorhus](https://sindresorhus.com)
npm package: @nestoredu96/demo-package
Description: sample package: node.js for beginners
Author: Nestor Eduardo
Latest version: 1.1.0

# Sample package: Node.js for beginners

This is a sample package to learn how to publish public packages in npm registry.

## Installation

```bash
npm install @nestoredu96/demo-package
```

## Usage
```js
import { sum, multiply } from '@nestoredu96/demo-package'
console.log(sum(1,2))
console.log(multiply(5,2))
```
npm package: @nestorrente/erdiagram-cli
Description: Entity-Relationship Diagram Code Generator CLI
Latest version: 1.0.0-rc1

# ERDiagram CLI

This application is the CLI version of the [ERDiagram library](https://github.com/nestorrente/erdiagram).

Please, refer to the library docs for further information about _ERDiagram_ features.

## Table of contents

* [Installation](#installation)
* [Usage](#usage)
    + [Generate command](#generate-command)
    + [Create config command](#create-config-command)

## Installation

```shell
npm install --global @nestorrente/erdiagram-cli
```

## Usage

```shell
erdiagram <command> [options]
```

Commands:
  * `erdiagram generate <input>`: generate the code of an entity-relationship model.
  * `erdiagram create-config`: create a config file with the default values.

Options:
  * `--help`, `-h`: Show help.
  * `--version`, `-v`  Show version number.

### Generate command

The `generate` command generates the output code from an input entity-relationship diagram written using the _ERDiagram_
language.

Usage:

```shell
erdiagram generate -f <outputFormat> [-o <outputFile>] [-c <configFile>] <input>
```

Options:
  * `--config`, `-c`: config file path (if not specified, uses `erdiagram.config.json` if exists).
  * `--format`, `-f`: output format (see below the full list of supported formats).
  * `--output`, `-o`: output file path (prints to standard output if not specified).

Supported output formats:
  * Database creation script:
    * `mysql`
    * `oracle`
    * `postgresql`, `postgres`
    * `sqlite`
    * `sqlserver`, `mssql`, `mssqlserver`
  * OOP classes/interfaces:
    * `java`
    * `typescript`, `ts`
  * Diagram:
    * `nomnoml`
    * `plantuml`

### Create config command

The `create-config` commands generates a config file with the default values.

By default, if the file already exists, it asks for confirmation, but this behaviour can be customized using the
`--override` and `--preserve` options.

```shell
erdiagram create-config [-c <configFile>]
```

Options:
* `--config`, `-c`: config file path (if not specified, uses `erdiagram.config.json` if exists).
* `--overwrite`, `-w`: overwrite existing config file without asking.
* `--preserve`, `-p`: preserve existing config file without asking.
npm package: @nestplatform/transactional-mongoose
Description: Mongoose adapter for `@nestplatform/transactional`.
Author: Đường Trung Nguyên
Latest version: 1.1.2

# @nestplatform/transactional-mongoose

Mongoose adapter for `@nestplatform/transactional`.

## Installation

```bash
npm install @nestplatform/transactional @nestplatform/transactional-mongoose
```

## Basic Usage

### 1. Register the module

```typescript
import { getConnectionToken } from "@nestjs/mongoose";
import { Connection } from "mongoose";
import { TransactionalModule } from "@nestplatform/transactional";
import { MongooseTransactionAdapter } from "@nestplatform/transactional-mongoose";

@Module({
  imports: [
    TransactionalModule.registerAsync({
      inject: [getConnectionToken()],
      useFactory: (connection: Connection) => ({
        adapters: new MongooseTransactionAdapter(connection),
      }),
    }),
  ],
})
export class AppModule {}
```

### 2. Use `@Transactional` in your services

```typescript
@Injectable()
export class OrderService {
  constructor(@InjectModel(Order.name) private readonly orderModel: Model<Order>) {}

  @Transactional()
  async createOrder(productName: string, amount: number) {
    const order = new this.orderModel({ productName, amount });
    return order.save();
  }
}
```

## Features

- **Propagation Support**: Supports `REQUIRED` and `REQUIRES_NEW`. `NESTED` falls back to `REQUIRED` (not natively supported by MongoDB).
- **Auto-session binding**: Automatically attaches the active session to Mongoose model queries within the transaction context.
- **Synchronizations**: Supports `afterCommit`, `afterRollback`, and `afterCompletion` hooks.

## Prerequisites

- MongoDB replica set or sharded cluster (required for transactions).
- NestJS with `@nestjs/mongoose`.

## Changelog

### 1.1.2
- adjust to allow multi layers transactional (hexagonal, clean architecture)

### 1.0.0
- release first version supporting for mongoose
npm package: @nestplatform/transactional-typeorm
Description: TypeORM transaction adapter for `@nestplatform/transactional`, providing seamless transaction management for TypeORM in NestJS.
Author: Đường Trung Nguyên
Latest version: 1.1.2

# @nestplatform/transactional-typeorm

TypeORM transaction adapter for `@nestplatform/transactional`, providing seamless transaction management for TypeORM in NestJS.

## Features

- 🔄 **TypeORM Integration**: Fully compatible with TypeORM's `QueryRunner` and `DataSource`.
- 🧩 **Propagation Support**: Implements `REQUIRED`, `REQUIRES_NEW`, and `NESTED` (via savepoints).
- 🧬 **Proxy Support**: Automatically intercepts repository calls and redirects them to the active transaction's manager.
- 🛡️ **Isolation Levels**: Support for custom isolation levels (`READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, `SERIALIZABLE`).

## Installation

```bash
npm install @nestplatform/transactional @nestplatform/transactional-typeorm
```

## Usage

### 1. Register the adapter

```typescript
import { TransactionalModule } from '@nestplatform/transactional';
import { TypeOrmTransactionAdapter } from '@nestplatform/transactional-typeorm';

@Module({
  imports: [
    TransactionalModule.registerAsync({
      inject: [DataSource],
      useFactory: (dataSource: DataSource) => ({
        adapters: new TypeOrmTransactionAdapter(dataSource),
        logging: true,
      }),
    }),
  ],
})
export class AppModule {}
```

### 2. Transaction Propagation

The adapter handles the complex logic of starting, committing, and rolling back transactions based on the propagation level specified in `@Transactional()`.

#### REQUIRED (Default)

The adapter joins an existing transaction if one is present in the `TransactionContext`, or starts a new one otherwise.

#### REQUIRES_NEW

The adapter always starts a new transaction. If one already exists, it is suspended, and the new transaction runs independently.

#### NESTED

The adapter creates a `SAVEPOINT` within the current transaction. If the nested operation fails, only that `SAVEPOINT` is rolled back, leaving the parent transaction intact.

## Under the Hood

The `TypeOrmTransactionAdapter` uses a **Proxy Pattern** on your service instances to intercept calls to TypeORM repositories. When a transaction is active, the adapter ensures that repositories use the `QueryRunner.manager` from the current transaction context instead of the global `EntityManager`.

## Changelog

### 1.1.2
- adjust to allow multi layers transactional (hexagonal, clean architecture)

### 1.1.0
- Added support for transaction synchronization hooks (`beforeCommit`, `afterCommit`, `afterRollback`, `afterCompletion`).
- Improved `shouldRollback` logic to support error names (strings) and single class instances.
- Integrated `invokeBeforeCommit` before physical commit for all propagation levels.

### 1.0.1
- Fixed TypeORM peer dependency support for NestJS 11.

### 1.0.0
- Initial release with `TypeOrmTransactionAdapter` and basic propagation support.

## License

MIT
npm package: @nestpress/passport
Description: The passport initializer module for NestJS
Author: Yoshihide Shiono
Latest version: 1.0.0
Deprecated: Please consider to use the ARK way: https://github.com/saltyshiomix/ark

<p align="center">😎 @nestpress/passport 😎</p>
<p align="center">The passport initializer module for NestJS</p>
<p align="center">
  <a href="https://npm.im/@nestpress/passport" alt="A version of @nestpress/passport">
    <img src="https://img.shields.io/npm/v/@nestpress/passport.svg">
  </a>
  <a href="https://npm.im/@nestpress/passport" alt="Downloads of @nestpress/passport">
    <img src="https://img.shields.io/npm/dt/@nestpress/passport.svg">
  </a>
  <img src="https://img.shields.io/npm/l/@nestpress/passport.svg" alt="Package License (MIT)">
</p>

## Installation

```bash
$ npm install --save @nestpress/passport passport
```

## Usage

In your application main entry point, just use it like below:

```ts
import { NestFactory } from '@nestjs/core';
import { PassportModule } from '@nestpress/passport';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  app.get(PassportModule).initialize(app);

  app.listen(3000, '0.0.0.0', () => {
    console.log('Ready on http://localhost:3000');
  });
}

bootstrap();
```

## Options

```ts
import { NestFactory } from '@nestjs/core';
import { PassportModule } from '@nestpress/passport';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  // these are default options
  app.get(PassportModule).initialize(app, {
    serializeUserFn: (user: any, cb: any) => cb(null, user),
    deserializeUserFn: (obj: any, cb: any) => cb(null, obj),
  });

  app.listen(3000, '0.0.0.0', () => {
    console.log('Ready on http://localhost:3000');
  });
}

bootstrap();
```
npm package: @nestql/prisma-crud
Description: ![integration logo](img/screenshot.png)
Author: Serge Närhi
Latest version: 5.0.4

![integration logo](img/screenshot.png)

# @nestjs/graphql & prisma integration

Prisma generator to emit `@nestjs/graphql` types and CRUD resolvers from your `Prisma` schema.

## Documentation

Coming soon

## Samples

Coming soon
npm package: @nestray/better-validation-pipe
Description: This pipe extends Nest's [built-in validation pipe](https://docs.nestjs.com/techniques/validation#using-the-built-in-validationpipe) and makes it a bit more descriptive.
Author: Alireza Zamani
Latest version: 0.1.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Better Validation Pipe

This pipe extends Nest's [built-in validation pipe](https://docs.nestjs.com/techniques/validation#using-the-built-in-validationpipe) and makes it a bit more descriptive.

## Introduction

The default validation pipe is great, but error it returns is just an array of errors:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": ["email must be an email", "phone cannot be empty"]
}
```

This package changes the `message` to be an object with field names as keys:

```json
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": {
    "email": ["email must be an email"],
    "phone": ["phone cannot be empty"]
  }
}
```

So then, on your frontend, you can show each error next to its relavant field, instead of showing all of them at the end of your form

## Installation

On Yarn:

```shell
yarn add @nestray/better-validation-pipe
```

On NPM:

```shell
npm install @nestray/better-validation-pipe
```

## Motivation

This behavior is achievable by passing a custom `exceptionFactory` to the original pipe, but I found myself writing the same exception factory for each one of my projects, so I made this small package.

## Inspiration

This is the same way [Laravel](https://laravel.com/docs/master/validation) returns errors; as an object that contains arrays of errors (strings).
npm package: @nestrx/access-control
Description: Module access control for NestJS framework.
Author: zinzinday@gmail.com
Latest version: 0.0.2

# ACCESS CONTROL
The module encryption AES GCM for [NestJS framework](https://nestjs.com/).

## Installation

npm: 
```bash
npm i @nestrx/access-control
```
yan
```bash
yan add @nestrx/access-control
```

## Configure


app.module.ts
```ts
...
@Module({
	...
	imports: [
		...
		AccessControlModule,
		...
	],
	...
})
...
```

## Usage

your.controller.ts

```ts
...
@Controller('route')
export class YourController{

	@Get()
	@Role() // default user role
	action(@Query() query: any): string{
		// todo something
	}
	@Post()
	@Role('admin')
	adminAccess(@Body() data: any, @User('id') accessBy: string): string{
		// todo something
	}
}
...
```