test
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
440
SKILL.md
Normal file
440
SKILL.md
Normal file
@@ -0,0 +1,440 @@
|
|||||||
|
---
|
||||||
|
name: mmx-cli
|
||||||
|
description: Use mmx to generate text, images, video, speech, and music via the MiniMax AI platform. Use when the user wants to create media content, chat with MiniMax models, perform web search, or manage MiniMax API resources from the terminal.
|
||||||
|
---
|
||||||
|
|
||||||
|
# MiniMax CLI — Agent Skill Guide
|
||||||
|
|
||||||
|
Use `mmx` to generate text, images, video, speech, music, and perform web search via the MiniMax AI platform.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install
|
||||||
|
npm install -g mmx-cli
|
||||||
|
|
||||||
|
# Auth (OAuth persists to ~/.mmx/credentials.json, API key persists to ~/.mmx/config.json)
|
||||||
|
mmx auth login --api-key sk-xxxxx
|
||||||
|
|
||||||
|
# Verify active auth source
|
||||||
|
mmx auth status
|
||||||
|
|
||||||
|
# Or pass per-call
|
||||||
|
mmx text chat --api-key sk-xxxxx --message "Hello"
|
||||||
|
```
|
||||||
|
|
||||||
|
Region is auto-detected. Override with `--region global` or `--region cn`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Agent Flags
|
||||||
|
|
||||||
|
Always use these flags in non-interactive (agent/CI) contexts:
|
||||||
|
|
||||||
|
| Flag | Purpose |
|
||||||
|
|---|---|
|
||||||
|
| `--non-interactive` | Fail fast on missing args instead of prompting |
|
||||||
|
| `--quiet` | Suppress spinners/progress; stdout is pure data |
|
||||||
|
| `--output json` | Machine-readable JSON output |
|
||||||
|
| `--async` | Return task ID immediately (video generation) |
|
||||||
|
| `--dry-run` | Preview the API request without executing |
|
||||||
|
| `--yes` | Skip confirmation prompts |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### text chat
|
||||||
|
|
||||||
|
Chat completion. Default model: `MiniMax-M2.7`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx text chat --message <text> [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--message <text>` | string, **required**, repeatable | Message text. Prefix with `role:` to set role (e.g. `"system:You are helpful"`, `"user:Hello"`) |
|
||||||
|
| `--messages-file <path>` | string | JSON file with messages array. Use `-` for stdin |
|
||||||
|
| `--system <text>` | string | System prompt |
|
||||||
|
| `--model <model>` | string | Model ID (default: `MiniMax-M2.7`) |
|
||||||
|
| `--max-tokens <n>` | number | Max tokens (default: 4096) |
|
||||||
|
| `--temperature <n>` | number | Sampling temperature (0.0, 1.0] |
|
||||||
|
| `--top-p <n>` | number | Nucleus sampling threshold |
|
||||||
|
| `--stream` | boolean | Stream tokens (default: on in TTY) |
|
||||||
|
| `--tool <json-or-path>` | string, repeatable | Tool definition JSON or file path |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Single message
|
||||||
|
mmx text chat --message "user:What is MiniMax?" --output json --quiet
|
||||||
|
|
||||||
|
# Multi-turn
|
||||||
|
mmx text chat \
|
||||||
|
--system "You are a coding assistant." \
|
||||||
|
--message "user:Write fizzbuzz in Python" \
|
||||||
|
--output json
|
||||||
|
|
||||||
|
# From file
|
||||||
|
cat conversation.json | mmx text chat --messages-file - --output json
|
||||||
|
```
|
||||||
|
|
||||||
|
**stdout**: response text (text mode) or full response object (json mode).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### image generate
|
||||||
|
|
||||||
|
Generate images. Model: `image-01`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx image generate --prompt <text> [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--prompt <text>` | string, **required** | Image description |
|
||||||
|
| `--aspect-ratio <ratio>` | string | e.g. `16:9`, `1:1`. Ignored if `--width` and `--height` are both set |
|
||||||
|
| `--n <count>` | number | Number of images (default: 1) |
|
||||||
|
| `--seed <n>` | number | Random seed for reproducible generation |
|
||||||
|
| `--width <px>` | number | Width in pixels (512–2048, multiple of 8). Requires `--height` |
|
||||||
|
| `--height <px>` | number | Height in pixels (512–2048, multiple of 8). Requires `--width` |
|
||||||
|
| `--prompt-optimizer` | boolean | Optimize prompt before generation |
|
||||||
|
| `--aigc-watermark` | boolean | Embed AI-generated content watermark |
|
||||||
|
| `--subject-ref <params>` | string | Subject reference: `type=character,image=path-or-url` |
|
||||||
|
| `--response-format <format>` | string | `url` (default) or `base64`. Base64 bypasses CDN download |
|
||||||
|
| `--out-dir <dir>` | string | Download images to directory |
|
||||||
|
| `--out-prefix <prefix>` | string | Filename prefix (default: `image`) |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx image generate --prompt "A cat in a spacesuit" --output json --quiet
|
||||||
|
# stdout: image URLs (one per line in quiet mode)
|
||||||
|
|
||||||
|
mmx image generate --prompt "Logo" --n 3 --out-dir ./gen/ --quiet
|
||||||
|
# stdout: saved file paths (one per line)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### video generate
|
||||||
|
|
||||||
|
Generate video. Default model: `MiniMax-Hailuo-2.3`. This is an async task — by default it polls until completion.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx video generate --prompt <text> [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--prompt <text>` | string, **required** | Video description |
|
||||||
|
| `--model <model>` | string | `MiniMax-Hailuo-2.3` (default) or `MiniMax-Hailuo-2.3-Fast` |
|
||||||
|
| `--first-frame <path-or-url>` | string | First frame image |
|
||||||
|
| `--callback-url <url>` | string | Webhook URL for completion |
|
||||||
|
| `--download <path>` | string | Save video to specific file |
|
||||||
|
| `--async` | boolean | Return task ID immediately |
|
||||||
|
| `--no-wait` | boolean | Same as `--async` |
|
||||||
|
| `--poll-interval <seconds>` | number | Polling interval (default: 5) |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Non-blocking: get task ID
|
||||||
|
mmx video generate --prompt "A robot." --async --quiet
|
||||||
|
# stdout: {"taskId":"..."}
|
||||||
|
|
||||||
|
# Blocking: wait and get file path
|
||||||
|
mmx video generate --prompt "Ocean waves." --download ocean.mp4 --quiet
|
||||||
|
# stdout: ocean.mp4
|
||||||
|
```
|
||||||
|
|
||||||
|
### video task get
|
||||||
|
|
||||||
|
Query status of a video generation task.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx video task get --task-id <id> [--output json]
|
||||||
|
```
|
||||||
|
|
||||||
|
### video download
|
||||||
|
|
||||||
|
Download a completed video by task ID.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx video download --file-id <id> [--out <path>]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### speech synthesize
|
||||||
|
|
||||||
|
Text-to-speech. Default model: `speech-2.8-hd`. Max 10k chars.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx speech synthesize --text <text> [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--text <text>` | string | Text to synthesize |
|
||||||
|
| `--text-file <path>` | string | Read text from file. Use `-` for stdin |
|
||||||
|
| `--model <model>` | string | `speech-2.8-hd` (default), `speech-2.6`, `speech-02` |
|
||||||
|
| `--voice <id>` | string | Voice ID (default: `English_expressive_narrator`) |
|
||||||
|
| `--speed <n>` | number | Speed multiplier |
|
||||||
|
| `--volume <n>` | number | Volume level |
|
||||||
|
| `--pitch <n>` | number | Pitch adjustment |
|
||||||
|
| `--format <fmt>` | string | Audio format (default: `mp3`) |
|
||||||
|
| `--sample-rate <hz>` | number | Sample rate (default: 32000) |
|
||||||
|
| `--bitrate <bps>` | number | Bitrate (default: 128000) |
|
||||||
|
| `--channels <n>` | number | Audio channels (default: 1) |
|
||||||
|
| `--language <code>` | string | Language boost |
|
||||||
|
| `--subtitles` | boolean | Download and save subtitles as `.srt` file (alongside `--out` audio file). API must support subtitles for the selected model.
|
||||||
|
| `--pronunciation <from/to>` | string, repeatable | Custom pronunciation |
|
||||||
|
| `--sound-effect <effect>` | string | Add sound effect |
|
||||||
|
| `--out <path>` | string | Save audio to file |
|
||||||
|
| `--stream` | boolean | Stream raw audio to stdout |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx speech synthesize --text "Hello world" --out hello.mp3 --quiet
|
||||||
|
# stdout: hello.mp3
|
||||||
|
|
||||||
|
mmx speech synthesize --text "Hello" --subtitles --out hello.mp3
|
||||||
|
# saves hello.mp3 + hello.srt (SRT subtitle file)
|
||||||
|
|
||||||
|
echo "Breaking news." | mmx speech synthesize --text-file - --out news.mp3
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### music generate
|
||||||
|
|
||||||
|
Generate music. Responds well to rich, structured descriptions.
|
||||||
|
|
||||||
|
**Model:** `music-2.6-free` — unlimited for API key users, RPM = 3.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx music generate --prompt <text> [--lyrics <text>] [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--prompt <text>` | string | Music style description (can be detailed) |
|
||||||
|
| `--lyrics <text>` | string | Song lyrics with structure tags. Required unless `--instrumental` or `--lyrics-optimizer` is used. |
|
||||||
|
| `--lyrics-file <path>` | string | Read lyrics from file. Use `-` for stdin |
|
||||||
|
| `--lyrics-optimizer` | boolean | Auto-generate lyrics from prompt. Cannot be used with `--lyrics` or `--instrumental`. |
|
||||||
|
| `--instrumental` | boolean | Generate instrumental music (no vocals). Cannot be used with `--lyrics`. |
|
||||||
|
| `--vocals <text>` | string | Vocal style, e.g. `"warm male baritone"`, `"bright female soprano"`, `"duet with harmonies"` |
|
||||||
|
| `--genre <text>` | string | Music genre, e.g. folk, pop, jazz |
|
||||||
|
| `--mood <text>` | string | Mood or emotion, e.g. warm, melancholic, uplifting |
|
||||||
|
| `--instruments <text>` | string | Instruments to feature, e.g. `"acoustic guitar, piano"` |
|
||||||
|
| `--tempo <text>` | string | Tempo description, e.g. fast, slow, moderate |
|
||||||
|
| `--bpm <number>` | number | Exact tempo in beats per minute |
|
||||||
|
| `--key <text>` | string | Musical key, e.g. C major, A minor, G sharp |
|
||||||
|
| `--avoid <text>` | string | Elements to avoid in the generated music |
|
||||||
|
| `--use-case <text>` | string | Use case context, e.g. `"background music for video"`, `"theme song"` |
|
||||||
|
| `--structure <text>` | string | Song structure, e.g. `"verse-chorus-verse-bridge-chorus"` |
|
||||||
|
| `--references <text>` | string | Reference tracks or artists, e.g. `"similar to Ed Sheeran"` |
|
||||||
|
| `--extra <text>` | string | Additional fine-grained requirements |
|
||||||
|
| `--aigc-watermark` | boolean | Embed AI-generated content watermark |
|
||||||
|
| `--format <fmt>` | string | Audio format (default: `mp3`) |
|
||||||
|
| `--sample-rate <hz>` | number | Sample rate (default: 44100) |
|
||||||
|
| `--bitrate <bps>` | number | Bitrate (default: 256000) |
|
||||||
|
| `--out <path>` | string | Save audio to file |
|
||||||
|
| `--stream` | boolean | Stream raw audio to stdout |
|
||||||
|
|
||||||
|
At least one of `--prompt` or `--lyrics` is required.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# With lyrics
|
||||||
|
mmx music generate --prompt "Upbeat pop" --lyrics "La la la..." --out song.mp3 --quiet
|
||||||
|
|
||||||
|
# Auto-generate lyrics from prompt
|
||||||
|
mmx music generate --prompt "Upbeat pop about summer" --lyrics-optimizer --out summer.mp3 --quiet
|
||||||
|
|
||||||
|
# Instrumental
|
||||||
|
mmx music generate --prompt "Cinematic orchestral, building tension" --instrumental --out bgm.mp3 --quiet
|
||||||
|
|
||||||
|
# Detailed prompt with vocal characteristics
|
||||||
|
mmx music generate --prompt "Warm morning folk" \
|
||||||
|
--vocals "male and female duet, harmonies in chorus" \
|
||||||
|
--instruments "acoustic guitar, piano" \
|
||||||
|
--bpm 95 \
|
||||||
|
--lyrics-file song.txt \
|
||||||
|
--out duet.mp3
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### music cover
|
||||||
|
|
||||||
|
Generate a cover version of a song based on reference audio.
|
||||||
|
|
||||||
|
**Model:** `music-cover-free` — unlimited for API key users, RPM = 3.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx music cover --prompt <text> (--audio <url> | --audio-file <path>) [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--prompt <text>` | string, **required** | Target cover style, e.g. `"Indie folk, acoustic guitar, warm male vocal"` |
|
||||||
|
| `--audio <url>` | string | URL of reference audio (mp3, wav, flac, etc. — 6s to 6min, max 50MB) |
|
||||||
|
| `--audio-file <path>` | string | Local reference audio file (auto base64-encoded) |
|
||||||
|
| `--lyrics <text>` | string | Cover lyrics. If omitted, extracted from reference audio via ASR. |
|
||||||
|
| `--lyrics-file <path>` | string | Read lyrics from file. Use `-` for stdin |
|
||||||
|
| `--seed <number>` | number | Random seed 0–1000000 for reproducible results |
|
||||||
|
| `--format <fmt>` | string | Audio format: `mp3`, `wav`, `pcm` (default: `mp3`) |
|
||||||
|
| `--sample-rate <hz>` | number | Sample rate (default: 44100) |
|
||||||
|
| `--bitrate <bps>` | number | Bitrate (default: 256000) |
|
||||||
|
| `--channel <n>` | number | Channels: `1` (mono) or `2` (stereo, default) |
|
||||||
|
| `--out <path>` | string | Save audio to file |
|
||||||
|
| `--stream` | boolean | Stream raw audio to stdout |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Cover from URL
|
||||||
|
mmx music cover --prompt "Indie folk, acoustic guitar, warm male vocal" \
|
||||||
|
--audio https://filecdn.minimax.chat/public/d20eda57-2e36-45bf-9e12-82d9f2e69a86.mp3 --out cover.mp3 --quiet
|
||||||
|
|
||||||
|
# Cover from local file with custom lyrics
|
||||||
|
mmx music cover --prompt "Jazz, piano, slow" \
|
||||||
|
--audio-file original.mp3 --lyrics-file lyrics.txt --out jazz_cover.mp3 --quiet
|
||||||
|
|
||||||
|
# Reproducible result with seed
|
||||||
|
mmx music cover --prompt "Pop, upbeat" --audio https://filecdn.minimax.chat/public/d20eda57-2e36-45bf-9e12-82d9f2e69a86.mp3 --seed 42 --out cover.mp3
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### vision describe
|
||||||
|
|
||||||
|
Image understanding via VLM. Provide either `--image` or `--file-id`, not both.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx vision describe (--image <path-or-url> | --file-id <id>) [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--image <path-or-url>` | string | Local path or URL (auto base64-encoded) |
|
||||||
|
| `--file-id <id>` | string | Pre-uploaded file ID (skips base64) |
|
||||||
|
| `--prompt <text>` | string | Question about the image (default: `"Describe the image."`) |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx vision describe --image photo.jpg --prompt "What breed?" --output json
|
||||||
|
```
|
||||||
|
|
||||||
|
**stdout**: description text (text mode) or full response (json mode).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### search query
|
||||||
|
|
||||||
|
Web search via MiniMax.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx search query --q <query>
|
||||||
|
```
|
||||||
|
|
||||||
|
| Flag | Type | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `--q <query>` | string, **required** | Search query |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx search query --q "MiniMax AI" --output json --quiet
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### quota show
|
||||||
|
|
||||||
|
Display Token Plan usage and remaining quotas.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mmx quota show [--output json]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Tool Schema Export
|
||||||
|
|
||||||
|
Export all commands as Anthropic/OpenAI-compatible JSON tool schemas:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# All tool-worthy commands (excludes auth/config/update)
|
||||||
|
mmx config export-schema
|
||||||
|
|
||||||
|
# Single command
|
||||||
|
mmx config export-schema --command "video generate"
|
||||||
|
```
|
||||||
|
|
||||||
|
Use this to dynamically register mmx commands as tools in your agent framework.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Exit Codes
|
||||||
|
|
||||||
|
| Code | Meaning |
|
||||||
|
|---|---|
|
||||||
|
| 0 | Success |
|
||||||
|
| 1 | General error |
|
||||||
|
| 2 | Usage error (bad flags, missing args) |
|
||||||
|
| 3 | Authentication error |
|
||||||
|
| 4 | Quota exceeded |
|
||||||
|
| 5 | Timeout |
|
||||||
|
| 10 | Content filter triggered |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Piping Patterns
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# stdout is always clean data — safe to pipe
|
||||||
|
mmx text chat --message "Hi" --output json | jq '.content'
|
||||||
|
|
||||||
|
# stderr has progress/spinners — discard if needed
|
||||||
|
mmx video generate --prompt "Waves" 2>/dev/null
|
||||||
|
|
||||||
|
# Chain: generate image → describe it
|
||||||
|
URL=$(mmx image generate --prompt "A sunset" --quiet)
|
||||||
|
mmx vision describe --image "$URL" --quiet
|
||||||
|
|
||||||
|
# Async video workflow
|
||||||
|
TASK=$(mmx video generate --prompt "A robot" --async --quiet | jq -r '.taskId')
|
||||||
|
mmx video task get --task-id "$TASK" --output json
|
||||||
|
mmx video download --task-id "$TASK" --out robot.mp4
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Configuration Precedence
|
||||||
|
|
||||||
|
CLI flags → environment variables → `~/.mmx/config.json` → defaults.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Persistent config
|
||||||
|
mmx config set --key region --value cn
|
||||||
|
mmx config show
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
export MINIMAX_API_KEY=sk-xxxxx
|
||||||
|
export MINIMAX_REGION=cn
|
||||||
|
```
|
||||||
|
|
||||||
|
### Default Model Configuration
|
||||||
|
|
||||||
|
Set per-modality defaults so you don't need `--model` every time:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Set defaults
|
||||||
|
mmx config set --key default-text-model --value MiniMax-M2.7-highspeed
|
||||||
|
mmx config set --key default-speech-model --value speech-2.8-hd
|
||||||
|
mmx config set --key default-video-model --value MiniMax-Hailuo-2.3
|
||||||
|
mmx config set --key default-music-model --value music-2.6
|
||||||
|
|
||||||
|
# Use without --model
|
||||||
|
mmx text chat --message "Hello"
|
||||||
|
mmx speech synthesize --text "Hello" --out hello.mp3
|
||||||
|
mmx video generate --prompt "Ocean waves"
|
||||||
|
mmx music generate --prompt "Upbeat pop" --instrumental
|
||||||
|
|
||||||
|
# --model still overrides per-call
|
||||||
|
mmx text chat --model MiniMax-M2.7 --message "Hello"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Resolution priority**: `--model` flag > config default > hardcoded fallback.
|
||||||
BIN
hangzhou.mp3
Normal file
BIN
hangzhou.mp3
Normal file
Binary file not shown.
591
package-lock.json
generated
Normal file
591
package-lock.json
generated
Normal file
@@ -0,0 +1,591 @@
|
|||||||
|
{
|
||||||
|
"name": "test-minimax",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "test-minimax",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.6.0",
|
||||||
|
"tsx": "^4.21.0",
|
||||||
|
"typescript": "^6.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/aix-ppc64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"aix"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ia32": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-loong64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==",
|
||||||
|
"cpu": [
|
||||||
|
"loong64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-mips64el": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==",
|
||||||
|
"cpu": [
|
||||||
|
"mips64el"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ppc64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-riscv64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==",
|
||||||
|
"cpu": [
|
||||||
|
"riscv64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-s390x": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/netbsd-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"netbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/netbsd-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"netbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openbsd-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openbsd-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openharmony-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openharmony"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/sunos-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"sunos"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-arm64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-ia32": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-x64": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "25.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz",
|
||||||
|
"integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.19.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esbuild": {
|
||||||
|
"version": "0.27.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",
|
||||||
|
"integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"esbuild": "bin/esbuild"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/aix-ppc64": "0.27.7",
|
||||||
|
"@esbuild/android-arm": "0.27.7",
|
||||||
|
"@esbuild/android-arm64": "0.27.7",
|
||||||
|
"@esbuild/android-x64": "0.27.7",
|
||||||
|
"@esbuild/darwin-arm64": "0.27.7",
|
||||||
|
"@esbuild/darwin-x64": "0.27.7",
|
||||||
|
"@esbuild/freebsd-arm64": "0.27.7",
|
||||||
|
"@esbuild/freebsd-x64": "0.27.7",
|
||||||
|
"@esbuild/linux-arm": "0.27.7",
|
||||||
|
"@esbuild/linux-arm64": "0.27.7",
|
||||||
|
"@esbuild/linux-ia32": "0.27.7",
|
||||||
|
"@esbuild/linux-loong64": "0.27.7",
|
||||||
|
"@esbuild/linux-mips64el": "0.27.7",
|
||||||
|
"@esbuild/linux-ppc64": "0.27.7",
|
||||||
|
"@esbuild/linux-riscv64": "0.27.7",
|
||||||
|
"@esbuild/linux-s390x": "0.27.7",
|
||||||
|
"@esbuild/linux-x64": "0.27.7",
|
||||||
|
"@esbuild/netbsd-arm64": "0.27.7",
|
||||||
|
"@esbuild/netbsd-x64": "0.27.7",
|
||||||
|
"@esbuild/openbsd-arm64": "0.27.7",
|
||||||
|
"@esbuild/openbsd-x64": "0.27.7",
|
||||||
|
"@esbuild/openharmony-arm64": "0.27.7",
|
||||||
|
"@esbuild/sunos-x64": "0.27.7",
|
||||||
|
"@esbuild/win32-arm64": "0.27.7",
|
||||||
|
"@esbuild/win32-ia32": "0.27.7",
|
||||||
|
"@esbuild/win32-x64": "0.27.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fsevents": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/get-tsconfig": {
|
||||||
|
"version": "4.14.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
|
||||||
|
"integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"resolve-pkg-maps": "^1.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/resolve-pkg-maps": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tsx": {
|
||||||
|
"version": "4.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz",
|
||||||
|
"integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"esbuild": "~0.27.0",
|
||||||
|
"get-tsconfig": "^4.7.5"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"tsx": "dist/cli.mjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"fsevents": "~2.3.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/typescript": {
|
||||||
|
"version": "6.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
|
||||||
|
"integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.19.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz",
|
||||||
|
"integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
package.json
Normal file
22
package.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "test-minimax",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.xiongxiao.me/test/test-minimax.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me/)",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.6.0",
|
||||||
|
"tsx": "^4.21.0",
|
||||||
|
"typescript": "^6.0.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
158
src/app.ts
Normal file
158
src/app.ts
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
const MINIMAX_API_KEY = process.env.MINIMAX_API_KEY;
|
||||||
|
if (!MINIMAX_API_KEY) {
|
||||||
|
throw new Error("MINIMAX_API_KEY environment variable is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
interface VoiceSetting {
|
||||||
|
voice_id: string;
|
||||||
|
speed: number;
|
||||||
|
vol: number;
|
||||||
|
pitch: number;
|
||||||
|
emotion?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AudioSetting {
|
||||||
|
sample_rate: number;
|
||||||
|
bitrate: number;
|
||||||
|
format: "mp3" | "wav" | "ogg" | "aac";
|
||||||
|
channel: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PronunciationDictEntry {
|
||||||
|
text: string;
|
||||||
|
pronunciation: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MiniMaxTTSRequest {
|
||||||
|
model: string;
|
||||||
|
text: string;
|
||||||
|
stream?: boolean;
|
||||||
|
voice_setting: VoiceSetting;
|
||||||
|
audio_setting: AudioSetting;
|
||||||
|
pronunciation_dict?: {
|
||||||
|
tone: PronunciationDictEntry[];
|
||||||
|
};
|
||||||
|
subtitle_enable?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MiniMaxTTSResponse {
|
||||||
|
code: number;
|
||||||
|
desc: string;
|
||||||
|
data?: {
|
||||||
|
audio?: string;
|
||||||
|
audio_file?: string;
|
||||||
|
subtitle_info?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const BASE_URL = "https://api.minimaxi.com/v1/t2a_v2";
|
||||||
|
|
||||||
|
export async function textToSpeech(
|
||||||
|
request: MiniMaxTTSRequest
|
||||||
|
): Promise<Buffer> {
|
||||||
|
const response = await fetch(BASE_URL, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${MINIMAX_API_KEY}`,
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(request),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
const body = await response.text();
|
||||||
|
throw new Error(`MiniMax API error: ${response.status} ${response.statusText} - ${body}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = (await response.json()) as MiniMaxTTSResponse;
|
||||||
|
|
||||||
|
if (result.code && result.code !== 0) {
|
||||||
|
throw new Error(`MiniMax API error: ${result.code} - ${result.desc}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!result.data?.audio && !result.data?.audio_file) {
|
||||||
|
throw new Error("No audio data returned");
|
||||||
|
}
|
||||||
|
|
||||||
|
const audioHex = result.data.audio || result.data.audio_file!;
|
||||||
|
const audioBuffer = Buffer.from(audioHex, "hex");
|
||||||
|
return audioBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function textToSpeechStream(
|
||||||
|
request: MiniMaxTTSRequest,
|
||||||
|
onChunk: (chunk: Buffer) => void
|
||||||
|
): Promise<void> {
|
||||||
|
const response = await fetch(BASE_URL, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${MINIMAX_API_KEY}`,
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({ ...request, stream: true }),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`MiniMax API error: ${response.status} ${response.statusText}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!response.body) {
|
||||||
|
throw new Error("No response body");
|
||||||
|
}
|
||||||
|
|
||||||
|
const reader = response.body.getReader();
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
const { done, value } = await reader.read();
|
||||||
|
if (done) break;
|
||||||
|
onChunk(Buffer.from(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const VOICE_IDS = {
|
||||||
|
male_qn_qingse: "male-qn-qingse",
|
||||||
|
female_tianmei: "female-tianmei",
|
||||||
|
male_baixian: "male-baixian",
|
||||||
|
female_aicheng: "female-aicheng",
|
||||||
|
male_yunyang: "male-yunyang",
|
||||||
|
female_xiaomo: "female-xiaomo",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type VoiceId = (typeof VOICE_IDS)[keyof typeof VOICE_IDS];
|
||||||
|
|
||||||
|
export const EMOTIONS = {
|
||||||
|
neutral: "neutral",
|
||||||
|
happy: "happy",
|
||||||
|
sad: "sad",
|
||||||
|
angry: "angry",
|
||||||
|
fearful: "fearful",
|
||||||
|
disgust: "disgust",
|
||||||
|
surprised: "surprised",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type Emotion = (typeof EMOTIONS)[keyof typeof EMOTIONS];
|
||||||
|
|
||||||
|
// Usage example:
|
||||||
|
// async function example() {
|
||||||
|
// const audio = await textToSpeech({
|
||||||
|
// model: "speech-2.8-hd",
|
||||||
|
// text: "今天是不是很开心呀(laughs),当然了!",
|
||||||
|
// stream: false,
|
||||||
|
// voice_setting: {
|
||||||
|
// voice_id: VOICE_IDS.male_qn_qingse,
|
||||||
|
// speed: 1,
|
||||||
|
// vol: 1,
|
||||||
|
// pitch: 0,
|
||||||
|
// emotion: EMOTIONS.happy,
|
||||||
|
// },
|
||||||
|
// audio_setting: {
|
||||||
|
// sample_rate: 32000,
|
||||||
|
// bitrate: 128000,
|
||||||
|
// format: "mp3",
|
||||||
|
// channel: 1,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// // Save audio to file (Node.js)
|
||||||
|
// await import("fs/promises").then(fs => fs.writeFile("output.mp3", audio));
|
||||||
|
// }
|
||||||
37
test/create.ts
Normal file
37
test/create.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { textToSpeech, VOICE_IDS, EMOTIONS } from "../src/app";
|
||||||
|
import { writeFile } from "fs/promises";
|
||||||
|
|
||||||
|
const text = `西湖的断桥,名字里藏着三分凄迷,七分孤傲。
|
||||||
|
|
||||||
|
说是"断桥",实则桥影未断。每当冬雪消融,向阳面的积雪率先化作一抹深色的石痕,而背阴处依然银装素裹。远远望去,长桥仿佛从中断开,消失在水天一色间。这种"断"与"连"的错觉,恰似那段传颂千年的白蛇传说——西湖边的一把红伞,借的是伞,连的是情,却也注定是一场断肠的相逢。
|
||||||
|
|
||||||
|
漫步桥上,脚下是厚重的石板,两岸是摇曳的残荷。断桥不只是一座石建筑,它是西湖的眉眼,锁着烟雨,也锁着时光。哪怕人潮涌动,只要你驻足片刻,看那一湖静水映照着孤山的苍翠,便能感受到一种克制的深情。
|
||||||
|
|
||||||
|
桥未曾断,断的是旧梦;雪总会消,留下的是此情可待。断桥,不仅是一处风景,更是一个供后人凭吊、叹息,却始终不愿离去的精神码头。`;
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
console.log("Generating speech for: 断桥...");
|
||||||
|
const audio = await textToSpeech({
|
||||||
|
model: "speech-2.8-hd",
|
||||||
|
text,
|
||||||
|
stream: false,
|
||||||
|
voice_setting: {
|
||||||
|
voice_id: VOICE_IDS.male_qn_qingse,
|
||||||
|
speed: 1,
|
||||||
|
vol: 1,
|
||||||
|
pitch: 0,
|
||||||
|
emotion: EMOTIONS.sad,
|
||||||
|
},
|
||||||
|
audio_setting: {
|
||||||
|
sample_rate: 32000,
|
||||||
|
bitrate: 128000,
|
||||||
|
format: "mp3",
|
||||||
|
channel: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
await writeFile("test/断桥.mp3", audio);
|
||||||
|
console.log("Saved to test/断桥.mp3");
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
||||||
BIN
test/断桥.mp3
Normal file
BIN
test/断桥.mp3
Normal file
Binary file not shown.
15
tsconfig.json
Normal file
15
tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"types": ["node"]
|
||||||
|
},
|
||||||
|
"include": ["src/**/*"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user