open-index/open-npm huggingface dataset:
npm package: @mcshovel/esp-runner
Description: Command line utility to launch or debug Google's Extensible Service Proxy
Author: MCShovel
Latest version: 1.0.4

# esp-runner

A small utility for running esp in docker.

## Usage:

    esp-runner (command) -arg=value (-arg=value )+

## Commands:

	start, run, debug

## Arguments:

    -endpoint=[service-name].endpoints.[google-project].cloud.goog
    -keyfile=serviceaccount.json # service account json key
    -esp-port=8000  # Port number for esp to listen on
    -app-port=8080  # Port number your application is listening on
    -protocol=grpc|http|https

## Example:

    esp-runner run -endpoint=[service-name].endpoints.[google-project].cloud.goog \\
        -keyfile=serviceaccount.json -esp-port=8000 -app-port=8080 -protocol=grpc
npm package: @mcsoft/cli
Description: CLI generador de proyectos.
Author: Jaime Brambila
Latest version: 1.0.0

# McSoft CLI

CLI generador de proyectos.

[![Software Type](https://img.shields.io/badge/McSoft-CLI-blue)](#)
[![Language](https://img.shields.io/badge/Language-Spanish-yellow)](#)
[![Software License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Version](https://img.shields.io/npm/v/@mcsoft/cli.svg)](https://www.npmjs.com/package/@mcsoft/cli)
[![Downloads](https://img.shields.io/npm/dt/@mcsoft/cli.svg)](https://www.npmjs.com/package/@mcsoft/cli)

## Instalación

```bash
npm install -g @mcsoft/cli
```

## Uso

```bash
mcsoft-cli
```

## Plantillas
| Nombre              | Descripción                                     |
|---------------------|-------------------------------------------------|
| react-libreria      | Proyecto para crear un componente de React.     |
| typescript-libreria | Proyecto para crear una librería de TypeScript. |
npm package: @mcsoft/modal
Description: Componente de React que muestra un modal (Bootstrap Modal).
Author: Jaime Brambila
Latest version: 1.0.0

# modal
Componente de React que muestra un modal (Bootstrap Modal).

[![Software Type](https://img.shields.io/badge/McSoft-React%20Library-blue)](#)
[![Language](https://img.shields.io/badge/Language-Spanish-yellow)](#)
[![Software License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Version](https://img.shields.io/npm/v/@mcsoft/modal.svg)](https://www.npmjs.com/package/@mcsoft/modal)
[![Downloads](https://img.shields.io/npm/dt/@mcsoft/modal.svg)](https://www.npmjs.com/package/@mcsoft/modal)

> **Nota:**
Este componente requiere de *Bootstrap 4* para funcionar correctamente.

## Instalación

```bash
npm install --save @mcsoft/modal
```

## Uso

```jsx
import McComponente from '@mcsoft/modal';

class Ejemplo extends Component {
  render () {
    return (
	  <McModal
	  	texto={{
			  titulo: 'Modal',
			  descripcion: 'Este es un modal.'
		  }}
	  />
    )
  }
}
```

## Props (Obligatorios)
| Propiedad | Tipo | Descripción |
|-----------|------|-------------|
| texto | object | Objeto con los textos personalizados del componente. |
| texto.titulo | string | Título que se mostrará en la cabecera del modal. |

## Props (Opcionales)
| Propiedad | Tipo | Predeterminado | Descripción |
|-----------|------|----------------|-------------|
| claseBootstrap | string | null | Clase de Bootstrap que definirá el color la cabecera del modal. |
| eventoConfirmar | Function | null | Evento que se ejecuta cuando se presiona el botón confirmar del modal.<br> **eventoConfirmar()** |
| iconoTitulo | string | null | Icono (*FontAwesome*) que se mostrará junto al título del modal. |
| tamanoModal | string | null | Clase de Bootstrap que definirá el tamaño del modal. |
| texto | object | null | Objeto con los textos personalizados del componente. |
| texto.descripcion | string | null | Mensaje que se mostrará como contenido del modal. |
| texto.etiquetaBotonCancelar | string | 'Cancelar' | Texto que se mostrará en el botón cancelar del modal. |
| texto.etiquetaBotonConfirmar | string | 'Aceptar' | Texto que se mostrará en el botón aceptar del modal. |
npm package: @mcsoft/panel-mensaje
Description: Componente de React que muestra un panel (Bootstrap Card) con un mensaje.
Author: Jaime Brambila
Latest version: 1.0.0

# panel-mensaje
Descripción.

[![Software Type](https://img.shields.io/badge/McSoft-React%20Library-blue)](#)
[![Language](https://img.shields.io/badge/Language-Spanish-yellow)](#)
[![Software License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Version](https://img.shields.io/npm/v/@mcsoft/panel-mensaje.svg)](https://www.npmjs.com/package/@mcsoft/panel-error)
[![Downloads](https://img.shields.io/npm/dt/@mcsoft/panel-mensaje.svg)](https://www.npmjs.com/package/@mcsoft/panel-error)

> **Nota:**
Este componente requiere de *Font Awesome 5* y *Bootstrap 4* para funcionar correctamente.

## Instalación

```bash
npm install --save @mcsoft/panel-mensaje
```

## Uso

```jsx
import McPanelMensaje from '@mcsoft/panel-mensaje';

class Ejemplo extends Component {
  render () {
    return (
	  <McPanelMensaje
	  	texto={{
		  mensaje: 'Ocurrió un error!',
		  titulo: 'Error'
		}}
	  />
    )
  }
}
```

## Props (Obligatorios)
| Propiedad     | Tipo   | Descripción                                          |
|---------------|--------|------------------------------------------------------|
| texto         | object | Objeto con los textos personalizados del componente. |
| texto.mensaje | string | Mensaje que se mostrará en el panel.                 |
| texto.titulo  | string | Título que se mostrará en la cabecera del panel.     |

## Props (Opcionales)
| Propiedad        | Tipo   | Predeterminado | Descripción                                                    |
|------------------|--------|----------------|----------------------------------------------------------------|
| claseBootstrap   | string |                | Clase de Bootstrap que definirá el color la cabecera del panel. <br> - danger <br> - dark <br> - info <br> - light <br> - primary <br> - secondary <br> - success <br> - warning |
| iconoDescripcion | string |                | Icono (*FontAwesome*) que se mostrará en el panel.             |
| iconoTitulo      | string |                | Icono (*FontAwesome*) que se mostrará en la cabecera del panel.|
| texto            | object |                |Objeto con los textos personalizados del componente.            |
| texto.piePagina  | string |                |Texto que se mostrará en el pie de página del panel.            |
npm package: @mcsoft/pantalla-carga
Description: Componente de React que muestra un mensaje en medio de la pantalla para indicar que la aplicación esta cargando, cubre toda la pantalla y no permite la interacción con la interfaz mientras esta visible.
Author: Jaime Brambila
Latest version: 1.0.0

# Pantalla de Carga
Componente de React que muestra un mensaje en medio de la pantalla para indicar que la aplicación esta cargando, cubre toda la pantalla y no permite la interacción con la interfaz mientras esta visible.

[![Software Type](https://img.shields.io/badge/McSoft-React%20Library-blue)](#)
[![Language](https://img.shields.io/badge/Language-Spanish-yellow)](#)
[![Software License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)
[![Version](https://img.shields.io/npm/v/@mcsoft/pantalla-carga.svg)](https://www.npmjs.com/package/@mcsoft/pantalla-carga)
[![Downloads](https://img.shields.io/npm/dt/@mcsoft/pantalla-carga.svg)](https://www.npmjs.com/package/@mcsoft/pantalla-carga)

> **Nota:**
Este componente requiere de FontAwesome 5 para funcionar correctamente.

## Instalación

```bash
npm install --save @mcsoft/pantalla-carga
```

## Uso

```jsx
import McPantallaCarga from '@mcsoft/pantalla-carga';

class Ejemplo extends Component {
  render () {
    const { estaCargando } = this.props; // Variable que controla la aparición de la pantalla de carga.
    return (
      <McPantallaCarga
        mostrar={estaCargando}
      />
    )
  }
}
```

## Props (Obligatorios)
| Propiedad     | Tipo    | Descripción                                                                   |
|---------------|---------|-------------------------------------------------------------------------------|
| mostrar       | boolean | Controla la aparición de la pantalla de carga.                                |

## Props (Opcionales)
| Propiedad      | Tipo    | Predeterminado           | Descripción                                                                         |
|----------------|---------|--------------------------|-------------------------------------------------------------------------------------|
| giroHorizontal | boolean | false                    | Indica si el icono girará horizontalmente mientras se muestra la pantalla de carga. |
| icono          | boolean | 'fas fa-spinner fa-spin' | Icono (*FontAwesome*) que se mostrará cuando la pantalla de carga sea visible.      |
| texto          | object  |                          | Objeto con los textos personalizados del componente.                                |
| texto.mensaje  | string  | 'Cargando...'            | Mensaje que se mostrará mientras la pantalla de carga sea visible.                  |
npm package: @mcsoud/react-ui
Description: React utility components
Author: McSoud
Latest version: 1.0.15

This is a minimal npm package for react utility components.

If you have a suggestion or just want to help improve this package, your contributions are very welcome!

## Usage

### Modal

The `Modal` component is a wrapper for the `<dialog>` element with a mandatory `id` attribute. Modal ids are typesafe to toggle the modal state.

```tsx
import { Modal } from "@mcsoud/react-ui";

export default function PageExample() {
  return (
    <Modal id="example">
      <h2>Example</h2>
      <p>This is an example modal.</p>
    </Modal>
  );
}
```

To declare the modal ids, you should declare the modal ids in the `ModalsRegistration` interface.

```ts
declare module "@mcsoud/react-ui" {
  interface ModalsRegistration {
    modals: Modals;
  }
}
```

### Laravel Query

The `useLaravelQuery` hook is a wrapper for the `useQuery` hook from `@tanstack/react-query` with a few extra features.

```tsx
import { useLaravelQuery } from "@mcsoud/react-ui";

export default function PageExample() {
  const Display = useLaravelQuery({
    query, // Required, takes a useQuery hook from @tanstack/react-query
    toastError: "Something went wrong", // Optional
    toastSuccess: "Something went right", // Optional
  });
  return (
    <Display
      success={(data) => <p>Success: {data}</p>} // Required
      error={(err) => <p>Error: {err.response.data.message}</p>}
      loading={<p>Loading...</p>}
    />
  );
}
```

To change the default options, you can import the `REACT_UI_OPTIONS` object and change the values.

```ts
import { REACT_UI_OPTIONS } from "@mcsoud/react-ui";

REACT_UI_OPTIONS.laravelDisplay = {
  loading: <p>Loading...</p>,
  error: <p>Something went wrong</p>,
  success: <p>Something went right</p>,
};
```

## Svgs

This package provides a few svg icons and socials.

### Loading

`<SvgLoading />`

### Close

`<SvgClose />`

### Contact

- `<SvgMail />`
- `<SvgLocation />`
- `<SvgPhone />`

### Socials

- `<SvgTwitterX />`
- `<SvgFacebook />`
- `<SvgInstagram />`
- `<SvgTikTok />`
- `<SvgWhatsapp />`
- `<SvgSnapchat />`
- `<SvgYoutube />`
- `<SvgApple />`
- `<SvgGooglePlay />`

### Icons

- `<SvgLink />`
- `<SvgEye />`
- `<SvgEyeOff />`
- `<SvgTrash />`
npm package: @mcsoud/types
Description: Types for laravel responses
Author: McSoud
Latest version: 1.0.2

This is a minimal npm package for Laravel types and a hook for displaying a query.

If you have a suggestion or just want to help improve this package, your contributions are very welcome!

## Usage

This package provides 5 types to use for the response of a Laravel request.

LaravelResponse<T, E>;
LaravelSuccess<T>;
LaravelError<E>;
LaravelObject;
LaravelPagination<T>;

### LaravelResponse

This is the main type that you will use to handle the response of a Laravel request. Always use this type to handle the response of a request. It will never let you access the data of the response without checking if the success property is true.

```ts
type LaravelResponse<S = unknown, E = unknown> =
  | LaravelSuccess<S>
  | LaravelError<E>
  | undefined;

const response: LaravelResponse<User, string[]> = (await axios.get("/me")).data;
if (response?.success) {
  console.log(response.data);
} else {
  console.log(response.errors ?? "Something went wrong");
}
```

### LaravelSuccess

This type is used when the request is successful.

```ts
interface LaravelSuccess<T = unknown> {
  success: true;
  message: string;
  data: T;
}

interface User {
  id: number;
  name: string;
  email: string;
}

const success: LaravelSuccess<User> = {
  success: true,
  message: "User retrieved",
  data: {
    id: 1,
    name: "John Doe",
    email: "john@example.com",
  },
};
```

### LaravelError

This type is used when the request is unsuccessful. Providing an array of strings as the generic type will allow you to access the different errors of the request.
Note that errors is not always defined, always have a custom fallback or refer to the message key.

```ts
interface LaravelError<T extends Array<string> | unknown = unknown> {
  success: false;
  message: string;
  errors?: T extends Array<string> ? { [k in T[number]]: string[] } : T;
}

const error: LaravelError<["email", "password"]> = {
  success: false,
  message: "Something went wrong",
  errors: {
    email: ["The email is invalid"],
    password: ["The password is invalid"],
  },
};
```

### LaravelObject

This type is used to represent the common Laravel object.

```ts
interface LaravelObject {
  id: number;
  created_at: string;
  updated_at: string;
}

interface User extends LaravelObject {
  name: string;
  email: string;
  address: string;
}
```

### LaravelPagination

This type is used to represent a Laravel pagination. Use it inside the LaravelResponse type to handle the pagination of a request.

```ts
interface LaravelPagination<T = unknown> {
  current_page: number;
  data: T;
  next_page_url: string | null;
  total_page: number;
  prev_page_url: string | null;
}

interface Posts
  extends LaravelResponse<LaravelPagination<Post>, ["date", "page"]> {}
type DifferentPosts = LaravelPagination<Post[]>;
```
npm package: @mcswift/bellman
Description: ok，this is a package what supply signal for asynchronous dependent. Support `promise` like style and `rxjs` like style api.
Author: McSwift
Latest version: 0.0.8

# BellMan

ok，this is a package what supply signal for asynchronous dependent. Support `promise` like style and `rxjs` like style api.

just directly see examples and type declare , you will can use this package.

```ts
import { Bellman } from "@mcswift/bellman"

const bellMan = new BellMan<string>();

const sub = bellMan.subscribe((val)=>{
  console.log(val)
})

bellMan.resolve("bar");
// will output: "bar"

await bellMan.signal; 
// signal is a promise proxy , you can provide it for module which dependent your code.

```
npm package: @mcswift/tsc
Description: [English](#english) | [中文](#中文)
Author: McSwift
Latest version: 1.0.19

# @mcswift/tsc

[English](#english) | [中文](#中文)

---

## 中文

提供基于 TypeScript 的声明文件生成工具，方便在打包构建等流程中快速生成 `.d.ts` 声明文件。

### 安装

```bash
npm install @mcswift/tsc
# or
pnpm add @mcswift/tsc
```

> **注意：** 使用该包需要在运行环境中已经安装了 `typescript` 并确保在 `node_modules/.bin` 下能够找到 `tsc` 命令。

### 使用指南及接口文档

你可以使用 `generatorDeclare` 快速为指定目录生成 TypeScript 声明文件，底层会自动查找并调用 `tsc`。

#### 1. 生成类型声明文件

默认会读取当前工作目录下的 `tsconfig.json` 并只输出声明文件（`--emitDeclarationOnly`）。

```typescript
import { generatorDeclare } from "@mcswift/tsc";

async function buildDeclarations() {
  // 指定源码输入目录和声明文件输出目录
  await generatorDeclare("src", "types");
  console.log("声明文件生成完毕！");
}

buildDeclarations();
```

#### 2. 自定义执行目录与配置文件

如果你的项目结构比较复杂，你可以指定执行的根目录和配置文件的路径：

```typescript
import { generatorDeclare } from "@mcswift/tsc";

async function build() {
  const rootDir = process.cwd(); // 或者指定特定的包目录
  const tsconfigPath = "./tsconfig.build.json";
  
  await generatorDeclare("src", "dist/types", rootDir, tsconfigPath);
}
```

**类型注释：**
```typescript
const generatorDeclare: (
  inputDir: string,
  outDir: string,
  root?: string,
  tsconfig?: string
) => Promise<void>;
```

---

## English

Provides a TypeScript-based declaration file generation tool, making it easy to quickly generate `.d.ts` declaration files during bundling and build processes.

### Installation

```bash
npm install @mcswift/tsc
# or
pnpm add @mcswift/tsc
```

> **Note:** Using this package requires `typescript` to be installed in your runtime environment, and ensuring the `tsc` command can be found under `node_modules/.bin`.

### Usage Guide & API Documentation

You can use `generatorDeclare` to quickly generate TypeScript declaration files for a specified directory. It automatically locates and invokes `tsc` under the hood.

#### 1. Generate Type Declaration Files

By default, it reads the `tsconfig.json` in the current working directory and only emits declaration files (`--emitDeclarationOnly`).

```typescript
import { generatorDeclare } from "@mcswift/tsc";

async function buildDeclarations() {
  // Specify the source input directory and the declaration file output directory
  await generatorDeclare("src", "types");
  console.log("Declaration files generated successfully!");
}

buildDeclarations();
```

#### 2. Custom Execution Directory and Configuration File

If your project structure is complex, you can specify the root directory for execution and the path to the configuration file:

```typescript
import { generatorDeclare } from "@mcswift/tsc";

async function build() {
  const rootDir = process.cwd(); // Or specify a specific package directory
  const tsconfigPath = "./tsconfig.build.json";
  
  await generatorDeclare("src", "dist/types", rootDir, tsconfigPath);
}
```

**Type Annotations:**
```typescript
const generatorDeclare: (
  inputDir: string,
  outDir: string,
  root?: string,
  tsconfig?: string
) => Promise<void>;
```
npm package: @mcswift/utils
Description: [English](#english) | [中文](#中文)
Author: McSwift
Latest version: 1.0.19

# @mcswift/utils

[English](#english) | [中文](#中文)

---

## 中文

`@mcswift/utils` 是一个聚合包，它重新导出了 `@mcswift` 命名空间下所有基础工具库的功能，方便开发者一次性安装并按需引入各类工具。

### 安装

```bash
npm install @mcswift/utils
# or
pnpm add @mcswift/utils
```

### 功能模块与导出路径

为了减小打包体积，所有的子包都通过 `exports` 进行了路径映射。你可以通过如下方式引入对应模块的功能：

#### 1. 基础工具 (`@mcswift/base-utils`)

包括了队列调度、日志打印、对象处理等通用工具。

```typescript
import { Scheduler, Logger, deepFreeze } from "@mcswift/utils/common";
```

#### 2. Node.js 工具 (`@mcswift/node`)

包括了文件路径解析、子进程处理、系统 Path 变量解析等。

```typescript
import { getAbsolutePath, getFilePaths, child_process } from "@mcswift/utils/node";
```

#### 3. Windows 特有工具 (`@mcswift/windows`)

封装了在 Windows 系统下执行的特有操作。

```typescript
import { windows } from "@mcswift/utils/windows";
```

#### 4. CLI 构建工具 (`@mcswift/cli`)

用于快速构建命令行应用的类和方法。

```typescript
import { Cli, Command } from "@mcswift/utils/cli";
```

#### 其他子包

像 `esbuild`、`npm`、`svn`、`tsc` 等功能也被默认导出在了根路径下，你可以直接从 `@mcswift/utils` 中导入：

```typescript
import { NpmPackage, Svn, generatorDeclare } from "@mcswift/utils";
```

> 详细的模块 API 请参考对应子包的 README 文档。

---

## English

`@mcswift/utils` is an aggregated package that re-exports all the features of the foundational utility libraries under the `@mcswift` namespace. This allows developers to install once and import various tools on demand.

### Installation

```bash
npm install @mcswift/utils
# or
pnpm add @mcswift/utils
```

### Feature Modules and Export Paths

To reduce bundle size, all sub-packages are mapped using the `exports` field. You can import features from specific modules as follows:

#### 1. Base Utilities (`@mcswift/base-utils`)

Includes common tools like queue schedulers, loggers, and object manipulation.

```typescript
import { Scheduler, Logger, deepFreeze } from "@mcswift/utils/common";
```

#### 2. Node.js Utilities (`@mcswift/node`)

Includes file path resolution, child process handling, system Path variable parsing, etc.

```typescript
import { getAbsolutePath, getFilePaths, child_process } from "@mcswift/utils/node";
```

#### 3. Windows Specific Utilities (`@mcswift/windows`)

Encapsulates specific operations executed on Windows systems.

```typescript
import { windows } from "@mcswift/utils/windows";
```

#### 4. CLI Build Utilities (`@mcswift/cli`)

Classes and methods for quickly building command-line applications.

```typescript
import { Cli, Command } from "@mcswift/utils/cli";
```

#### Other Sub-packages

Features like `esbuild`, `npm`, `svn`, `tsc`, etc., are also exported at the root level by default. You can import them directly from `@mcswift/utils`:

```typescript
import { NpmPackage, Svn, generatorDeclare } from "@mcswift/utils";
```

> For detailed module APIs, please refer to the README documentation of the respective sub-packages.