open-index/open-npm huggingface dataset:
npm package: @orchejs/common
Description: Orche - Common functionalities shared by the orchejs projects
Author: Mauricio Gemelli Vigolo
Latest version: 0.4.0

Orchejs Common
==================

[![Build Status](https://travis-ci.org/orchejs/common.svg?branch=master)](https://travis-ci.org/orchejs/common)
[![Coverage Status](https://coveralls.io/repos/github/orchejs/common/badge.svg?branch=master)](https://coveralls.io/github/orchejs/common?branch=master)

-------

This module is used internally by other orchejs projects. Briefly it contains utilities classes,
decorators and loaders that are shared between the projects.

-------
## Topics

- [About Orchejs](#aoj)
- [How to use it in Orchejs](#huo)
- [Contributing](#con)
- [License](#lic)

## <a name="aoj"></a> About Orchejs

The Orchejs project provides a set of libraries aggregating key technologies and consolidated libraries for the development of APIs in Node.js.

The goal is to make the backend development in Node.js even more productive, organized and that promotes scalability and maintainability.

## <a name="huo"></a> How to use it in Orchejs

### How to install?

This library is already bundled in Orchejs projects. So you don't need to install anything.

## <a name="con"></a> Contributions

If you want to contribute to the project, please check out the [contributing](CONTRIBUTING.md) 
document.

**Thanks for supporting Orchejs!**

## <a name="lic"></a> License

MIT License

Copyright (c) 2017 Mauricio Gemelli Vigolo

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: @orchenginex/cli
Description: OrchEngineX CLI — failure simulation and architecture analysis from the command line
Author: OrchEngineX
Latest version: 1.0.0

# @orchenginex/cli

> OrchEngineX CLI (`oex`) — failure simulation & architecture analysis from the command line.

## Install

```bash
npm install -g @orchenginex/cli
```

## Quick Start

```bash
# Authenticate
oex login --token <YOUR_API_TOKEN>

# Scaffold a project
oex init --template microservices

# Validate architecture
oex validate architecture.json

# Run a simulation
oex simulate architecture.json \
  --traffic 25000 \
  --failure-node api-gateway \
  --latency 200

# Export results
oex export sim <RUN_ID> --output results.json

# Visualize
oex visualize graph architecture.json --output topology.png

# Run experiments
oex experiments run architecture.json --matrix experiment.json
```

## Commands

| Command | Description |
|---------|-------------|
| `oex login` | Authenticate via browser or API token |
| `oex init` | Scaffold a new project with templates |
| `oex validate` | Validate architecture JSON against schema |
| `oex simulate` | Run failure simulations |
| `oex export` | Export architectures, results, fragility data |
| `oex visualize` | Generate topology graphs, heatmaps, trend charts |
| `oex experiments` | Manage batched simulation experiments |

## Environment Variables

| Variable | Description |
|----------|-------------|
| `OEX_API_TOKEN` | API token (overrides stored credentials) |
| `OEX_API_URL` | API base URL (default: `https://api.orchenginex.com`) |

## License

MIT
npm package: @orchestra-mcp/ai
Description: AI chat and copilot components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/ai

AI chat and copilot components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/ai
# or
pnpm add @orchestra-mcp/ai
```

## Usage

```tsx
import { } from '@orchestra-mcp/ai'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/devtools
Description: Developer tools components for Orchestra MCP — terminal, debugger
Latest version: 1.0.0

# @orchestra-mcp/devtools

Developer tools components for Orchestra MCP — terminal, debugger

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/devtools
# or
pnpm add @orchestra-mcp/devtools
```

## Usage

```tsx
import { } from '@orchestra-mcp/devtools'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/editor
Description: Code and Markdown editor components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/editor

Code and Markdown editor components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/editor
# or
pnpm add @orchestra-mcp/editor
```

## Usage

```tsx
import { } from '@orchestra-mcp/editor'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/icons
Description: React SVG icon components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/icons

React SVG icon components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/icons
# or
pnpm add @orchestra-mcp/icons
```

## Usage

```tsx
import { } from '@orchestra-mcp/icons'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/search
Description: Search spotlight component for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/search

Search spotlight component for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/search
# or
pnpm add @orchestra-mcp/search
```

## Usage

```tsx
import { } from '@orchestra-mcp/search'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/tasks
Description: Task management UI components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/tasks

Task management UI components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/tasks
# or
pnpm add @orchestra-mcp/tasks
```

## Usage

```tsx
import { } from '@orchestra-mcp/tasks'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/theme
Description: Color themes and CSS variables for Orchestra MCP — Tailwind CSS v4
Latest version: 1.0.0

# @orchestra-mcp/theme

Color themes and CSS variables for Orchestra MCP — Tailwind CSS v4

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/theme
# or
pnpm add @orchestra-mcp/theme
```

## Usage

```tsx
import { } from '@orchestra-mcp/theme'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/ui
Description: Orchestra MCP UI component library — desktop-first React components
Latest version: 1.0.0

# @orchestra-mcp/ui

Orchestra MCP UI component library — desktop-first React components

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/ui
# or
pnpm add @orchestra-mcp/ui
```

## Usage

```tsx
import { } from '@orchestra-mcp/ui'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/voice
Description: Voice UI components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/voice

Voice UI components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/voice
# or
pnpm add @orchestra-mcp/voice
```

## Usage

```tsx
import { } from '@orchestra-mcp/voice'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra-mcp/widgets
Description: Utility widget components for Orchestra MCP
Latest version: 1.0.0

# @orchestra-mcp/widgets

Utility widget components for Orchestra MCP

Part of the [Orchestra MCP](https://orchestra-mcp.dev) ecosystem.

## Install

```bash
npm install @orchestra-mcp/widgets
# or
pnpm add @orchestra-mcp/widgets
```

## Usage

```tsx
import { } from '@orchestra-mcp/widgets'
```

## Requirements

- React >= 18.0.0

## License

MIT — [Orchestra MCP](https://orchestra-mcp.dev)

## Sponsor

[Sponsor this project](https://github.com/sponsors/fadymondy)
npm package: @orchestra_nexsan/cli
Description: 永乐大典地基验证器 - Orchestra Foundation Validator
Latest version: 1.0.0

# @orchestra/cli

永乐大典地基验证器 - Orchestra Foundation Validator

## 安装

```bash
npm install -g @orchestra/cli
```

## 命令

### `orchestra init`

初始化项目地基配置。

```bash
orchestra init
```

交互式创建 `.orchestra/` 目录和 `project.yaml` 配置文件。

### `orchestra check`

验证项目是否符合地基规范。

```bash
orchestra check [options]
```

**选项：**
- `--layer <0-4>` - 只验证指定层
- `--json` - 以 JSON 格式输出结果

**子命令：**
```bash
orchestra check identity      # Layer 0: 项目身份
orchestra check observability # Layer 1: 可观测性
orchestra check errors        # Layer 2: 错误处理
orchestra check config        # Layer 3: 配置管理
orchestra check quality       # Layer 4: 质量规范
```

## 验证层级

| Layer | 名称 | 检查内容 |
|-------|------|----------|
| 0 | 项目身份 | .orchestra 目录、project.yaml、timeline.md |
| 1 | 可观测性 | 日志配置、Request ID、健康检查端点 |
| 2 | 错误处理 | 错误类定义、错误码使用、统一响应格式 |
| 3 | 配置管理 | .env 文件、敏感文件忽略、环境变量规范 |
| 4 | 质量规范 | README、CHANGELOG、测试覆盖率、Linter/Formatter |

## 项目 Tier

| Tier | 名称 | 说明 |
|------|------|------|
| full | 完整版 | 所有检查项必须通过 |
| standard | 标准版 | 核心检查必须通过，高级功能推荐 |
| minimal | 最小版 | 仅基础检查 |

## 项目类型与覆盖率要求

| 类型 | 覆盖率要求 |
|------|-----------|
| library | ≥90% |
| cli | ≥80% |
| service | ≥70% |
| web-fullstack | ≥60% |
| web-frontend | ≥60% |
| web-backend | ≥70% |
| script | ≥20% |
| prototype | ≥20% |
| experiment | ≥10% |

## 示例输出

```
永乐大典 · 地基验证 v1.1
══════════════════

项目: MyProject (web-fullstack)
Tier: full

Layer 0 - 项目身份
  ✓ .orchestra/ 目录存在
  ✓ project.yaml 存在
  ✓ identity.id 已设置
  ...

Layer 1 - 可观测性
  ✓ 日志配置（代码内）
  ✓ Request ID 机制存在
  ...

════════════════════════════════════
验证通过 ✓
════════════════════════════════════
```

## 配合工具包使用

- [@orchestra/error-kit](../error-kit) - 错误处理工具包
- [@orchestra/logger](../logger) - 日志工具包
- [@orchestra/config](../config) - 配置管理工具包
- [orchestra-foundation](../python) - Python 版工具包

## License

MIT
npm package: @orchestra_nexsan/config
Description: 永乐大典配置管理工具包 - Orchestra Configuration Kit
Latest version: 1.0.0

# @orchestra/config

永乐大典配置管理工具包 - Orchestra Configuration Kit

## 安装

```bash
npm install @orchestra/config
```

## 功能

- 支持 YAML 配置文件 (config/default.yaml, config/{env}.yaml)
- 自动加载 .env 文件
- 环境变量访问 (支持类型转换)
- 环境判断 (development/production/test)
- 配置热重载

## 使用

### 基本用法

```typescript
import { config, initConfig } from '@orchestra/config';

// 初始化（可选）
initConfig({ configDir: './config' });

// 获取配置值
const dbHost = config.get('database.host', 'localhost');
const port = config.get<number>('server.port', 3000);

// 获取环境变量
const apiKey = config.env('API_KEY');
const secret = config.envRequired('APP_SECRET'); // 不存在则抛出错误
```

### 环境变量类型转换

```typescript
// 布尔值
const debug = config.envBool('DEBUG', false);

// 数字
const port = config.envNumber('PORT', 3000);

// 数组（逗号分隔）
const hosts = config.envArray('ALLOWED_HOSTS', ['localhost']);
```

### 环境判断

```typescript
if (config.isDevelopment()) {
  console.log('开发环境');
}

if (config.isProduction()) {
  // 生产环境逻辑
}

if (config.isTest()) {
  // 测试环境逻辑
}

const env = config.getEnv(); // 'development' | 'production' | 'test' | ...
```

### 自定义配置实例

```typescript
import { createConfig } from '@orchestra/config';

const myConfig = createConfig({
  configDir: './my-config',
  env: 'staging',
  loadEnv: true,
});
```

## 配置文件结构

```
project/
├── config/
│   ├── default.yaml    # 默认配置
│   ├── development.yaml
│   ├── production.yaml
│   └── test.yaml
├── .env                # 环境变量（不提交）
├── .env.local          # 本地环境变量
└── .env.example        # 环境变量模板
```

### 示例配置文件 (config/default.yaml)

```yaml
server:
  port: 3000
  host: localhost

database:
  host: localhost
  port: 5432
  name: myapp

logging:
  level: info
  format: json
```

## API

### config 对象

| 方法 | 说明 |
|------|------|
| `get(key, default?)` | 获取配置值 |
| `set(key, value)` | 设置配置值（运行时） |
| `env(key, default?)` | 获取环境变量 |
| `envRequired(key)` | 获取必需环境变量 |
| `envBool(key, default?)` | 获取布尔型环境变量 |
| `envNumber(key, default?)` | 获取数字型环境变量 |
| `envArray(key, default?)` | 获取数组型环境变量 |
| `isDevelopment()` | 是否开发环境 |
| `isProduction()` | 是否生产环境 |
| `isTest()` | 是否测试环境 |
| `getEnv()` | 获取当前环境名 |

## License

MIT
npm package: @orchestra_nexsan/error-kit
Description: 永乐大典错误处理工具包 - Orchestra Error Handling Kit
Latest version: 1.0.0

# @orchestra/error-kit

永乐大典错误处理工具包 - Orchestra Error Handling Kit

## 安装

```bash
npm install @orchestra/error-kit
```

## 功能

- 标准化错误码体系 (6位编码: 模块码2位 + 类型码1位 + 序号3位)
- 预定义错误类 (ParamError, NotFoundError, UnauthorizedError 等)
- 简化模式错误类 (SimpleError)
- 自动 HTTP 状态码映射
- JSON/API 响应格式化

## 使用

### 完整模式

```typescript
import {
  ParamError,
  NotFoundError,
  UnauthorizedError,
  ForbiddenError,
  InternalError,
  createError,
} from '@orchestra/error-kit';

// 使用预定义错误类
throw new ParamError('邮箱格式不正确');
throw new NotFoundError('用户', '123');
throw new UnauthorizedError();

// 自定义错误码
throw createError('900001', '自定义错误', {
  detail: '详细信息',
  context: { userId: '123' },
});
```

### 简化模式

```typescript
import { SimpleError } from '@orchestra/error-kit';

throw new SimpleError('NOT_FOUND', '用户不存在');
throw new SimpleError('PARAM_ERROR', '参数错误', '邮箱格式不正确');
```

### 错误处理中间件 (Express)

```typescript
import { isOrchestraError, toOrchestraError } from '@orchestra/error-kit';

app.use((err, req, res, next) => {
  const error = toOrchestraError(err);
  res.status(error.httpStatus).json(error.toResponse());
});
```

## 错误码体系

### 模块码

| 代码 | 模块 |
|------|------|
| 00 | 系统级 |
| 10 | 用户/认证 |
| 20 | 业务逻辑 |
| 30 | 数据/存储 |
| 40 | 外部服务 |
| 50 | 文件/资源 |
| 60 | 网络 |
| 70 | 安全 |
| 90 | 项目自定义 |

### 类型码

| 代码 | 类型 | HTTP 状态码 |
|------|------|-------------|
| 1 | 参数错误 | 400 |
| 3 | 权限错误 | 401 |
| 4 | 资源不存在 | 404 |
| 5 | 冲突 | 409 |
| 6 | 限制/超限 | 429 |
| 8 | 内部错误 | 500 |

## 预定义错误类

| 类 | 错误码 | HTTP 状态码 |
|---|--------|-------------|
| ParamError | 101001 | 400 |
| ParamMissingError | 101002 | 400 |
| NotFoundError | 204001 | 404 |
| UnauthorizedError | 103001 | 401 |
| ForbiddenError | 103002 | 401 |
| ConflictError | 205001 | 409 |
| RateLimitError | 706001 | 429 |
| InternalError | 008001 | 500 |

## License

MIT
npm package: @orchestrated-io/styled-grid-component
Description: fix of styled-grid-component to include compiled code
Latest version: 0.0.112

# Styled Grid Component

Grid Element for not writing any more custom grid styles because foda-se!

Notice that this component was inspired by Flex - Element -> https://www.npmjs.com/package/styled-flex-component

Test it: https://codesandbox.io/s/m7rzqw40wp

## Install 

```
yarn add styled-grid-component
or
npm i styled-grid-component
```

## Usage

```jsx
import React from 'react';
import Grid, { GridItem } from 'styled-grid-component';


export default () => (
    <Grid width="100%" height="100vh" templateColumns="repeat(3, 1fr)" gap="10px" autoRows="minmax(100px, auto)">
    <GridItem column="1 / 3" row="1">
        <h1>Hello</h1>
    </GridItem>
    <GridItem column="2 / 4" row="1 / 3">
      <h1>World!</h1>
    </GridItem>
  </Grid>
)
```

## Props

All props without description are just true or false values and take no arguments
#### Grid Wrapper

* width -> Sets the witdh
* height -> Sets the height
* templateColumns -> Sets the grid-template-columns
* gap -> Sets the grid-gap
* rowGap -> Sets the grid-row-gap
* autoRows -> Sets the grid-auto-rows

#### GridItem

* column -> Sets the grid-row
* row -> Sets the grid-row

# License
MIT