open-index/open-npm huggingface dataset:
npm package: @mopo/boilerplate
Description: Library or framework boilerplate for monorepo
Author: BellYang
Latest version: 1.0.1

# Project Templates

The boilerplate package provides project templates and project initialization functionality.

## Docs

(boilerplate)[https://mopo-cli.vercel.app/extensions/boilerplate]

## Core Features

1. **Template Management**
   - Supports project templates for multiple frameworks
   - Currently supported template types:
     - Vue 2
     - Vue 3
     - React
     - Wrapper (Wrapper template)
   - Unified template directory path management via the `templateDir` function

2. **Project Initialization**
   - Provides `generatePackageJson` utility function
   - Used to generate project package.json configuration files
   - Ensures standardization of project dependencies and configurations

## API Reference

### templateDir

```typescript
function templateDir(name: 'vue2' | 'vue3' | 'react' | 'wrapper'): string
```

Currently, this package's functionality is relatively basic. Future updates will integrate repository and project creation features from the CLI into this package.

## Roadmap

### Near-term Plans
1. **Scenario-based Template Extensions**
   - SSR Server-side Rendering Templates (Next.js/Nuxt.js)
   - Mini Program Development (Wepy/Mpvue)
   - Micro-frontend Architecture Templates (qiankun/Module Federation)
   - Component Library Development Templates (Storybook + Theme System)

2. **Framework Ecosystem Enhancement**
   - Svelte Lightweight Framework Support
   - Integration of Preact High-performance Alternative
   - Deno Runtime Environment Adaptation

### More
- Visual Template Configuration Interface (Web Dashboard)
- Enterprise Private Template Repository Support
- CI/CD Pipeline Automatic Integration
npm package: @mopo/settings
Description: Configuration Management Module
Author: BellYang
Latest version: 1.0.1

# Configuration Management

The settings package provides project configuration management and processing functionality, using built-in configuration files as default options, and offers utility functions and modules for defining project configurations, loading configuration files, validation, and path resolution.

## Docs

(settings)[https://mopo-cli.vercel.app/extensions/settings]

## Core Features

1. **Configuration Parsing and Loading**
   - Load configuration files via `configLoader`
   - Generate standard configurations using `generateConfig`
   - Provide `defineConfig` utility function with type hints support

2. **Path Resolution**
   - Handle path resolution through the `resolver` module
   - Manage configuration file paths using `configPath`

## API Reference

### defineConfig

```typescript
function defineConfig(config: MopoConfig): MopoConfig
```

Used to define project configuration with complete type hint support.

**Parameters:**
- `config`: Mopo project configuration object

**Returns:**
- Returns the type-checked configuration object

**Usage Example:**
```typescript
import { defineConfig } from '@mopo/settings'

export default defineConfig({
  // Configuration content
  outputDir: 'root',
  publicPath: '/',
  // ...other configurations
})
```

### Utility Modules

- **resolver**: Provides path resolution functionality
- **configPath**: Handles configuration file paths
- **configLoader**: Configuration file loader
- **generateConfig**: Configuration generation tool

## Use Cases

1. Project configuration definition
2. Configuration file loading and parsing
3. Path resolution and management
npm package: @mopo/vite
Description: vite bundler for Mopo
Author: BellYang
Latest version: 1.0.1

# Vite Build Tool

The vite package provides project building and development server functionality based on Vite, serving as a modern build tool option.

## Docs

[vite](https://mopo-cli.vercel.app/extensions/vite)

## Core Features

1. **Build Features**
   - Production environment build support
   - Build analysis support (analyzer)
   - Custom build configuration
   - Multi-framework build support (via lib configuration)

2. **Development Server**
   - Built-in development server
   - Automatic server URL printing
   - CLI shortcut support
   - Real-time hot updates

3. **Configuration Management**
   - Default configuration generation
   - User configuration merging
   - Environment variable support
   - Repository root awareness

## API Reference

### Default Export Function

```typescript
async function viteBuilder(
  {
    env,
    path,
    pkgName,
    repoRoot,
    analyzer
  }: {
    env: string,
    path: string,
    pkgName: string,
    repoRoot: string,
    analyzer: boolean
  },
  pkg: Package,
  isBuild: boolean = false
): Promise<void>
```

**Parameter Description:**
- `env`: Environment variable
- `path`: Project path
- `pkgName`: Package name
- `repoRoot`: Repository root directory
- `analyzer`: Whether to enable build analysis
- `pkg`: Package configuration information
- `isBuild`: Whether it's a production build (default false)

## Usage Flow

1. **Development Environment**
   ```typescript
   await viteBuilder({
     env: 'development',
     path: '/path/to/project',
     pkgName: 'my-app',
     repoRoot: '/path/to/repo',
     analyzer: false
   }, pkg)
   ```
   - Start development server
   - Display access URL
   - Support keyboard shortcuts

2. **Production Environment**
   ```typescript
   await viteBuilder({
     env: 'production',
     path: '/path/to/project',
     pkgName: 'my-app',
     repoRoot: '/path/to/repo',
     analyzer: true
   }, pkg, true)
   ```
   - Execute production build
   - Optional build analysis
   - Output build files

## Features

1. **Flexible Configuration**
   - Support for merging default and user configurations
   - Environment variable differentiation
   - Build tool type detection

2. **Development Experience**
   - Fast hot updates
   - Friendly CLI interface
   - Convenient server access

3. **Build Optimization**
   - Optional build analysis
   - Multi-framework support
   - Custom build configuration
npm package: @mopo/webpack
Description: Webpack bundler for Mopo
Author: BellYang
Latest version: 1.0.1

# Webpack Build Tool

The webpack package provides Webpack-based project building and development server functionality. Currently, Webpack remains the most widely used, ecosystem-rich, and stable build tool.

## Docs

(webpack)[https://mopo-cli.vercel.app/extensions/webpack]

## Core Features

1. **Build Functionality**
   - Production environment build support
   - Build process visualization (using spinner for progress display)
   - Asset information statistics and display
   - Build cache cleaning

2. **Development Server**
   - Integrated webpack-dev-server
   - Hot module replacement support
   - Custom server configuration

3. **Error Handling**
   - Complete error capture mechanism
   - Build error visualization
   - Compilation warning notifications

## API Reference

### Default Export Function

```typescript
async function webpackBuilder(
  configs: BuildParams,
  pkg: Package,
  isBuild: boolean = false
): Promise<void>
```

**Parameters:**
- `configs`: Build parameter configuration
- `pkg`: Package information
- `isBuild`: Production build flag (defaults to false)

## Usage Flow

1. **Development Environment**
   ```typescript
   await webpackBuilder(configs, pkg)
   ```
   - Start development server
   - Support hot reloading
   - Real-time compilation feedback

2. **Production Environment**
   ```typescript
   await webpackBuilder(configs, pkg, true)
   ```
   - Execute production build
   - Display build progress
   - Output build results

## Features

1. **Error Handling Optimization**
   - Using await-to-js for async error handling
   - Graceful error display degradation
   - Detailed error stack information

2. **Build Process Visualization**
   - Build progress display using spinner
   - Clear build status feedback
   - Instant build result display

3. **Asset Analysis**
   - Build asset statistics support
   - Asset information visualization
npm package: @moqada/react-native-mock
Description: A fully mocked and test-friendly version of react native
Author: Leland Richardson
Latest version: 0.0.6

# react-native-mock
A fully mocked and test-friendly version of react native


## How Am I Supposed To Use This?

```bash
npm i react-native-mock --save-dev
```

```js
/* file-that-runs-before-all-of-my-tests.js */

// This will mutate `react-native`'s require cache with `react-native-mock`'s.
require('react-native-mock/mock'); // <-- side-effects!!! 
```


## Why?

Testing React Native components is *hard*.  I'm hoping this makes it easier.

I wrote a React Testing Library that works really well for React "Web", but didn't really work for
React "Native" without something like this.


## Wait... Is this actually a terrible idea?

I don't know. Maybe.

I'd love to figure that out though... feel free to file an issue if you have opinions.
npm package: @moqada/rn-twemoji
Description: twemoji resources for React Native
Author: moqada
Latest version: 0.2.2

# rn-twemoji

[![Greenkeeper badge](https://badges.greenkeeper.io/moqada/rn-twemoji.svg)](https://greenkeeper.io/)

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coverage Status][codecov-image]][codecov-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![DevDependency Status][daviddm-dev-image]][daviddm-dev-url]
[![License][license-image]][license-url]

[twemoji](https://github.com/twitter/twemoji) resources for React Native.


## Installation

```
npm install --save @moqada/rn-twemoji
```


## Usage

```jsx
// Name base
<Image source={require('@moqada/rn-twemoji/n/sushi')} />;

// Code base
<Image source={require('@moqada/rn-twemoji/c/1f363')} />;
```

### Version specification

```jsx
// twemoji v1
<Image source={require('@moqada/rn-twemoji/1/n/sushi')} />;

// twemoji v2
<Image source={require('@moqada/rn-twemoji/2/n/sushi')} />;
<Image source={require('@moqada/rn-twemoji/n/sushi')} />;
```

## Development

```
git submodule update --init
npm i
```

Generate images and codes from original twemoji resources.

```
npm run build
```

## License

follow [twitter/twemoji](https://github.com/twitter/twemoji).

[npm-url]: https://www.npmjs.com/package/@moqada/rn-twemoji
[npm-image]: https://img.shields.io/npm/v/@moqada/rn-twemoji.svg?style=flat-square
[travis-url]: https://travis-ci.org/moqada/rn-twemoji
[travis-image]: https://img.shields.io/travis/moqada/rn-twemoji.svg?style=flat-square
[daviddm-url]: https://david-dm.org/moqada/rn-twemoji
[daviddm-image]: https://img.shields.io/david/moqada/rn-twemoji.svg?style=flat-square
[daviddm-dev-url]: https://david-dm.org/moqada/rn-twemoji#info=devDependencies
[daviddm-dev-image]: https://img.shields.io/david/dev/moqada/rn-twemoji.svg?style=flat-square
[codecov-url]: https://codecov.io/github/moqada/rn-twemoji
[codecov-image]: https://img.shields.io/codecov/c/github/moqada/rn-twemoji.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[license-image]: https://img.shields.io/github/license/moqada/rn-twemoji.svg?style=flat-square
npm package: @moqada/simple-api-client
Description: Simple API Client for JavaScript
Author: moqada
Latest version: 0.5.0

# simple-api-client

[![Greenkeeper badge](https://badges.greenkeeper.io/moqada/simple-api-client.svg)](https://greenkeeper.io/)

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coverage Status][codecov-image]][codecov-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![DevDependency Status][daviddm-dev-image]][daviddm-dev-url]
[![License][license-image]][license-url]

Simple API Client for JavaScript.

***WIP***

## Installation

```
npm install --save @moqada/simple-api-client
```

## Usage

### JavaScript

```javascript
import SimpleAPIClient from '@moqada/simple-api-client';

class APIClinet extends SimpleAPIClient {

  constructor({token, custom}: {token: string, custom: string}) {
    super({endpoint: 'http://api.example.com/v1'});
    this.token = token;
    this.custom = custom;
  }

  getDefaultOptions(): Object {
    return {
      headers: {
        'Authorization': `Bearer ${this.token}`,
        'X-Custom-Header': `${this.custom}`
      }
    };
  }

  toResponse(error: ?Object, response: ?Object): Object {
    if (error) {
      return {error};
    }
    return {
      body: response.body
    };
  }

  getUsers(query): Promise<{body: Object}, {error: Object}> {
    return this.get('/users', {query});
  }
}

const clinet = new APIClinet({token: 'xxxxxxxyyyyy', custom: 'foobar'});
client.getUsers({offset: 20, limit: 10}).then(({body}) => {
  console.log(body);
}).catch(({error}) => {
  console.error(error);
}):
```

### TypeScript

A import style is different from JavaScript.

```typescript
import {SimpleAPIClient} from '@moqada/simple-api-client';
```

## Todo

- [ ] Test
- [x] Support TypeScript (experimental)

## Related

- [@moqada/simple-api-client-generator](https://github.com/moqada/simple-api-client-generator) - A CLI generating API Client from JSON Hyper Schema


[npm-url]: https://www.npmjs.com/package/@moqada/simple-api-client
[npm-image]: https://img.shields.io/npm/v/@moqada/simple-api-client.svg?style=flat-square
[travis-url]: https://travis-ci.org/moqada/simple-api-client
[travis-image]: https://img.shields.io/travis/moqada/simple-api-client.svg?style=flat-square
[daviddm-url]: https://david-dm.org/moqada/simple-api-client
[daviddm-image]: https://img.shields.io/david/moqada/simple-api-client.svg?style=flat-square
[daviddm-dev-url]: https://david-dm.org/moqada/simple-api-client#info=devDependencies
[daviddm-dev-image]: https://img.shields.io/david/dev/moqada/simple-api-client.svg?style=flat-square
[codecov-url]: https://codecov.io/github/moqada/simple-api-client
[codecov-image]: https://img.shields.io/codecov/c/github/moqada/simple-api-client.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[license-image]: https://img.shields.io/github/license/moqada/simple-api-client?style=flat-square
npm package: @moqada/simple-api-client-generator
Description: API Client Generator from JSON Hyper Schema
Author: moqada
Latest version: 0.5.1

# simple-api-client-generator

[![Greenkeeper badge](https://badges.greenkeeper.io/moqada/simple-api-client-generator.svg)](https://greenkeeper.io/)

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Dependency Status][daviddm-image]][daviddm-url]
[![DevDependency Status][daviddm-dev-image]][daviddm-dev-url]
[![License][license-image]][license-url]

> API Client Generator from JSON Hyper Schema.

API Client has generated with [Flow](https://github.com/facebook/flow) types for Request, Response, and Resource.
And request parameters is validated with [tv4](https://github.com/geraintluff/tv4) and [power-assert](https://github.com/power-assert-js/power-assert) on development phase.

***WIP***

## Installation

```
npm install --save @moqada/simple-api-client-generator
```


## Usage

```
Usage: simple-api-client-generator [options] <JSON Schema>

Options:
  -n, --name    API Client class name  [string] [default: "APIClient"]
  -o, --output  output file path  [string]
  -a, --assert  assert library name  [string] [default: "power-assert"]
  -l, --lang    output language  [choices: "javascript", "typescript"] [default: "javascript"]
  --help        Show help  [boolean]
  --version     Show version number  [boolean]

Examples:
  simple-api-client-generator ./shema.json                      Output API Client.
  simple-api-client-generator -n AwesomeAPIClient ./shema.json  Output API Client given name
```

Output Example is [here](./example/APIClient.js) from [Sample JSON Hyper Schema](./example/schema.json);

## Restriction

### Depenencies 

Generated Client depends on following modules.

- [@moqada/simple-api-client](https://github.com/moqada/simple-api-client)
- [extend](https://github.com/justmoon/node-extend)
- [power-assert](https://github.com/power-assert-js/power-assert)
- [tv4](https://github.com/geraintluff/tv4)
- [unassert](https://github.com/twada/unassert)
  - [babel-plugin-unassert](https://github.com/twada/babel-plugin-unassert)
- [uri-templates](https://github.com/geraintluff/uri-templates)

### JSON Hyper Schema

**JSON Hyper Schema must have unique `rel` value per resources.**

[npm-url]: https://www.npmjs.com/package/@moqada/simple-api-client-generator
[npm-image]: https://img.shields.io/npm/v/@moqada/simple-api-client-generator.svg?style=flat-square
[travis-url]: https://travis-ci.org/moqada/simple-api-client-generator
[travis-image]: https://img.shields.io/travis/moqada/simple-api-client-generator.svg?style=flat-square
[daviddm-url]: https://david-dm.org/moqada/simple-api-client-generator
[daviddm-image]: https://img.shields.io/david/moqada/simple-api-client-generator.svg?style=flat-square
[daviddm-dev-url]: https://david-dm.org/moqada/simple-api-client-generator#info=devDependencies
[daviddm-dev-image]: https://img.shields.io/david/dev/moqada/simple-api-client-generator.svg?style=flat-square
[license-url]: http://opensource.org/licenses/MIT
[license-image]: https://img.shields.io/github/license/moqada/simple-api-client-generator.svg?style=flat-square
npm package: @moqimoqidea/llms
Description: A universal LLM API transformation server
Latest version: 1.0.39

# LLMs

> A universal LLM API transformation server, initially developed for the [claude-code-router](https://github.com/musistudio/claude-code-router).

## How it works

The LLM API transformation server acts as a middleware to standardize requests and responses between different LLM providers (Anthropic, Gemini, Deepseek, etc.). It uses a modular transformer system to handle provider-specific API formats.

### Key Components

1. **Transformers**: Each provider (e.g., Anthropic, Gemini) has a dedicated transformer class that implements:

   - `transformRequestIn`: Converts the provider's request format to a unified format.
   - `transformResponseIn`: Converts the provider's response format to a unified format.
   - `transformRequestOut`: Converts the unified request format to the provider's format.
   - `transformResponseOut`: Converts the unified response format back to the provider's format.
   - `endPoint`: Specifies the API endpoint for the provider (e.g., "/v1/messages" for Anthropic).

2. **Unified Formats**:

   - Requests and responses are standardized using `UnifiedChatRequest` and `UnifiedChatResponse` types.

3. **Streaming Support**:
   - Handles real-time streaming responses for providers like Anthropic, converting chunked data into a standardized format.

### Data Flow

1. **Request**:

   - Incoming provider-specific requests are transformed into the unified format.
   - The unified request is processed by the server.

2. **Response**:
   - The server's unified response is transformed back into the provider's format.
   - Streaming responses are handled with chunked data conversion.

### Example Transformers

- **Anthropic**: Converts between OpenAI-style and Anthropic-style message formats.
- **Gemini**: Adjusts tool definitions and parameter formats for Gemini compatibility.
- **Deepseek**: Enforces token limits and handles reasoning content in streams.

## Run this repo

- **Install dependencies:**
  ```sh
  npm install
  # or pnpm install
  ```
- **Development:**
  ```sh
  npm run dev
  # Uses nodemon + tsx for hot-reloading src/server.ts
  ```
- **Build:**
  ```sh
  npm run build
  # Outputs to dist/cjs and dist/esm
  ```
- **Test:**
  ```sh
  npm test
  # See CLAUDE.md for details
  ```
- **Path alias:**
  - `@` is mapped to the `src` directory, use `import xxx from '@/xxx'`.
- **Environment variables:**
  - Supports `.env` and `config.json`, see `src/services/config.ts`.

---

## Working with this repo

[👉 Contributing Guide](./CONTRIBUTING.md)