anl 1.7.7 → 25.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ar.md CHANGED
@@ -334,16 +334,36 @@ export const uploadFile = (params: UploadFile.Body) =>
334
334
  $ anl lint
335
335
  ```
336
336
 
337
+ بعد تنفيذ الأمر، ستظهر واجهة اختيار متعدد تفاعلية، يمكنك اختيار الأدوات التي تحتاج إلى تثبيتها:
338
+
339
+ ```
340
+ ? Select the linting tools to install (multi-select):
341
+ ❯◯ ESLint - JavaScript/TypeScript linter
342
+ ◯ Stylelint - CSS/SCSS/Less linter
343
+ ◯ Commitlint - Git commit message linter
344
+ ◯ Prettier - Code formatter
345
+ ◯ VSCode - Editor settings
346
+ ```
347
+
348
+ استخدم **مفتاح المسافة** للاختيار/إلغاء الاختيار، **مفتاح Enter** للتأكيد.
349
+
337
350
  ### تفاصيل التكوين
338
351
 
339
352
  #### 1. تكوين ESLint
340
353
 
341
354
  - تثبيت التبعيات المطلوبة تلقائيًا
342
- - يدعم إطارات React/Vue
355
+ - يدعم إطارات React/Vue (سيُطلب منك اختيار إطار عمل إذا تم تحديده)
343
356
  - توليد `.eslintrc.js` و `.eslintignore` تلقائيًا
344
357
  - دمج دعم TypeScript
345
358
 
346
- #### 2. تكوين Prettier
359
+ #### 2. تكوين Stylelint
360
+
361
+ - تثبيت التبعيات المتعلقة بـ stylelint تلقائيًا
362
+ - يدعم معالجات Less/Sass المسبقة (سيُطلب منك اختيار معالج مسبق إذا تم تحديده)
363
+ - توليد ملف تكوين `.stylelintrc.js`
364
+ - دمج دعم Prettier
365
+
366
+ #### 3. تكوين Prettier
347
367
 
348
368
  - تثبيت التبعيات ذات الصلة بـ prettier تلقائيًا
349
369
  - توليد ملف تكوين `.prettierrc.js`
@@ -354,20 +374,32 @@ $ anl lint
354
374
  - أقواس دالة السهم
355
375
  - معايير نمط الكود الأخرى
356
376
 
357
- #### 3. تكوين CommitLint
377
+ #### 4. تكوين CommitLint
358
378
 
359
379
  - تثبيت التبعيات ذات الصلة بـ commitlint
360
380
  - تكوين husky git hooks
361
381
  - توليد `commitlint.config.js`
362
382
  - توحيد رسالة git commit
363
383
 
364
- #### 4. تكوين VSCode
384
+ #### 5. تكوين VSCode
365
385
 
366
386
  - إنشاء `.vscode/settings.json`
367
387
  - تكوين التنسيق التلقائي للمحرر
368
388
  - تعيين أداة التنسيق الافتراضية
369
389
  - يدعم تحديث ملفات التكوين الموجودة
370
390
 
391
+ ### أمثلة الاستخدام
392
+
393
+ 1. **تثبيت ESLint و Prettier فقط**
394
+ - اختر ESLint و Prettier
395
+ - إذا تم اختيار ESLint، سيُطلب منك اختيار إطار عمل (React/Vue)
396
+ - بعد التثبيت، سيحتوي مشروعك على `.eslintrc.js` و `.prettierrc.js`
397
+
398
+ 2. **التكوين الكامل**
399
+ - اختر جميع الخيارات
400
+ - أكمل اختيار إطار العمل والمعالج المسبق
401
+ - سيتم تكوين نظام كامل لمعايير الكود في مشروعك
402
+
371
403
  # أمر `anl git`
372
404
 
373
405
  ### نظرة عامة على الوظائف
package/README.es.md CHANGED
@@ -332,16 +332,36 @@ Nota: `includeInterface` y `excludeInterface` no se pueden usar simultáneamente
332
332
  $ anl lint
333
333
  ```
334
334
 
335
+ Después de ejecutar el comando, aparecerá una interfaz de selección múltiple interactiva donde puedes elegir las herramientas a instalar:
336
+
337
+ ```
338
+ ? Select the linting tools to install (multi-select):
339
+ ❯◯ ESLint - JavaScript/TypeScript linter
340
+ ◯ Stylelint - CSS/SCSS/Less linter
341
+ ◯ Commitlint - Git commit message linter
342
+ ◯ Prettier - Code formatter
343
+ ◯ VSCode - Editor settings
344
+ ```
345
+
346
+ Usa la **barra espaciadora** para seleccionar/deseleccionar, **Enter** para confirmar.
347
+
335
348
  ### Detalles de Configuración
336
349
 
337
350
  #### 1. Configuración ESLint
338
351
 
339
352
  - Instalación automática de dependencias necesarias
340
- - Soporte para frameworks React/Vue
353
+ - Soporte para frameworks React/Vue (se te pedirá que elijas un framework si se selecciona)
341
354
  - Generación automática de `.eslintrc.js` y `.eslintignore`
342
355
  - Integración de soporte TypeScript
343
356
 
344
- #### 2. Configuración Prettier
357
+ #### 2. Configuración Stylelint
358
+
359
+ - Instalación automática de dependencias relacionadas con stylelint
360
+ - Soporte para preprocesadores Less/Sass (se te pedirá que elijas un preprocesador si se selecciona)
361
+ - Generación del archivo de configuración `.stylelintrc.js`
362
+ - Integración de soporte Prettier
363
+
364
+ #### 3. Configuración Prettier
345
365
 
346
366
  - Instalación automática de dependencias relacionadas con prettier
347
367
  - Generación del archivo de configuración `.prettierrc.js`
@@ -352,20 +372,32 @@ $ anl lint
352
372
  - Paréntesis en funciones flecha
353
373
  - Otras especificaciones de estilo de código
354
374
 
355
- #### 3. Configuración CommitLint
375
+ #### 4. Configuración CommitLint
356
376
 
357
377
  - Instalación de dependencias relacionadas con commitlint
358
378
  - Configuración de git hooks de husky
359
379
  - Generación de `commitlint.config.js`
360
380
  - Estandarización de mensajes git commit
361
381
 
362
- #### 4. Configuración VSCode
382
+ #### 5. Configuración VSCode
363
383
 
364
384
  - Creación de `.vscode/settings.json`
365
385
  - Configuración de formateo automático del editor
366
386
  - Configuración de herramienta de formateo predeterminada
367
387
  - Soporte para actualización de archivos de configuración existentes
368
388
 
389
+ ### Ejemplos de Uso
390
+
391
+ 1. **Instalar solo ESLint y Prettier**
392
+ - Selecciona ESLint y Prettier
393
+ - Si se selecciona ESLint, se te pedirá que elijas un framework (React/Vue)
394
+ - Después de la instalación, tu proyecto tendrá `.eslintrc.js` y `.prettierrc.js`
395
+
396
+ 2. **Configuración Completa**
397
+ - Selecciona todas las opciones
398
+ - Completa las selecciones de framework y preprocesador
399
+ - Tu proyecto tendrá un sistema completo de estándares de código configurado
400
+
369
401
  # Comando `anl git`
370
402
 
371
403
  ### Descripción General de Funciones
package/README.fr.md CHANGED
@@ -334,16 +334,36 @@ Note : `includeInterface` et `excludeInterface` ne peuvent pas être utilisés s
334
334
  $ anl lint
335
335
  ```
336
336
 
337
+ Après l'exécution de la commande, une interface de sélection multiple interactive apparaîtra où vous pourrez choisir les outils à installer :
338
+
339
+ ```
340
+ ? Select the linting tools to install (multi-select):
341
+ ❯◯ ESLint - JavaScript/TypeScript linter
342
+ ◯ Stylelint - CSS/SCSS/Less linter
343
+ ◯ Commitlint - Git commit message linter
344
+ ◯ Prettier - Code formatter
345
+ ◯ VSCode - Editor settings
346
+ ```
347
+
348
+ Utilisez la **barre d'espace** pour sélectionner/désélectionner, **Entrée** pour confirmer.
349
+
337
350
  ### Détails de configuration
338
351
 
339
352
  #### 1. Configuration ESLint
340
353
 
341
354
  - Installation automatique des dépendances nécessaires
342
- - Support des frameworks React/Vue
355
+ - Support des frameworks React/Vue (vous serez invité à choisir un framework si sélectionné)
343
356
  - Génération automatique de `.eslintrc.js` et `.eslintignore`
344
357
  - Support TypeScript intégré
345
358
 
346
- #### 2. Configuration Prettier
359
+ #### 2. Configuration Stylelint
360
+
361
+ - Installation automatique des dépendances liées à stylelint
362
+ - Support des préprocesseurs Less/Sass (vous serez invité à choisir un préprocesseur si sélectionné)
363
+ - Génération du fichier de configuration `.stylelintrc.js`
364
+ - Support Prettier intégré
365
+
366
+ #### 3. Configuration Prettier
347
367
 
348
368
  - Installation automatique des dépendances prettier associées
349
369
  - Génération du fichier de configuration `.prettierrc.js`
@@ -354,20 +374,32 @@ $ anl lint
354
374
  - Parenthèses des fonctions fléchées
355
375
  - Autres normes de style de code
356
376
 
357
- #### 3. Configuration CommitLint
377
+ #### 4. Configuration CommitLint
358
378
 
359
379
  - Installation des dépendances commitlint associées
360
380
  - Configuration des hooks git husky
361
381
  - Génération de `commitlint.config.js`
362
382
  - Normalisation des messages git commit
363
383
 
364
- #### 4. Configuration VSCode
384
+ #### 5. Configuration VSCode
365
385
 
366
386
  - Création de `.vscode/settings.json`
367
387
  - Configuration du formatage automatique de l'éditeur
368
388
  - Définition de l'outil de formatage par défaut
369
389
  - Support de la mise à jour des fichiers de configuration existants
370
390
 
391
+ ### Exemples d'utilisation
392
+
393
+ 1. **Installer uniquement ESLint et Prettier**
394
+ - Sélectionnez ESLint et Prettier
395
+ - Si ESLint est sélectionné, vous serez invité à choisir un framework (React/Vue)
396
+ - Après l'installation, votre projet aura `.eslintrc.js` et `.prettierrc.js`
397
+
398
+ 2. **Configuration complète**
399
+ - Sélectionnez toutes les options
400
+ - Complétez les sélections de framework et de préprocesseur
401
+ - Votre projet aura un système complet de normes de code configuré
402
+
371
403
  # Commande `anl git`
372
404
 
373
405
  ### Aperçu des fonctionnalités
package/README.jp.md CHANGED
@@ -334,16 +334,36 @@ export const uploadFile = (params: UploadFile.Body) =>
334
334
  $ anl lint
335
335
  ```
336
336
 
337
+ コマンドを実行すると、インタラクティブな複数選択インターフェースが表示され、インストールするツールを選択できます:
338
+
339
+ ```
340
+ ? Select the linting tools to install (multi-select):
341
+ ❯◯ ESLint - JavaScript/TypeScript linter
342
+ ◯ Stylelint - CSS/SCSS/Less linter
343
+ ◯ Commitlint - Git commit message linter
344
+ ◯ Prettier - Code formatter
345
+ ◯ VSCode - Editor settings
346
+ ```
347
+
348
+ **スペースキー**で選択/選択解除、**Enter**で確認します。
349
+
337
350
  ### 設定の詳細
338
351
 
339
352
  #### 1. ESLint 設定
340
353
 
341
354
  - 必要な依存関係を自動インストール
342
- - React/Vue フレームワークをサポート
355
+ - React/Vue フレームワークをサポート(選択時にフレームワークの選択を求められます)
343
356
  - `.eslintrc.js` と `.eslintignore` を自動生成
344
357
  - TypeScript サポートを統合
345
358
 
346
- #### 2. Prettier 設定
359
+ #### 2. Stylelint 設定
360
+
361
+ - stylelint 関連の依存関係を自動インストール
362
+ - Less/Sass プリプロセッサをサポート(選択時にプリプロセッサの選択を求められます)
363
+ - `.stylelintrc.js` 設定ファイルを生成
364
+ - Prettier サポートを統合
365
+
366
+ #### 3. Prettier 設定
347
367
 
348
368
  - prettier 関連の依存関係を自動インストール
349
369
  - `.prettierrc.js` 設定ファイルを生成
@@ -354,20 +374,32 @@ $ anl lint
354
374
  - アロー関数の括弧
355
375
  - その他のコードスタイル規約
356
376
 
357
- #### 3. CommitLint 設定
377
+ #### 4. CommitLint 設定
358
378
 
359
379
  - commitlint 関連の依存関係をインストール
360
380
  - husky git hooks を設定
361
381
  - `commitlint.config.js` を生成
362
382
  - git commit メッセージを標準化
363
383
 
364
- #### 4. VSCode 設定
384
+ #### 5. VSCode 設定
365
385
 
366
386
  - `.vscode/settings.json` を作成
367
387
  - エディタの自動フォーマットを設定
368
388
  - デフォルトのフォーマットツールを設定
369
389
  - 既存の設定ファイルの更新をサポート
370
390
 
391
+ ### 使用例
392
+
393
+ 1. **ESLint と Prettier のみをインストール**
394
+ - ESLint と Prettier を選択
395
+ - ESLint を選択した場合、フレームワーク(React/Vue)の選択を求められます
396
+ - インストール後、プロジェクトに `.eslintrc.js` と `.prettierrc.js` が作成されます
397
+
398
+ 2. **完全な設定**
399
+ - すべてのオプションを選択
400
+ - フレームワークとプリプロセッサの選択を完了
401
+ - プロジェクトに完全なコード規約システムが設定されます
402
+
371
403
  # `anl git` コマンド
372
404
 
373
405
  ### 機能概要
package/README.md CHANGED
@@ -319,12 +319,13 @@ Note: `includeInterface` and `excludeInterface` cannot be used simultaneously. I
319
319
 
320
320
  # `anl lint` Command Usage
321
321
 
322
- > Provides one-click configuration for various lint tools in frontend projects, including:
322
+ > Provides **interactive multi-select** configuration for various lint tools in frontend projects, including:
323
323
  >
324
- > - ESLint code checking
325
- > - Prettier code formatting
326
- > - CommitLint commit message standards
327
- > - VSCode editor configuration
324
+ > - ESLint - JavaScript/TypeScript code linting
325
+ > - Stylelint - CSS/SCSS/Less style linting
326
+ > - Prettier - Code formatting
327
+ > - CommitLint - Git commit message standards
328
+ > - VSCode - Editor configuration
328
329
 
329
330
  ### Usage Method
330
331
 
@@ -332,16 +333,36 @@ Note: `includeInterface` and `excludeInterface` cannot be used simultaneously. I
332
333
  $ anl lint
333
334
  ```
334
335
 
336
+ After executing the command, an interactive multi-select interface will appear where you can choose the tools to install:
337
+
338
+ ```
339
+ ? Select the linting tools to install (multi-select):
340
+ ❯◯ ESLint - JavaScript/TypeScript linter
341
+ ◯ Stylelint - CSS/SCSS/Less linter
342
+ ◯ Commitlint - Git commit message linter
343
+ ◯ Prettier - Code formatter
344
+ ◯ VSCode - Editor settings
345
+ ```
346
+
347
+ Use **spacebar** to select/deselect, **Enter** to confirm.
348
+
335
349
  ### Configuration Details
336
350
 
337
351
  #### 1. ESLint Configuration
338
352
 
339
353
  - Automatically installs required dependencies
340
- - Supports React/Vue frameworks
354
+ - Supports React/Vue frameworks (you'll be prompted to choose a framework if selected)
341
355
  - Automatically generates `.eslintrc.js` and `.eslintignore`
342
356
  - Integrates TypeScript support
343
357
 
344
- #### 2. Prettier Configuration
358
+ #### 2. Stylelint Configuration
359
+
360
+ - Automatically installs stylelint related dependencies
361
+ - Supports Less/Sass preprocessors (you'll be prompted to choose a preprocessor if selected)
362
+ - Generates `.stylelintrc.js` configuration file
363
+ - Integrates Prettier support
364
+
365
+ #### 3. Prettier Configuration
345
366
 
346
367
  - Automatically installs prettier related dependencies
347
368
  - Generates `.prettierrc.js` configuration file
@@ -352,20 +373,32 @@ $ anl lint
352
373
  - Arrow function parentheses
353
374
  - Other code style standards
354
375
 
355
- #### 3. CommitLint Configuration
376
+ #### 4. CommitLint Configuration
356
377
 
357
378
  - Installs commitlint related dependencies
358
379
  - Configures husky git hooks
359
380
  - Generates `commitlint.config.js`
360
381
  - Standardizes git commit messages
361
382
 
362
- #### 4. VSCode Configuration
383
+ #### 5. VSCode Configuration
363
384
 
364
385
  - Creates `.vscode/settings.json`
365
386
  - Configures editor auto-formatting
366
387
  - Sets default formatting tools
367
388
  - Supports updating existing configuration files
368
389
 
390
+ ### Usage Examples
391
+
392
+ 1. **Install ESLint and Prettier Only**
393
+ - Select ESLint and Prettier
394
+ - If ESLint is selected, you'll be prompted to choose a framework (React/Vue)
395
+ - After installation, your project will have `.eslintrc.js` and `.prettierrc.js`
396
+
397
+ 2. **Full Configuration**
398
+ - Select all options
399
+ - Complete the framework and preprocessor selection prompts
400
+ - Your project will have a complete code standards system configured
401
+
369
402
  # `anl git` Command
370
403
 
371
404
  ### Feature Overview
package/README.ru.md CHANGED
@@ -334,16 +334,36 @@ export const uploadFile = (params: UploadFile.Body) =>
334
334
  $ anl lint
335
335
  ```
336
336
 
337
+ После выполнения команды появится интерактивный интерфейс множественного выбора, где вы можете выбрать инструменты для установки:
338
+
339
+ ```
340
+ ? Select the linting tools to install (multi-select):
341
+ ❯◯ ESLint - JavaScript/TypeScript linter
342
+ ◯ Stylelint - CSS/SCSS/Less linter
343
+ ◯ Commitlint - Git commit message linter
344
+ ◯ Prettier - Code formatter
345
+ ◯ VSCode - Editor settings
346
+ ```
347
+
348
+ Используйте **пробел** для выбора/отмены выбора, **Enter** для подтверждения.
349
+
337
350
  ### Детали конфигурации
338
351
 
339
352
  #### 1. Конфигурация ESLint
340
353
 
341
354
  - Автоматическая установка необходимых зависимостей
342
- - Поддержка фреймворков React/Vue
355
+ - Поддержка фреймворков React/Vue (вам будет предложено выбрать фреймворк при выборе)
343
356
  - Автоматическая генерация `.eslintrc.js` и `.eslintignore`
344
357
  - Интеграция поддержки TypeScript
345
358
 
346
- #### 2. Конфигурация Prettier
359
+ #### 2. Конфигурация Stylelint
360
+
361
+ - Автоматическая установка зависимостей stylelint
362
+ - Поддержка препроцессоров Less/Sass (вам будет предложено выбрать препроцессор при выборе)
363
+ - Генерация файла конфигурации `.stylelintrc.js`
364
+ - Интеграция поддержки Prettier
365
+
366
+ #### 3. Конфигурация Prettier
347
367
 
348
368
  - Автоматическая установка зависимостей prettier
349
369
  - Генерация файла конфигурации `.prettierrc.js`
@@ -354,20 +374,32 @@ $ anl lint
354
374
  - Скобки стрелочных функций
355
375
  - Другие стандарты стиля кода
356
376
 
357
- #### 3. Конфигурация CommitLint
377
+ #### 4. Конфигурация CommitLint
358
378
 
359
379
  - Установка зависимостей commitlint
360
380
  - Настройка git hooks husky
361
381
  - Генерация `commitlint.config.js`
362
382
  - Стандартизация сообщений git commit
363
383
 
364
- #### 4. Конфигурация VSCode
384
+ #### 5. Конфигурация VSCode
365
385
 
366
386
  - Создание `.vscode/settings.json`
367
387
  - Конфигурация автоматического форматирования редактора
368
388
  - Настройка инструмента форматирования по умолчанию
369
389
  - Поддержка обновления существующих файлов конфигурации
370
390
 
391
+ ### Примеры использования
392
+
393
+ 1. **Установить только ESLint и Prettier**
394
+ - Выберите ESLint и Prettier
395
+ - Если выбран ESLint, вам будет предложено выбрать фреймворк (React/Vue)
396
+ - После установки в вашем проекте будут `.eslintrc.js` и `.prettierrc.js`
397
+
398
+ 2. **Полная конфигурация**
399
+ - Выберите все опции
400
+ - Завершите выбор фреймворка и препроцессора
401
+ - В вашем проекте будет настроена полная система стандартов кода
402
+
371
403
  # Команда `anl git`
372
404
 
373
405
  ### Обзор функций
package/README.zh.md CHANGED
@@ -321,12 +321,13 @@ export const uploadFile = (params: UploadFile.Body) =>
321
321
 
322
322
  # `anl lint` 命令使用说明
323
323
 
324
- > 提供一键配置前端项目各种 lint 工具的功能,包括:
324
+ > 提供**交互式多选**配置前端项目各种 lint 工具的功能,包括:
325
325
  >
326
- > - ESLint 代码检查
327
- > - Prettier 代码格式化
328
- > - CommitLint 提交信息规范
329
- > - VSCode 编辑器配置
326
+ > - ESLint - JavaScript/TypeScript 代码检查
327
+ > - Stylelint - CSS/SCSS/Less 样式检查
328
+ > - Prettier - 代码格式化
329
+ > - CommitLint - Git 提交信息规范
330
+ > - VSCode - 编辑器配置
330
331
 
331
332
  ### 使用方法
332
333
 
@@ -334,16 +335,36 @@ export const uploadFile = (params: UploadFile.Body) =>
334
335
  $ anl lint
335
336
  ```
336
337
 
338
+ 执行命令后,会出现交互式多选界面,你可以选择需要安装的工具:
339
+
340
+ ```
341
+ ? Select the linting tools to install (multi-select):
342
+ ❯◯ ESLint - JavaScript/TypeScript linter
343
+ ◯ Stylelint - CSS/SCSS/Less linter
344
+ ◯ Commitlint - Git commit message linter
345
+ ◯ Prettier - Code formatter
346
+ ◯ VSCode - Editor settings
347
+ ```
348
+
349
+ 使用 **空格键** 选择/取消选择,**回车键** 确认。
350
+
337
351
  ### 配置详情
338
352
 
339
353
  #### 1. ESLint 配置
340
354
 
341
355
  - 自动安装所需依赖
342
- - 支持 React/Vue 框架
356
+ - 支持 React/Vue 框架(选择后会提示选择框架)
343
357
  - 自动生成 `.eslintrc.js` 和 `.eslintignore`
344
358
  - 集成 TypeScript 支持
345
359
 
346
- #### 2. Prettier 配置
360
+ #### 2. Stylelint 配置
361
+
362
+ - 自动安装 stylelint 相关依赖
363
+ - 支持 Less/Sass 预处理器(选择后会提示选择预处理器)
364
+ - 生成 `.stylelintrc.js` 配置文件
365
+ - 集成 Prettier 支持
366
+
367
+ #### 3. Prettier 配置
347
368
 
348
369
  - 自动安装 prettier 相关依赖
349
370
  - 生成 `.prettierrc.js` 配置文件
@@ -354,20 +375,32 @@ $ anl lint
354
375
  - 箭头函数括号
355
376
  - 其他代码风格规范
356
377
 
357
- #### 3. CommitLint 配置
378
+ #### 4. CommitLint 配置
358
379
 
359
380
  - 安装 commitlint 相关依赖
360
381
  - 配置 husky git hooks
361
382
  - 生成 `commitlint.config.js`
362
383
  - 规范化 git commit message
363
384
 
364
- #### 4. VSCode 配置
385
+ #### 5. VSCode 配置
365
386
 
366
387
  - 创建 `.vscode/settings.json`
367
388
  - 配置编辑器自动格式化
368
389
  - 设置默认格式化工具
369
390
  - 支持已有配置文件更新
370
391
 
392
+ ### 使用示例
393
+
394
+ 1. **只安装 ESLint 和 Prettier**
395
+ - 选择 ESLint 和 Prettier
396
+ - 如果选择了 ESLint,会提示选择框架(React/Vue)
397
+ - 安装完成后项目中会有 `.eslintrc.js` 和 `.prettierrc.js`
398
+
399
+ 2. **完整配置**
400
+ - 选择所有选项
401
+ - 依次完成框架和预处理器的选择
402
+ - 项目将配置完整的代码规范体系
403
+
371
404
  # `anl git` 命令
372
405
 
373
406
  ### 功能概述
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.3",t={title:"Swagger Petstore - OpenAPI 3.0",description:"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\nSwagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_\n\nSome useful links:\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)",termsOfService:"http://swagger.io/terms/",contact:{email:"apiteam@swagger.io"},license:{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"},version:"1.0.11"},s={description:"Find out more about Swagger",url:"http://swagger.io"},r=[{url:"https://petstore3.swagger.io/api/v3"}],a=[{name:"pet",description:"Everything about your Pets",externalDocs:{description:"Find out more",url:"http://swagger.io"}},{name:"store",description:"Access to Petstore orders",externalDocs:{description:"Find out more about our store",url:"http://swagger.io"}},{name:"user",description:"Operations about user"}],o={"/pet":{put:{tags:["pet"],summary:"Update an existing pet",description:"Update an existing pet by Id",operationId:"updatePet",requestBody:{description:"Update an existent pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Add a new pet to the store",description:"Add a new pet to the store",operationId:"addPet",requestBody:{description:"Create a new pet in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Pet"}}},required:!0},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByStatus":{get:{tags:["pet"],summary:"Finds Pets by status",description:"Multiple status values can be provided with comma separated strings",operationId:"findPetsByStatus",parameters:[{name:"status",in:"query",description:"Status values that need to be considered for filter",required:!1,explode:!0,schema:{type:"string",default:"available",enum:["available","pending","sold"]}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid status value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/findByTags":{get:{tags:["pet"],summary:"Finds Pets by tags",description:"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",operationId:"findPetsByTags",parameters:[{name:"tags",in:"query",description:"Tags to filter by",required:!1,explode:!0,schema:{type:"array",items:{type:"string"}}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}},"application/xml":{schema:{type:"array",items:{$ref:"#/components/schemas/Pet"}}}}},400:{description:"Invalid tag value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}":{get:{tags:["pet"],summary:"Find pet by ID",description:"Returns a single pet",operationId:"getPetById",parameters:[{name:"petId",in:"path",description:"ID of pet to return",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},400:{description:"Invalid ID supplied"},404:{description:"Pet not found"}},security:[{api_key:[]},{petstore_auth:["write:pets","read:pets"]}]},post:{tags:["pet"],summary:"Updates a pet in the store with form data",description:"",operationId:"updatePetWithForm",parameters:[{name:"petId",in:"path",description:"ID of pet that needs to be updated",required:!0,schema:{type:"integer",format:"int64"}},{name:"name",in:"query",description:"Name of pet that needs to be updated",schema:{type:"string"}},{name:"status",in:"query",description:"Status of pet that needs to be updated",schema:{type:"string"}}],responses:{400:{description:"Invalid input"}},security:[{petstore_auth:["write:pets","read:pets"]}]},delete:{tags:["pet"],summary:"Deletes a pet",description:"delete a pet",operationId:"deletePet",parameters:[{name:"api_key",in:"header",description:"",required:!1,schema:{type:"string"}},{name:"petId",in:"path",description:"Pet id to delete",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid pet value"}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/pet/{petId}/uploadImage":{post:{tags:["pet"],summary:"uploads an image",description:"",operationId:"uploadFile",parameters:[{name:"petId",in:"path",description:"ID of pet to update",required:!0,schema:{type:"integer",format:"int64"}},{name:"additionalMetadata",in:"query",description:"Additional Metadata",required:!1,schema:{type:"string"}}],requestBody:{content:{"application/octet-stream":{schema:{type:"string",format:"binary"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/ApiResponse"}}}}},security:[{petstore_auth:["write:pets","read:pets"]}]}},"/store/inventory":{get:{tags:["store"],summary:"Returns pet inventories by status",description:"Returns a map of status codes to quantities",operationId:"getInventory",responses:{200:{description:"successful operation",content:{"application/json":{schema:{type:"object",additionalProperties:{type:"integer",format:"int32"}}}}}},security:[{api_key:[]}]}},"/store/order":{post:{tags:["store"],summary:"Place an order for a pet",description:"Place a new order in the store",operationId:"placeOrder",requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/Order"}}}},responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid input"},422:{description:"Validation exception"}}}},"/store/order/{orderId}":{get:{tags:["store"],summary:"Find purchase order by ID",description:"For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.",operationId:"getOrderById",parameters:[{name:"orderId",in:"path",description:"ID of order that needs to be fetched",required:!0,schema:{type:"integer",format:"int64"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/Order"}},"application/xml":{schema:{$ref:"#/components/schemas/Order"}}}},400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}},delete:{tags:["store"],summary:"Delete purchase order by ID",description:"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",operationId:"deleteOrder",parameters:[{name:"orderId",in:"path",description:"ID of the order that needs to be deleted",required:!0,schema:{type:"integer",format:"int64"}}],responses:{400:{description:"Invalid ID supplied"},404:{description:"Order not found"}}}},"/user":{post:{tags:["user"],summary:"Create user",description:"This can only be done by the logged in user.",operationId:"createUser",requestBody:{description:"Created user object",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}}}}},"/user/createWithList":{post:{tags:["user"],summary:"Creates list of users with given input array",description:"Creates list of users with given input array",operationId:"createUsersWithListInput",requestBody:{content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}},responses:{200:{description:"Successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},default:{description:"successful operation"}}}},"/user/login":{get:{tags:["user"],summary:"Logs user into the system",description:"",operationId:"loginUser",parameters:[{name:"username",in:"query",description:"The user name for login",required:!1,schema:{type:"string"}},{name:"password",in:"query",description:"The password for login in clear text",required:!1,schema:{type:"string"}}],responses:{200:{description:"successful operation",headers:{"X-Rate-Limit":{description:"calls per hour allowed by the user",schema:{type:"integer",format:"int32"}},"X-Expires-After":{description:"date in UTC when token expires",schema:{type:"string",format:"date-time"}}},content:{"application/xml":{schema:{type:"string"}},"application/json":{schema:{type:"string"}}}},400:{description:"Invalid username/password supplied"}}}},"/user/logout":{get:{tags:["user"],summary:"Logs out current logged in user session",description:"",operationId:"logoutUser",parameters:[],responses:{default:{description:"successful operation"}}}},"/user/{username}":{get:{tags:["user"],summary:"Get user by user name",description:"",operationId:"getUserByName",parameters:[{name:"username",in:"path",description:"The name that needs to be fetched. Use user1 for testing. ",required:!0,schema:{type:"string"}}],responses:{200:{description:"successful operation",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}}}},400:{description:"Invalid username supplied"},404:{description:"User not found"}}},put:{tags:["user"],summary:"Update user",description:"This can only be done by the logged in user.",operationId:"updateUser",parameters:[{name:"username",in:"path",description:"name that need to be deleted",required:!0,schema:{type:"string"}}],requestBody:{description:"Update an existent user in the store",content:{"application/json":{schema:{$ref:"#/components/schemas/User"}},"application/xml":{schema:{$ref:"#/components/schemas/User"}},"application/x-www-form-urlencoded":{schema:{$ref:"#/components/schemas/User"}}}},responses:{default:{description:"successful operation"}}},delete:{tags:["user"],summary:"Delete user",description:"This can only be done by the logged in user.",operationId:"deleteUser",parameters:[{name:"username",in:"path",description:"The name that needs to be deleted",required:!0,schema:{type:"string"}}],responses:{400:{description:"Invalid username supplied"},404:{description:"User not found"}}}}},n={schemas:{Order:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},petId:{type:"integer",format:"int64",example:198772},quantity:{type:"integer",format:"int32",example:7},shipDate:{type:"string",format:"date-time"},status:{type:"string",description:"Order Status",example:"approved",enum:["placed","approved","delivered"]},complete:{type:"boolean"}},xml:{name:"order"}},Customer:{type:"object",properties:{id:{type:"integer",format:"int64",example:1e5},username:{type:"string",example:"fehguy"},address:{type:"array",xml:{name:"addresses",wrapped:!0},items:{$ref:"#/components/schemas/Address"}}},xml:{name:"customer"}},Address:{type:"object",properties:{street:{type:"string",example:"437 Lytton"},city:{type:"string",example:"Palo Alto"},state:{type:"string",example:"CA"},zip:{type:"string",example:"94301"}},xml:{name:"address"}},Category:{type:"object",properties:{id:{type:"integer",format:"int64",example:1},name:{type:"string",example:"Dogs"}},xml:{name:"category"}},User:{type:"object",properties:{id:{type:"integer",format:"int64",example:10},username:{type:"string",example:"theUser"},firstName:{type:"string",example:"John"},lastName:{type:"string",example:"James"},email:{type:"string",example:"john@email.com"},password:{type:"string",example:"12345"},phone:{type:"string",example:"12345"},userStatus:{type:"integer",description:"User Status",format:"int32",example:1}},xml:{name:"user"}},Tag:{type:"object",properties:{id:{type:"integer",format:"int64"},name:{type:"string"}},xml:{name:"tag"}},Pet:{required:["name","photoUrls"],type:"object",properties:{id:{type:"integer",format:"int64",example:10},name:{type:"string",example:"doggie"},category:{$ref:"#/components/schemas/Category"},photoUrls:{type:"array",xml:{wrapped:!0},items:{type:"string",xml:{name:"photoUrl"}}},tags:{type:"array",xml:{wrapped:!0},items:{$ref:"#/components/schemas/Tag"}},status:{type:"string",description:"pet status in the store",enum:["available","pending","sold"]}},xml:{name:"pet"}},ApiResponse:{type:"object",properties:{code:{type:"integer",format:"int32"},type:{type:"string"},message:{type:"string"}},xml:{name:"##default"}}},requestBodies:{Pet:{description:"Pet object that needs to be added to the store",content:{"application/json":{schema:{$ref:"#/components/schemas/Pet"}},"application/xml":{schema:{$ref:"#/components/schemas/Pet"}}}},UserArray:{description:"List of user object",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/User"}}}}}},securitySchemes:{petstore_auth:{type:"oauth2",flows:{implicit:{authorizationUrl:"https://petstore3.swagger.io/oauth/authorize",scopes:{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},api_key:{type:"apiKey",name:"api_key",in:"header"}}},i={openapi:e,info:t,externalDocs:s,servers:r,tags:a,paths:o,components:n};exports.components=n,exports.default=i,exports.externalDocs=s,exports.info=t,exports.openapi=e,exports.paths=o,exports.servers=r,exports.tags=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.7.7",i="FE command line tool",s="bin/an-cli.js",p={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch",blink:"npm run build && npm link","sync-docs":"node scripts/sync-docs.js"},l={anl:"bin/an-cli.js"},o="Gleason <bianliuzhu@gmail.com>",t={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.7","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},r={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"14.0.1",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",m={name:"anl",version:e,description:i,main:s,scripts:p,bin:l,author:o,license:"ISC",devDependencies:t,dependencies:r,keywords:n,files:c,repository:u,type:a};exports.author=o,exports.bin=l,exports.default=m,exports.dependencies=r,exports.description=i,exports.devDependencies=t,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=p,exports.type=a,exports.version=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="25.10.13",i="FE command line tool",t="bin/an-cli.js",o={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch",blink:"npm run build && npm link","sync-docs":"node scripts/sync-docs.js"},s={anl:"bin/an-cli.js"},l="Gleason <bianliuzhu@gmail.com>",n={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.7","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},r={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"14.0.1",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},p=["cli","command-line","frontend","typescript","type-generation","code-generator","swagger","openapi","api","rest-api","eslint","stylelint","prettier","commitlint","linter","formatter","react","vue","git","gitflow","developer-tools","automation","scaffolding"],c=["package.json","README.md","lib","template"],a={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},u="commonjs",g={name:"anl",version:e,description:i,main:t,scripts:o,bin:s,author:l,license:"ISC",devDependencies:n,dependencies:r,keywords:p,files:c,repository:a,type:u};exports.author=l,exports.bin=s,exports.default=g,exports.dependencies=r,exports.description=i,exports.devDependencies=n,exports.files=c,exports.keywords=p,exports.license="ISC",exports.main=t,exports.name="anl",exports.repository=a,exports.scripts=o,exports.type=u,exports.version=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js"),a=require("./core/components.js"),s=require("./core/get-data.js"),r=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),d=l(i),u=l(n);let p;const f="development"===process.env.NODE_ENV,h={saveTypeFolderPath:f?"apps/types":"src/api/types",saveApiListFolderPath:f?"apps/types":"src/api",saveEnumFolderPath:f?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",publicPrefix:"/api",dataLevel:"serve",swaggerJsonUrl:"https://generator3.swagger.io/openapi.json",headers:{},formatting:{indentation:"\t",lineEnding:"\n"},includeInterface:[],excludeInterface:[],erasableSyntaxOnly:!1,parameterSeparator:"_"};class g{schemas={};paths={};async handle(e){try{let t;if(t=f?(await Promise.resolve().then(function(){return require("../../data/umf.json.js")})).default:await s.getSwaggerJson(e),!t)throw new Error("无法获取 Swagger 数据");this.schemas=t.components?.schemas||{},this.paths=t.paths||{};const o=new a.default(this.schemas,e),i=new r.PathParse(this.paths,t.components?.parameters,this.schemas,e);return await o.handle(),await i.handle(),!0}catch(e){if(e instanceof Error)throw new Error(`Handle Swagger data failed: ${e.message}`);throw new Error("Handle Swagger data failed: unknown error")}}async formatGeneratedFiles(e){const a=`npx prettier --write "${e.saveTypeFolderPath}/**/*.{ts,d.ts}"`;try{await c.default.promises.access(e.saveTypeFolderPath);const{stderr:s}=await new Promise((e,t)=>{o.exec(a,(a,s,r)=>{a?t(a):e({stdout:s,stderr:r})})});s&&(console.log("\n"),console.log("$",d.default.yellow(a)),console.log("\n")),t.log.success("File formatting successful"),console.log("\n")}catch(e){console.log(""),console.log(e),t.log.error("Format failed, please manually execute the following command:"),console.log("$",d.default.yellow(a)),console.log("")}}async copyAjaxConfigFiles(e){try{const a=["config.ts","error-message.ts","fetch.ts","api-type.d.ts"],s=f?u.default.join(__dirname,"..","..","postbuild-assets","ajax-config"):u.default.join(__dirname,"..","..","ajax-config"),r=e;for(const e of a){const a=u.default.join(s,e),o=u.default.join(r,e);try{await c.default.promises.access(a);try{await c.default.promises.access(o),t.log.info(`${e} already exists, skipping generation.`)}catch{await c.default.promises.copyFile(a,o),t.log.success(`${e} create done.`)}}catch(e){t.log.error(`Source file ${a} does not exist`);continue}}}catch(e){return e}}async getConfig(e){try{const t=await c.default.promises.readFile(e,"utf8");return p=!0,JSON.parse(t)}catch(a){return p=!1,t.log.warning("Config file does not exist, will automatically create config file."),await t.writeFileRecursive(e,JSON.stringify(h,null,2)),t.log.success("Please check the an.config.json file in the project root directory"),h}}async initialize(){const e=process.cwd()+"/an.config.json";try{const a=await this.getConfig(e);if(!p)return;await c.default.promises.mkdir(a.saveApiListFolderPath,{recursive:!0}),await this.copyAjaxConfigFiles(a.saveApiListFolderPath),await t.clearDir(a.saveTypeFolderPath),await t.clearDir(a.saveEnumFolderPath),await this.handle(a),await this.formatGeneratedFiles(a),t.log.success("Successfully, all done, see you next time!"),console.log("\n")}catch(e){const a=e instanceof Error?e.message:"Unknown error";t.log.error(`Initialization failed: ${a}`)}}}if("development"===process.env.NODE_ENV){(new g).initialize()}exports.Main=g;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js"),a=require("./core/components.js"),s=require("./core/get-data.js"),r=require("./core/path.js"),o=require("shelljs"),i=require("chalk"),n=require("path");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(e),d=l(i),u=l(n);let p;const f="development"===process.env.NODE_ENV,h={saveTypeFolderPath:f?"apps/types":"src/api/types",saveApiListFolderPath:f?"apps/types":"src/api",saveEnumFolderPath:f?"apps/types/enums":"src/enums",importEnumPath:"../../../enums",requestMethodsImportPath:"./fetch",publicPrefix:"/api",dataLevel:"serve",swaggerJsonUrl:"https://generator3.swagger.io/openapi.json",headers:{},formatting:{indentation:"\t",lineEnding:"\n"},includeInterface:[],excludeInterface:[],erasableSyntaxOnly:!1,parameterSeparator:"_"};class g{schemas={};paths={};async handle(e){try{let t;if(t=f?(await Promise.resolve().then(function(){return require("../../data/openapi.json.js")})).default:await s.getSwaggerJson(e),!t)throw new Error("无法获取 Swagger 数据");this.schemas=t.components?.schemas||{},this.paths=t.paths||{};const o=new a.default(this.schemas,e),i=new r.PathParse(this.paths,t.components?.parameters,this.schemas,e);return await o.handle(),await i.handle(),!0}catch(e){if(e instanceof Error)throw new Error(`Handle Swagger data failed: ${e.message}`);throw new Error("Handle Swagger data failed: unknown error")}}async formatGeneratedFiles(e){const a=`npx prettier --write "${e.saveTypeFolderPath}/**/*.{ts,d.ts}"`;try{await c.default.promises.access(e.saveTypeFolderPath);const{stderr:s}=await new Promise((e,t)=>{o.exec(a,(a,s,r)=>{a?t(a):e({stdout:s,stderr:r})})});s&&(console.log("\n"),console.log("$",d.default.yellow(a)),console.log("\n")),t.log.success("File formatting successful"),console.log("\n")}catch(e){console.log(""),console.log(e),t.log.error("Format failed, please manually execute the following command:"),console.log("$",d.default.yellow(a)),console.log("")}}async copyAjaxConfigFiles(e){try{const a=["config.ts","error-message.ts","fetch.ts","api-type.d.ts"],s=f?u.default.join(__dirname,"..","..","postbuild-assets","ajax-config"):u.default.join(__dirname,"..","..","ajax-config"),r=e;for(const e of a){const a=u.default.join(s,e),o=u.default.join(r,e);try{await c.default.promises.access(a);try{await c.default.promises.access(o),t.log.info(`${e} already exists, skipping generation.`)}catch{await c.default.promises.copyFile(a,o),t.log.success(`${e} create done.`)}}catch(e){t.log.error(`Source file ${a} does not exist`);continue}}}catch(e){return e}}async getConfig(e){try{const t=await c.default.promises.readFile(e,"utf8");return p=!0,JSON.parse(t)}catch(a){return p=!1,t.log.warning("Config file does not exist, will automatically create config file."),await t.writeFileRecursive(e,JSON.stringify(h,null,2)),t.log.success("Please check the an.config.json file in the project root directory"),h}}async initialize(){const e=process.cwd()+"/an.config.json";try{const a=await this.getConfig(e);if(!p)return;await c.default.promises.mkdir(a.saveApiListFolderPath,{recursive:!0}),await this.copyAjaxConfigFiles(a.saveApiListFolderPath),await t.clearDir(a.saveTypeFolderPath),await t.clearDir(a.saveEnumFolderPath),await this.handle(a),await this.formatGeneratedFiles(a),t.log.success("Successfully, all done, see you next time!"),console.log("\n")}catch(e){const a=e instanceof Error?e.message:"Unknown error";t.log.error(`Initialization failed: ${a}`)}}}if("development"===process.env.NODE_ENV){(new g).initialize()}exports.Main=g;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("path"),e=require("fs"),t=require("child_process"),i=require("../utils/index.js"),s=require("./utils.js");function c(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var r=c(o),a=c(e);exports.gitHandle=(o=[])=>{o.includes("gitflow")&&(async()=>{const o=r.default.join(__dirname,"..","..","git-local-config"),e=process.cwd(),c=r.default.join(o,".gitscripts"),n=r.default.join(e,".gitscripts");await s.pathExists(c)?(await s.copyDirectoryRecursive(c,n),i.log.success(".gitscripts create done.")):i.log.error(`source directory ${c} does not exist`);const g=[".gitconfig",".commit-type.cjs"];for(const t of g){const c=r.default.join(o,t),a=r.default.join(e,t);await s.pathExists(c)?await s.copyFileIfMissing(c,a):i.log.error(`source file ${c} does not exist`)}try{a.default.chmodSync(r.default.join(n,"random-branch.sh"),493),i.log.success("random-branch.sh Raise power")}catch(o){i.log.error(`设置 .githooks/commit-msg 可执行权限失败: ${o instanceof Error?o.message:o}`)}try{t.execSync("git config --local include.path ../.gitconfig",{stdio:"ignore"}),i.log.success(".gitconfig git set")}catch(o){i.log.error("执行 git config --local include.path ../.gitconfig 失败,请手动执行该命令")}})(),o.includes("commitSubject")&&(async()=>{const o=r.default.join(__dirname,"..","..","git-local-config",".githooks"),e=process.cwd(),c=r.default.join(e,".githooks");if(await s.pathExists(o)){await s.copyDirectoryRecursive(o,c),i.log.success(".githooks create done.");try{a.default.chmodSync(r.default.join(c,"commit-msg"),493),i.log.success("commit-msg raise power done.")}catch(o){i.log.error(`设置 .githooks/commit-msg 可执行权限失败: ${o instanceof Error?o.message:o}`)}try{t.execSync("git config core.hooksPath .githooks",{stdio:"ignore"}),i.log.success("git set .githooks done.")}catch(o){i.log.error("Execute [git config core.hooksPath .githooks] failed, please execute the command manually")}}else i.log.error(`source directory ${o} does not exist`)})(),o.includes("customGitCommand")&&(async()=>{const o=r.default.join(__dirname,"..","..","git-local-config"),e=process.cwd(),t=r.default.join(o,".gitattributes"),c=r.default.join(e,".gitattributes");await s.pathExists(t)?await s.copyFileIfMissing(t,c):i.log.error(`source file ${t} does not exist`)})()};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),o=require("fs"),t=require("child_process"),i=require("../utils/index.js"),s=require("./utils.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=c(e),a=c(o);exports.gitHandle=(e=[])=>{e.includes("gitflow")&&(async()=>{const e=r.default.join(__dirname,"..","..","git-local-config"),o=process.cwd(),c=r.default.join(e,".gitscripts"),n=r.default.join(o,".gitscripts");await s.pathExists(c)?(await s.copyDirectoryRecursive(c,n),i.log.success(".gitscripts create done.")):i.log.error(`source directory ${c} does not exist`);const l=[".gitconfig",".commit-type.cjs"];for(const t of l){const c=r.default.join(e,t),a=r.default.join(o,t);await s.pathExists(c)?await s.copyFileIfMissing(c,a):i.log.error(`source file ${c} does not exist`)}try{a.default.chmodSync(r.default.join(n,"random-branch.sh"),493),i.log.success("random-branch.sh Raise power")}catch(e){console.log(e),i.log.error(`Set .githooks/commit-msg executable permission failed: ${e instanceof Error?e.message:e}`)}try{t.execSync("git config --local include.path ../.gitconfig",{stdio:"ignore"}),i.log.success(".gitconfig git set")}catch(e){console.log(e),i.log.error("Execute git config --local include.path ../.gitconfig failed, please execute the command manually")}})(),e.includes("commitSubject")&&(async()=>{const e=r.default.join(__dirname,"..","..","git-local-config",".githooks"),o=process.cwd(),c=r.default.join(o,".githooks");if(await s.pathExists(e)){await s.copyDirectoryRecursive(e,c),i.log.success(".githooks create done.");try{a.default.chmodSync(r.default.join(c,"commit-msg"),493),i.log.success("commit-msg raise power done.")}catch(e){console.log(e),i.log.error(`Set .githooks/commit-msg executable permission failed: ${e instanceof Error?e.message:e}`)}try{t.execSync("git config core.hooksPath .githooks",{stdio:"ignore"}),i.log.success("git set .githooks done.")}catch(e){console.log(e),i.log.error("Execute [git config core.hooksPath .githooks] failed, please execute the command manually")}}else i.log.error(`source directory ${e} does not exist`)})(),e.includes("customGitCommand")&&(async()=>{const e=r.default.join(__dirname,"..","..","git-local-config"),o=process.cwd(),t=r.default.join(e,".gitattributes"),c=r.default.join(o,".gitattributes");await s.pathExists(t)?await s.copyFileIfMissing(t,c):i.log.error(`source file ${t} does not exist`)})()};
package/lib/src/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("../node_modules/commander/esm.mjs.js"),i=require("../package.json.js"),t=require("./build-type/index.js"),a=require("./standard/lint-init.js"),n=require("./git-local-config/index.js"),o=require("../node_modules/inquirer/dist/esm/index.mjs.js");e.program.version(`${i.default.version}`,"-v --version").usage("<command> [options]"),e.program.command("type").description("auto interface").action(()=>{(new t.Main).initialize()}),e.program.command("lint").description("install eslint, prettier, commitlint").action(()=>a.lintHandle()),e.program.command("git").description("config git Local custom command").action(async()=>{const{features:e}=await o.default.prompt([{type:"checkbox",name:"features",message:"Select the required Git features (multi-select):",choices:[{name:"gitflow standard branch creation",value:"gitflow"},{name:"automatically set commit subject",value:"commitSubject"},{name:"custom git command",value:"customGitCommand"}],pageSize:10}]);n.gitHandle(e)}),e.program.parse(process.argv);
1
+ "use strict";var e=require("../node_modules/commander/esm.mjs.js"),i=require("../package.json.js"),t=require("./build-type/index.js"),a=require("./standard/lint-init.js"),n=require("./git-local-config/index.js"),o=require("../node_modules/inquirer/dist/esm/index.mjs.js");e.program.version(`${i.default.version}`,"-v --version").usage("<command> [options]"),e.program.command("type").description("auto interface").action(()=>{(new t.Main).initialize()}),e.program.command("lint").description("install linting tools (eslint, stylelint, prettier, commitlint, vscode)").action(()=>a.lintHandle()),e.program.command("git").description("config git Local custom command").action(async()=>{const{features:e}=await o.default.prompt([{type:"checkbox",name:"features",message:"Select the required Git features (multi-select):",choices:[{name:"gitflow standard branch creation",value:"gitflow"},{name:"automatically set commit subject",value:"commitSubject"},{name:"custom git command",value:"customGitCommand"}],pageSize:10}]);n.gitHandle(e)}),e.program.parse(process.argv);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ADD_COMMIT_MSG="npx husky add .husky/commit-msg 'npx --no-install commitlint --edit \"$1\"'",exports.COMMIT_CONFIG_CONTENT="\nmodule.exports = {\n\textends: ['@commitlint/config-conventional']\n}",exports.COMMIT_VERIFY="npm install --save-dev @commitlint/cli @commitlint/config-conventional",exports.HUSKY_INSTALL="npx husky install",exports.NPM_HUSK="npm install husky --save-dev",exports.Prettier="npm install --save-dev --save-exact prettier eslint-config-prettier",exports.REACT_ESLINT="npm i eslint eslint-plugin-react@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest -D",exports.VUE_ESLINT="npm i eslint-plugin-vue@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest -D";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ADD_COMMIT_MSG="npx husky add .husky/commit-msg 'npx --no-install commitlint --edit \"$1\"'",exports.COMMIT_CONFIG_CONTENT="\nmodule.exports = {\n\textends: ['@commitlint/config-conventional']\n}",exports.COMMIT_VERIFY="npm install --save-dev @commitlint/cli @commitlint/config-conventional",exports.HUSKY_INSTALL="npx husky install",exports.NPM_HUSK="npm install husky --save-dev",exports.Prettier="npm install --save-dev --save-exact prettier eslint-config-prettier",exports.REACT_ESLINT="npm i eslint eslint-plugin-react@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest -D",exports.StyleLint=(t="less")=>`npm i stylelint@^16.0.0 stylelint-${t}@latest stylelint-config-standard@latest stylelint-prettier@^5.0.0 -D`,exports.VUE_ESLINT="npm i eslint-plugin-vue@latest @typescript-eslint/eslint-plugin@latest @typescript-eslint/parser@latest eslint@latest -D";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),s=require("progress-estimator"),t=require("./const.js"),i=require("fs"),o=require("shelljs"),c=require("../utils/index.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=l(s).default({storagePath:e.join(__dirname,".progress-estimator")});exports.commitlintHanlde=async()=>{o.which("git")||(c.log.warning("Sorry, this script requires git"),o.exit(1));const e=new Promise((e,s)=>{try{c.spinner.start("commitlint tools instll..."),o.exec(t.COMMIT_VERIFY,{silent:!0}),c.spinner.success("✨ commitlint instll success!"),e({success:!0})}catch(e){s(e)}}),s=!0,l=new Promise((e,l)=>{try{c.log.load("instll husky..."),o.exec(t.NPM_HUSK,{silent:s}),c.log.success("husk instll done!"),c.log.load("create husky..."),o.exec(t.HUSKY_INSTALL,{silent:s}),c.log.success("husk create done!"),c.log.load("set commit-msg..."),o.exec(t.ADD_COMMIT_MSG,{silent:s}),c.log.success("set commit-msg done!"),c.log.load("create config file..."),i.writeFileSync(`${process.cwd()}/commitlint.config.js`,t.COMMIT_CONFIG_CONTENT),c.log.success("config file write done!"),e({success:!0})}catch(e){c.spinner.error("commitlint instll fail!"),l(e)}});try{await r(e,"install commit lint tools",{estimate:1e4}),await r(l,"commit config file write")}catch(e){console.log("commitlintHanlde=====>",e)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("path"),t=require("progress-estimator"),i=require("./const.js"),s=require("fs"),r=require("shelljs"),n=require("../utils/index.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=o(t).default({storagePath:e.join(__dirname,".progress-estimator")});exports.commitlintHanlde=async()=>{r.which("git")||(n.log.warning("Sorry, this script requires git"),r.exit(1));const e=new Promise((e,t)=>{try{r.exec(i.COMMIT_VERIFY,{silent:!0}),e({success:!0})}catch(e){t(e)}}),t=!0,o=new Promise((e,o)=>{try{r.exec(i.NPM_HUSK,{silent:t}),r.exec(i.HUSKY_INSTALL,{silent:t}),r.exec(i.ADD_COMMIT_MSG,{silent:t}),s.writeFileSync(`${process.cwd()}/commitlint.config.js`,i.COMMIT_CONFIG_CONTENT),e({success:!0})}catch(e){n.spinner.error("Commitlint installation failed!"),o(e)}});try{await c(e,"Install Commitlint",{estimate:1e4}),await c(o,"Setup Commitlint hooks and config")}catch(e){console.log("commitlintHanlde=====>",e)}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),s=require("fs"),r=require("path"),t=require("progress-estimator"),i=require("../utils/index.js"),n=require("./const.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(s);const o=l(t).default({storagePath:r.join(__dirname,".progress-estimator")}),a={env:{browser:!0,es2021:!0},extends:["eslint:recommended","plugin:react/recommended","plugin:@typescript-eslint/recommended","prettier"],overrides:[],parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:"latest",sourceType:"module"},plugins:["react","@typescript-eslint"],rules:{}},p={env:{browser:!0,es2021:!0},extends:["eslint:recommended","plugin:vue/vue3-essential","plugin:@typescript-eslint/recommended","prettier"],overrides:[],parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:"latest",sourceType:"module"},plugins:["vue","@typescript-eslint"],rules:{}};exports.eslintHandle=async s=>{i.spinner.start("start installation...");const r="vue"===s?n.VUE_ESLINT:n.REACT_ESLINT,t="vue"===s?p:a,l=new Promise((s,t)=>{const n=e.exec(r,e=>{e&&i.spinner.error(e.message)});n.stdout?.on("data",()=>{i.spinner.success("✨ eslint instll success!"),s({success:!0})}),n.stderr?.on("data",()=>{i.spinner.error("eslint install fail!"),t({success:!1})})}),u=new Promise((e,s)=>{try{const s=[".eslintrc.js",".prettierrc.js","commitlint.config.js"].join("\n");c.default.writeFileSync(`${process.cwd()}/.eslintignore`,s),c.default.writeFileSync(`${process.cwd()}/.eslintrc.js`,`module.exports = ${JSON.stringify(t,null,2)}`),i.spinner.success("✨ .eslintrc file write success"),e({success:!0})}catch(e){i.spinner.error(".eslintrc file write fail"),s(e)}});try{await o(l,"instll eslint",{estimate:3e4}),await o(u,"write .eslintignore file")}catch(e){console.error("eslintHandle=====>",e)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),r=require("fs"),s=require("path"),t=require("progress-estimator"),i=require("../utils/index.js"),n=require("./const.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(r);const l=o(t).default({storagePath:s.join(__dirname,".progress-estimator")}),a={env:{browser:!0,es2021:!0},extends:["eslint:recommended","plugin:react/recommended","plugin:@typescript-eslint/recommended","prettier"],overrides:[],parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:"latest",sourceType:"module"},plugins:["react","@typescript-eslint"],rules:{}},p={env:{browser:!0,es2021:!0},extends:["eslint:recommended","plugin:vue/vue3-essential","plugin:@typescript-eslint/recommended","prettier"],overrides:[],parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:"latest",sourceType:"module"},plugins:["vue","@typescript-eslint"],rules:{}};exports.eslintHandle=async r=>{const s="vue"===r?n.VUE_ESLINT:n.REACT_ESLINT,t="vue"===r?p:a,o=new Promise((r,t)=>{const n=e.exec(s,e=>{e&&(i.spinner.error(e.message),t(e))});n.stdout?.on("data",()=>{r({success:!0})}),n.stderr?.on("data",()=>{i.spinner.error("ESLint installation failed!"),t({success:!1})})}),u=new Promise((e,r)=>{try{const r=[".eslintrc.js",".prettierrc.js","commitlint.config.js"].join("\n");c.default.writeFileSync(`${process.cwd()}/.eslintignore`,r),c.default.writeFileSync(`${process.cwd()}/.eslintrc.js`,`module.exports = ${JSON.stringify(t,null,2)}`),e({success:!0})}catch(e){i.spinner.error(".eslintrc file creation failed!"),r(e)}});try{await l(o,"Install ESLint",{estimate:3e4}),await l(u,"Create ESLint config files")}catch(e){console.error("eslintHandle=====>",e)}};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("path"),r=require("child_process"),s=require("../utils/index.js"),n=require("./const.js"),i=require("progress-estimator");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e);const a=l(i).default({storagePath:t.join(__dirname,".progress-estimator")});exports.styleLintHandle=async e=>{const t=new Promise((t,i)=>{const l=n.StyleLint(e),o=r.exec(l,e=>{e&&(s.spinner.error(`Stylelint installation failed: ${e.message}`),i(e))});o.stdout?.on("data",function(){t({success:!0})}),o.stderr?.on("data",function(e){s.spinner.error(e),i({success:!1})})}),i=new Promise((t,r)=>{const n=`module.exports = {\n\tplugins: ['stylelint-${e}', 'stylelint-prettier'],\n\textends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],\n\trules: {\n\t\t'prettier/prettier': [true, { singleQuote: true, tabWidth: 2 }],\n\t\t'custom-property-pattern': null,\n\t},\n};`;o.default.writeFile(`${process.cwd()}/.stylelintrc.js`,n,e=>{if(e)return s.spinner.error(`.stylelintrc file creation failed: ${e.message}`),void r(e);t({success:!0})})});try{await a(t,"Install Stylelint",{estimate:1e4}),await a(i,"Create .stylelintrc file")}catch(e){console.error("styleLintHandle======>",e)}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/inquirer/dist/esm/index.mjs.js"),t=require("./install-eslint.js"),r=require("./prettier.js"),i=require("./install-commitlint.js"),a=require("./vscode.js");exports.lintHandle=function(){e.default.prompt([{type:"list",message:"Choose the framework to use",name:"framework",choices:["React","Vue"],filter:e=>e.toLowerCase(),validate:e=>!!e.length||"Choose the framework to use"}]).then(async e=>{await i.commitlintHanlde(),await r.prettierHanlde(),await a.default(),await t.eslintHandle(e.framework)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/inquirer/dist/esm/index.mjs.js"),t=require("chalk"),i=require("./install-eslint.js"),s=require("./prettier.js"),l=require("./install-commitlint.js"),n=require("./vscode.js"),a=require("./install-stylelint.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(t);exports.lintHandle=function(){e.default.prompt([{type:"checkbox",name:"features",message:"Select the linting tools to install (multi-select):",choices:[{name:"ESLint - JavaScript/TypeScript linter",value:"eslint"},{name:"Stylelint - CSS/SCSS/Less linter",value:"stylelint"},{name:"Commitlint - Git commit message linter",value:"commitlint"},{name:"Prettier - Code formatter",value:"prettier"},{name:"VSCode - Editor settings",value:"vscode"}],pageSize:10}]).then(async t=>{const{features:r}=t;if(0===r.length)return void console.log("No tools selected. Exiting...");let c,u;if(r.includes("eslint")){c=(await e.default.prompt([{type:"list",message:"Choose the framework to use:",name:"framework",choices:["React","Vue"],filter:e=>e.toLowerCase()}])).framework}if(r.includes("stylelint")){u=(await e.default.prompt([{type:"list",message:"Choose the CSS preprocessor:",name:"css",choices:["Less","Sass"],filter:e=>e.toLowerCase()}])).css}r.includes("commitlint")&&await l.commitlintHanlde(),r.includes("prettier")&&await s.prettierHanlde(),r.includes("vscode")&&await n.default(),r.includes("eslint")&&c&&await i.eslintHandle(c),r.includes("stylelint")&&u&&await a.styleLintHandle(u),console.log(o.default.green("\n🎉 All selected tools have been installed successfully!\n"))})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),r=require("fs"),t=require("path"),s=require("progress-estimator"),i=require("../utils/index.js"),n=require("./const.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=o(s).default({storagePath:t.join(__dirname,".progress-estimator")});exports.prettierHanlde=async()=>{const s=new Promise((r,t)=>{const s=e.exec(n.Prettier,e=>{e&&i.spinner.error(e.message)});s.stdout?.on("data",function(){i.spinner.success("✨ prettier instll success!"),r({success:!0})}),s.stderr?.on("data",function(e){i.spinner.error(e),t({success:!1})})}),o=new Promise((e,s)=>{try{const s=["module.exports = {","printWidth: 80,","tabWidth: 2,","useTabs: true,","semi: true,","singleQuote: true,",'quoteProps: "as-needed",','trailingComma: "none",',"bracketSpacing: true,",'arrowParens: "always",',"rangeStart: 0,",'proseWrap: "preserve",','htmlWhitespaceSensitivity: "css"',"};"],n=t.join(process.cwd(),".prettierrc.js");r.writeFileSync(n,s.join("\n"),"utf8"),i.spinner.success("✨ .prettierrc write done!"),e({success:!0})}catch(e){i.spinner.error("prettierrc write fail!"),s(e)}});try{await a(s,"install prettier",{estimate:1e4}),await a(o,"write .prettierrc file")}catch(e){console.error("prettierHanlde======>",e)}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("child_process"),r=require("fs"),t=require("path"),s=require("progress-estimator"),i=require("../utils/index.js"),n=require("./const.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=a(s).default({storagePath:t.join(__dirname,".progress-estimator")});exports.prettierHanlde=async()=>{const s=new Promise((r,t)=>{const s=e.exec(n.Prettier,e=>{e&&(i.spinner.error(e.message),t(e))});s.stdout?.on("data",function(){r({success:!0})}),s.stderr?.on("data",function(e){i.spinner.error(e),t({success:!1})})}),a=new Promise((e,s)=>{try{const s=["module.exports = {","printWidth: 80,","tabWidth: 2,","useTabs: true,","semi: true,","singleQuote: true,",'quoteProps: "as-needed",','trailingComma: "none",',"bracketSpacing: true,",'arrowParens: "always",',"rangeStart: 0,",'proseWrap: "preserve",','htmlWhitespaceSensitivity: "css"',"};"],i=t.join(process.cwd(),".prettierrc.js");r.writeFileSync(i,s.join("\n"),"utf8"),e({success:!0})}catch(e){i.spinner.error(".prettierrc file write failed!"),s(e)}});try{await o(s,"Install Prettier",{estimate:1e4}),await o(a,"Create .prettierrc file")}catch(e){console.error("prettierHanlde======>",e)}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js");const s={"editor.formatOnSave":!0,"[javascript]":{"editor.defaultFormatter":"vscode.typescript-language-features"},"[typescript]":{"editor.defaultFormatter":"esbenp.prettier-vscode"},"[json]":{"editor.quickSuggestions":{strings:!0},"editor.suggest.insertMode":"replace","gitlens.codeLens.scopes":["document"],"editor.defaultFormatter":"esbenp.prettier-vscode"}};exports.default=async()=>{const r=`${process.cwd()}/.vscode/settings.json`;if(e.existsSync(r)){const t=e.readFileSync(r,"utf-8"),s=JSON.parse(t);s["editor.formatOnSave"]=!0,s["editor.defaultFormatter"]="esbenp.prettier-vscode";const i=JSON.stringify(s,null,"\t");e.writeFileSync(r,i)}else{const r=`${process.cwd()}/.vscode`;try{e.mkdirSync(r),e.writeFileSync(`${r}/settings.json`,JSON.stringify(s,null,"\t")),t.spinner.success(" .vscode/settings.json file write success")}catch(e){t.spinner.error(".vscode/settings.json file write fail"),console.error(e)}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),t=require("../utils/index.js");const s={"editor.formatOnSave":!0,"[javascript]":{"editor.defaultFormatter":"vscode.typescript-language-features"},"[typescript]":{"editor.defaultFormatter":"esbenp.prettier-vscode"},"[json]":{"editor.quickSuggestions":{strings:!0},"editor.suggest.insertMode":"replace","gitlens.codeLens.scopes":["document"],"editor.defaultFormatter":"esbenp.prettier-vscode"}};exports.default=async()=>{const r=`${process.cwd()}/.vscode/settings.json`;try{if(e.existsSync(r)){const s=e.readFileSync(r,"utf-8"),i=JSON.parse(s);i["editor.formatOnSave"]=!0,i["editor.defaultFormatter"]="esbenp.prettier-vscode";const o=JSON.stringify(i,null,"\t");e.writeFileSync(r,o),t.spinner.success("VSCode settings updated!")}else{const r=`${process.cwd()}/.vscode`;e.mkdirSync(r),e.writeFileSync(`${r}/settings.json`,JSON.stringify(s,null,"\t")),t.spinner.success("VSCode settings file created!")}}catch(e){t.spinner.error("VSCode settings file creation failed!"),console.error(e)}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anl",
3
- "version": "1.7.7",
3
+ "version": "25.10.13",
4
4
  "description": "FE command line tool",
5
5
  "main": "bin/an-cli.js",
6
6
  "scripts": {
@@ -53,12 +53,29 @@
53
53
  "shelljs": "^0.8.5"
54
54
  },
55
55
  "keywords": [
56
- "typescript",
57
56
  "cli",
58
- "typescript 脚手架",
59
- "ts 脚手架",
60
- "ts-cli",
61
- "脚手架"
57
+ "command-line",
58
+ "frontend",
59
+ "typescript",
60
+ "type-generation",
61
+ "code-generator",
62
+ "swagger",
63
+ "openapi",
64
+ "api",
65
+ "rest-api",
66
+ "eslint",
67
+ "stylelint",
68
+ "prettier",
69
+ "commitlint",
70
+ "linter",
71
+ "formatter",
72
+ "react",
73
+ "vue",
74
+ "git",
75
+ "gitflow",
76
+ "developer-tools",
77
+ "automation",
78
+ "scaffolding"
62
79
  ],
63
80
  "files": [
64
81
  "package.json",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="3.0.0",t={"/api/games":{post:{operationId:"GameController_createGame",summary:"创建新的游戏",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameDTO"}}}},responses:{200:{description:"返回游戏列表",content:{"application/json":{schema:{$ref:"#/components/schemas/CreateGameRspVo"}}}}},tags:["游戏"]},get:{operationId:"GameController_getGameList",summary:"游戏列表",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/GameVO"}}}}}},tags:["游戏"]}},"/api/games/{gameId}/config":{get:{operationId:"GameController_getGameConfig",summary:"获取游戏配置信息",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/GameVO"}}}}},tags:["游戏"]}},"/api/games/{gameId}":{patch:{operationId:"GameController_rename",summary:"游戏名称重命名",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RenameDto"}}}},responses:{200:{description:"Successfully"}},tags:["游戏"]},delete:{operationId:"GameController_deleteFileOrDir",summary:"删除游戏",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully"}},tags:["游戏"]}},"/api/games/{gameId}/sync":{get:{operationId:"GameController_getGameChapterSync",summary:"游戏发布到商城",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/GameChapterSyncVO"}}}}},tags:["游戏"]},post:{operationId:"GameController_pushGameChapterSync",summary:"游戏发布到商城",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"节点信息",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}},responses:{201:{description:""}},tags:["游戏"]}},"/api/engine/config":{get:{operationId:"EngineController_getGameConfig",summary:"获取游戏配置信息",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"返回游戏配置",content:{"application/json":{schema:{$ref:"#/components/schemas/GameConfigVo"}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/resource":{get:{operationId:"EngineController_getGameResourceRouters",summary:"游戏资源路由列表",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/GameResourceRouterVo"}}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/start":{get:{operationId:"EngineController_getStartTxt",summary:"获取游戏入口启动文件",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"成功返回纯文本",content:{"text/plain":{schema:{type:"string",example:"start.txt内容"}}}}},tags:["游戏引擎侧接口"]}},"/api/engine/progress":{get:{operationId:"EngineController_getProgress",summary:"获取用户作品阅读进度",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["游戏引擎侧接口"]},post:{operationId:"EngineController_saveProgress",summary:"保存用户作品阅读进度",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SaveProgressDTO"}}}},responses:{200:{description:""}},tags:["游戏引擎侧接口"]}},"/api/engine/setting":{get:{operationId:"EngineController_getSetting",summary:"获取用户配置信息",parameters:[{name:"gameId",required:!0,in:"query",description:"游戏ID",schema:{type:"string"}}],responses:{200:{description:""}},tags:["游戏引擎侧接口"]},post:{operationId:"EngineController_saveSetting",summary:"保存用户配置信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/SaveUserSettingDTO"}}}},responses:{200:{description:""}},tags:["游戏引擎侧接口"]}},"/api/llm/{schema}/{type}/{id}/txt/v2":{get:{operationId:"LlmController_txtV2",summary:"Maas文生文",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},400:{description:"Failed."}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/features":{get:{operationId:"LlmController_recommendFeatures",summary:"推荐角色人格",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/role/union":{get:{operationId:"LlmController_recommends",summary:"推荐角色信息",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/RecommendRoleDTO"}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{bgid}/category":{get:{operationId:"LlmController_recommendCategory",summary:"推荐背景分类",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"bgid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/recommend/{schema}/{rid}/timbre":{get:{operationId:"LlmController_recommendTimbre",summary:"推荐音色",parameters:[{name:"schema",required:!0,in:"path",schema:{type:"string"}},{name:"rid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["LLM"]}},"/api/llm/image/upload":{post:{operationId:"LlmController_imageUpload",summary:"大模型图片上传接口",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ImageUploadDto"}}}},responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["LLM"]}},"/api/llm/upload/text":{post:{operationId:"LlmController_uploadText",summary:"上传文本文件返回文本信息",parameters:[],responses:{201:{description:""}},tags:["LLM"]}},"/api/llm/extract/file":{post:{operationId:"LlmController_extractFile",summary:"提取文件内容",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/ExtractFileDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/task":{get:{operationId:"LlmController_extractTask",summary:"获取AI提取任务",parameters:[],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchExtraction"}}}}},tags:["LLM"]}},"/api/llm/extract/{id}/destroy":{delete:{operationId:"LlmController_extractDestroy",summary:"删除AI提取任务",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/add":{post:{operationId:"LlmController_extractAddRole",summary:"添加角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/update":{put:{operationId:"LlmController_extractUpdateRole",summary:"更新角色",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:""},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/role/{id}/del":{delete:{operationId:"LlmController_extractDelRole",summary:"删除角色",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/add":{post:{operationId:"LlmController_extractAddBg",summary:"添加背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/update":{put:{operationId:"LlmController_extractUpdateBg",summary:"更新背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:""},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/bg/{id}/del":{delete:{operationId:"LlmController_extractDelBg",summary:"删除背景",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}},{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchUpdate":{put:{operationId:"LlmController_extractBatchUpdate",summary:"批量更新角色和背景",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchUpdateRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchValidRoleBgSensitiveWordsDTO"}}}}},tags:["LLM"]}},"/api/llm/extract/{batchId}/batchConfirm":{post:{operationId:"LlmController_extractBatchConfirm",summary:"批量确认保存",parameters:[{name:"batchId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/BatchBgRoleReqDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchConfirmRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BatchValidRoleBgSensitiveWordsDTO"}}}}},tags:["LLM"]}},"/api/role/role":{post:{operationId:"RoleController_createRole",summary:"保存角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Role"]}},"/api/role/list":{post:{operationId:"RoleController_listRole",summary:"获取该用户下角色列表",parameters:[],requestBody:{required:!0,description:"获取该用户下角色列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindRoleDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}}},tags:["Role"]}},"/api/role/update":{put:{operationId:"RoleController_updateRole",summary:"更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateRoleDto"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Role"]}},"/api/role/batchUpdate":{put:{operationId:"RoleController_batchUpdateRole",summary:"批量更新角色",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["Role"]}},"/api/role/{rid}":{delete:{operationId:"RoleController_deletedRole",summary:"删除角色",parameters:[{name:"rid",required:!0,in:"path",description:"角色ID",schema:{type:"string"}}],responses:{200:{description:"Successfully."},501:{description:"Failed."}},tags:["Role"]}},"/api/resource":{post:{operationId:"ResourceController_create",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CreateResourceDto"}}}},responses:{201:{description:""}},tags:["Resource"]}},"/api/resource/{id}":{get:{operationId:"ResourceController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]},patch:{operationId:"ResourceController_update",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateResourceDto"}}}},responses:{200:{description:""}},tags:["Resource"]},delete:{operationId:"ResourceController_remove",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Resource"]}},"/api/bg/add":{post:{operationId:"BgController_createBg",summary:"保存背景信息",parameters:[],requestBody:{required:!0,description:"保存背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/api/bg/list":{post:{operationId:"BgController_list",summary:"获取背景信息列表",parameters:[],requestBody:{required:!0,description:"获取背景信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindBgDto"}}}},responses:{200:{description:"Successfully."}},tags:["背景"]}},"/api/bg/update":{put:{operationId:"BgController_updateBg",summary:"更新背景信息",parameters:[],requestBody:{required:!0,description:"更新背景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateBgDto"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/api/bg/batchUpdate":{put:{operationId:"BgController_batchUpdateBg",summary:"批量更新背景信息",parameters:[],requestBody:{required:!0,description:"批量更新背景信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["背景"]}},"/api/bg/remove/{bid}":{delete:{operationId:"BgController_remove",summary:"删除背景信息",parameters:[{name:"bid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["背景"]}},"/api/bgm/{category}/table":{get:{operationId:"BgmController_table",summary:"获取音乐库数据",parameters:[{name:"category",required:!0,in:"path",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/BgmTableDto"}}}}},tags:["Bgm"]}},"/api/bgm/all":{get:{operationId:"BgmController_all",summary:"获取音乐搜索列表",parameters:[],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}}}}},tags:["Bgm"]}},"/api/bgm/link/scene":{post:{operationId:"BgmController_linkScene",summary:"音乐裁剪",parameters:[],requestBody:{required:!0,description:"音乐裁剪",content:{"application/json":{schema:{$ref:"#/components/schemas/AudioCutDto"}}}},responses:{200:{description:"Successfully."}},tags:["Bgm"]}},"/api/bgm/excelConvertDb":{post:{operationId:"BgmController_excelConvertDb",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/bgm/clearBgm":{post:{operationId:"BgmController_clearBgm",parameters:[],responses:{201:{description:""}},tags:["Bgm"]}},"/api/dict/{type}/{name}":{get:{operationId:"DictController_create",summary:"添加字典数据",parameters:[{name:"type",required:!0,in:"path",schema:{type:"string"}},{name:"name",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Dict"]}},"/api/dict/list":{get:{operationId:"DictController_findAll",summary:"字典列表",parameters:[],responses:{200:{description:""}},tags:["Dict"]}},"/api/editor/scene":{post:{operationId:"EditorController_getSceneDetail",summary:"查询场景详情内容",parameters:[],requestBody:{required:!0,description:"查询场景详情内容",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/dialogue":{put:{operationId:"EditorController_editSceneDialogue",summary:"更新编辑器对话资源",parameters:[],requestBody:{required:!0,description:"更新编辑器对话资源",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/uiScene/resource":{put:{operationId:"EditorController_editUiSceneResource",summary:"更新UI编辑器场景资源",parameters:[],requestBody:{required:!0,description:"更新UI编辑器场景资源",content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateUiResourceDto"}}}},responses:{200:{description:"Successfully."}},tags:["Editor"]}},"/api/editor/scene/upload":{post:{operationId:"EditorController_uploadSceneDialogue",summary:"上传文本更新对话资源",parameters:[],requestBody:{required:!0,content:{"multipart/form-data":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDetailRsp"}}}}},tags:["Editor"]}},"/api/editor/scene/command/{lineId}":{post:{operationId:"EditorController_applyCommandLine",summary:"根据行ID获取指令行",parameters:[{name:"lineId",required:!0,in:"path",description:"行ID",schema:{type:"string"}}],requestBody:{required:!0,description:"场景信息",content:{"application/json":{schema:{$ref:"#/components/schemas/SceneDto"}}}},responses:{200:{description:"Successfully."}},tags:["Editor"]}},"/api/editor/check":{post:{operationId:"EditorController_checkContentSensitiveWords",summary:"敏感词校验",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/CheckContentSensitiveWordsReq"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CheckContentSensitiveWordsDTO"}}}}}},tags:["Editor"]}},"/api/vocal/binding":{post:{operationId:"VocalController_binding",summary:"配音绑定",parameters:[],requestBody:{required:!0,description:"配音绑定",content:{"application/json":{schema:{$ref:"#/components/schemas/VocalBindingDto"}}}},responses:{201:{description:""}},tags:["配音"]}},"/api/vocal/record/{event}/{reqId}":{get:{operationId:"VocalController_record",summary:"获取配音结果",parameters:[{name:"event",required:!0,in:"path",schema:{type:"string"}},{name:"reqId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["配音"]}},"/api/vocal/ready/{sceneid}":{get:{operationId:"VocalController_getReadyVocalList",summary:"获取准备配音的列表",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}}},tags:["配音"]}},"/api/vocal/start/{sceneid}":{post:{operationId:"VocalController_startVocalList",summary:"开始批量配音任务",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要配音的数据",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalReadyDTO"}}}}},responses:{201:{description:""}},tags:["配音"]}},"/api/vocal/batch/{sceneid}":{get:{operationId:"VocalController_getBatchVocal",summary:"获取正在配音列表",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchGenerateVocal"}}}}}},tags:["配音"]},post:{operationId:"VocalController_saveBatchVocal",summary:"保存配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["配音"]}},"/api/vocal/retry/{sceneid}":{put:{operationId:"VocalController_retryBatchVocal",summary:"重试单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"需要重试的配音",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}}}},responses:{200:{description:""}},tags:["配音"]}},"/api/vocal/batch/{sceneid}/{lineId}":{delete:{operationId:"VocalController_deleteLineVocalForBatchVocal",summary:"删除单条配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}},{name:"lineId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["配音"]}},"/api/vocal/cancel/{sceneid}":{post:{operationId:"VocalController_cancelBatchVocal",summary:"取消配音",parameters:[{name:"sceneid",required:!0,in:"path",schema:{type:"string"}}],responses:{201:{description:""}},tags:["配音"]}},"/api/chapter/{gameId}/chapter":{post:{operationId:"GameChapterController_addChapter",summary:"新增章节",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"新增章节",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/stories":{post:{operationId:"GameChapterController_addStories",summary:"新增故事线",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"新增故事线",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]},put:{operationId:"GameChapterController_updateStories",summary:"更新故事线",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"更新故事线",content:{"application/json":{schema:{$ref:"#/components/schemas/AddChapterCanvasDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}/rename":{patch:{operationId:"GameChapterController_renameChapter",summary:"章节重命名",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,description:"章节重命名",content:{"application/json":{schema:{$ref:"#/components/schemas/RenameChapterDTO"}}}},responses:{200:{description:""}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}":{delete:{operationId:"GameChapterController_deleteChapter",summary:"删除章节",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}/{chapterId}/check":{get:{operationId:"GameChapterController_check",summary:"检查章节操作",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CheckChapterRspDTO"}}}}},tags:["Chapter"]}},"/api/chapter/{gameId}":{get:{operationId:"GameChapterController_getChapterDetail",summary:"获取章节详情",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ChapterCanvasRspDTO"}}}}},tags:["Chapter"]}},"/api/variable/global/record":{post:{operationId:"VariableController_recordVariable",summary:"记录变量信息",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/UpdateVariableDto"}}}},responses:{default:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ResultData"}}}}},tags:["Variable"]}},"/api/variable/global/{gameId}/list":{get:{operationId:"VariableController_varList",summary:"获取游戏变量信息列表",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/variable/{id}":{get:{operationId:"VariableController_findOne",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Variable"]}},"/api/variable/global/{id}/remove":{delete:{operationId:"VariableController_remove",summary:"删除变量信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."},500:{description:"Failed."}},tags:["Variable"]}},"/api/prop/add":{post:{operationId:"PropController_createProp",summary:"保存道具信息",parameters:[],requestBody:{required:!0,description:"保存道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Prop"]}},"/api/prop/list":{post:{operationId:"PropController_list",summary:"获取道具信息列表",parameters:[],requestBody:{required:!0,description:"获取道具信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindPropDto"}}}},responses:{200:{description:"Successfully."}},tags:["Prop"]}},"/api/prop/update":{put:{operationId:"PropController_updateProp",summary:"更新道具信息",parameters:[],requestBody:{required:!0,description:"更新道具信息",content:{"application/json":{schema:{$ref:"#/components/schemas/PropDto"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Prop"]}},"/api/prop/batchUpdate":{put:{operationId:"PropController_batchUpdateProp",summary:"批量更新道具信息",parameters:[],requestBody:{required:!0,description:"批量更新道具信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PropDto"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["Prop"]}},"/api/prop/remove/{id}":{delete:{operationId:"PropController_remove",summary:"删除道具信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Prop"]}},"/api/cg/add":{post:{operationId:"CgController_createCg",summary:"保存Cg信息",parameters:[],requestBody:{required:!0,description:"保存Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/IDRspDto"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Cg"]}},"/api/cg/list":{post:{operationId:"CgController_list",summary:"获取Cg信息列表",parameters:[],requestBody:{required:!0,description:"获取Cg信息列表",content:{"application/json":{schema:{$ref:"#/components/schemas/FindCgDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}}},tags:["Cg"]}},"/api/cg/update":{put:{operationId:"CgController_updateCg",summary:"更新Cg信息",parameters:[],requestBody:{required:!0,description:"更新Cg信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CgDto"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["Cg"]}},"/api/cg/batchUpdate":{put:{operationId:"CgController_batchUpdateCg",summary:"批量更新Cg信息",parameters:[],requestBody:{required:!0,description:"批量更新Cg信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CgDto"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["Cg"]}},"/api/cg/remove/{id}":{delete:{operationId:"CgController_remove",summary:"删除Cg信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cg"]}},"/api/covers":{post:{operationId:"CoverController_createCover",summary:"创建封面信息",parameters:[],requestBody:{required:!0,description:"保存封面信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CoverDTO"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"string"}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]},get:{operationId:"CoverController_list",summary:"获取封面信息列表",parameters:[{name:"gameId",required:!0,in:"query",description:"当前游戏ID",schema:{type:"string"}},{name:"name",required:!1,in:"query",description:"封面名称",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverVO"}}}}}},tags:["游戏封面"]},put:{operationId:"CoverController_updateCover",summary:"更新封面信息",parameters:[],requestBody:{required:!0,description:"更新封面信息",content:{"application/json":{schema:{$ref:"#/components/schemas/CoverDTO"}}}},responses:{200:{description:"Successfully."},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]}},"/api/covers/batch":{put:{operationId:"CoverController_batchUpdateCover",summary:"批量更新封面信息",parameters:[],requestBody:{required:!0,description:"批量更新封面信息",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverDTO"}}}}},responses:{200:{description:"Successfully.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CoverDTO"}}}}},4030:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}}}}},tags:["游戏封面"]}},"/api/covers/{id}":{delete:{operationId:"CoverController_remove",summary:"删除封面信息",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:""}},tags:["游戏封面"]}},"/api/covers/upload":{post:{operationId:"CoverController_uploadStream",summary:"上传游戏封面",parameters:[],requestBody:{required:!0,description:"游戏名",content:{"multipart/form-data":{schema:{$ref:"#/components/schemas/CoverGameDTO"}}}},responses:{201:{description:""}},tags:["游戏封面"]}},"/api/covers/apply/cg":{post:{operationId:"CoverController_chooseCgImg",summary:"选择CG图片",parameters:[],requestBody:{required:!0,description:"使用CG图片",content:{"application/json":{schema:{$ref:"#/components/schemas/CgToCoverDTO"}}}},responses:{201:{description:""}},tags:["游戏封面"]}},"/api/covers/{gameId}/cover/{cid}":{post:{operationId:"CoverController_applyCover",summary:"设置封面",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"cid",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"Successfully."}},tags:["游戏封面"]}},"/api/effect/list":{get:{operationId:"EffectController_list",summary:"获取音效列表",parameters:[{name:"style",required:!1,in:"query",description:"游戏风格",schema:{type:"string"}}],responses:{default:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}}}}},tags:["音效"]}},"/api/effect/cache/clear":{post:{operationId:"EffectController_refresh",parameters:[{name:"secret",required:!1,in:"query",description:"secret",schema:{type:"string"}}],responses:{201:{description:""}},tags:["音效"]}},"/api/canvas/scene/add":{post:{operationId:"CanvasController_addScenes",summary:"创建场景",parameters:[],requestBody:{required:!0,description:"请求体",content:{"application/json":{schema:{$ref:"#/components/schemas/AddSceneDto"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{type:"string"}}}}}},tags:["Canvas"]}},"/api/canvas/record":{post:{operationId:"CanvasController_record",summary:"记录画布数据",parameters:[],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/RecordCanvasDto"}}}},responses:{200:{description:""},500:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/ValidateCanvas"}}}}},tags:["Canvas"]}},"/api/canvas/{gameId}/{chapterId}/view":{get:{operationId:"CanvasController_view",summary:"获取最新的画布节点数据",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasView"}}}}},tags:["Canvas"]}},"/api/canvas/{gameId}/{chapterId}/revise/history":{get:{operationId:"CanvasController_history",summary:"获取历史修订列表",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/CanvasHistory"}}}}}},tags:["Canvas"]}},"/api/canvas/{id}/revise/detail":{get:{operationId:"CanvasController_detail",summary:"获取指定修订详情",parameters:[{name:"id",required:!0,in:"path",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/CanvasBody"}}}}},tags:["Canvas"]}},"/api/canvas/{gameId}/{chapterId}/node/preview":{post:{operationId:"CanvasController_nodePreview",summary:"节点预览",parameters:[{name:"gameId",required:!0,in:"path",schema:{type:"string"}},{name:"chapterId",required:!0,in:"path",schema:{type:"string"}}],requestBody:{required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Node"}}}},responses:{200:{description:"",content:{"application/json":{schema:{type:"string"}}}}},tags:["Canvas"]}},"/api/user/oauth2/login":{post:{operationId:"UserController_oauthLogin",summary:"用户oauth2登录",parameters:[{name:"code",required:!0,in:"query",description:"认证code",schema:{type:"string"}}],responses:{200:{description:"",content:{"application/json":{schema:{$ref:"#/components/schemas/UserVO"}}}}},tags:["用户模块"]}},"/api/user/logout":{put:{operationId:"UserController_logout",summary:"退出登录",parameters:[],responses:{200:{description:""}},tags:["用户模块"]}},"/api/user/check/login":{get:{operationId:"UserController_loginCheck",summary:"oauth2登录检查",parameters:[],responses:{200:{description:""}},tags:["用户模块"]}},"/api/cron/analyseUserEdit":{get:{operationId:"CronController_analyseUserEditTask",parameters:[{name:"secret",required:!0,in:"query",schema:{type:"string"}},{name:"date",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cron"]}},"/api/cron/userEditCollect":{get:{operationId:"CronController_userEditCollectTask",parameters:[{name:"secret",required:!0,in:"query",schema:{type:"string"}},{name:"months",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Cron"]}},"/api/sensitive/test":{get:{operationId:"SensitiveWordsController_test",parameters:[{name:"content",required:!0,in:"query",schema:{type:"string"}}],responses:{200:{description:""}},tags:["Sensitive"]}}},r={title:"万色星辰 API",description:"万色星辰编辑器接口",version:"5.0",contact:{}},s=[],o=[],i={schemas:{CompletionDto:{type:"object",properties:{editorValue:{type:"string",description:"Editor input value for which the completion is required"},sceneType:{type:"string",description:"scene file type en or zh"},params:{type:"object",description:"Parameters required for completion"}},required:["editorValue","sceneType","params"]},GameStyleEnum:{type:"string",description:"游戏风格",enum:["solvePuzzles","otome","watercolor"]},EditorTypeEnum:{type:"string",description:"编辑器类型",enum:["ui","txt"]},CreateGameDTO:{type:"object",properties:{name:{type:"string",description:"游戏名称"},style:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"}},required:["name","style","editorType"]},GameVO:{type:"object",properties:{id:{type:"string",description:"游戏id"},name:{type:"string",description:"游戏名称"},editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},gameStyle:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},cover:{type:"string"},bgm:{type:"string"},logo:{type:"string"},startChapterId:{type:"string"},startSceneId:{type:"string"}},required:["id","name","editorType","gameStyle","cover","bgm","logo","startChapterId","startSceneId"]},ProgressStatusEnum:{type:"string",description:"进度状态",enum:["0","1","2","3"]},Progress:{type:"object",properties:{current:{type:"number",description:"进度"},status:{example:'{"INIT":"0","ING":"1","DONE":"2","ERR":"3"}',$ref:"#/components/schemas/ProgressStatusEnum"},msg:{type:"string",description:"生成信息"}},required:["current","status","msg"]},ImageStyleEnum:{type:"string",description:"道具风格",enum:["anime","romantic","watercolor"]},Picture:{type:"object",properties:{url:{type:"string",description:"图片地址"},check:{type:"boolean",description:"是否选中"}},required:["url","check"]},BgGenerateStageEnum:{type:"string",description:"生成阶段",enum:["prompts","bg"]},UpdateBgDto:{type:"object",properties:{id:{type:"string",description:"背景ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"背景名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},original:{type:"string",description:"原文(背景描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"背景图片"},list:{description:"背景图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},word:{type:"string",description:"背景正向提示词"},tlmId:{type:"string",description:"背景对应大模型输出ID"},category:{description:"背景分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},stage:{example:'{"PROMPTS":"prompts","BG":"bg"}',$ref:"#/components/schemas/BgGenerateStageEnum"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","url","list","word","tlmId","category","stage","progress"]},BatchBg:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},list:{description:"背景数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}}},required:["progress","list"]},Frame:{type:"object",properties:{eyesHalfOpen:{type:"string",description:"半闭眼"},eyesClose:{type:"string",description:"闭眼"},mouthHalfOpen:{type:"string",description:"半张嘴"},mouthOpen:{type:"string",description:"张嘴"},mainFigure:{type:"string",description:"正常图"}},required:["eyesHalfOpen","eyesClose","mouthHalfOpen","mouthOpen","mainFigure"]},Category:{type:"object",properties:{categoryValue:{type:"string",description:"表情差分类别值(一级)"},categoryLabel:{type:"string",description:"表情差分类别标签(一级)"},value:{type:"string",description:"表情差分值(二级)"},label:{type:"string",description:"表情差分标签(二级)"}},required:["categoryValue","categoryLabel","value","label"]},Expression:{type:"object",properties:{url:{type:"string",description:"差分图片"},list:{description:"表情变体图",type:"array",items:{$ref:"#/components/schemas/Picture"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},category:{description:"差分类别",allOf:[{$ref:"#/components/schemas/Category"}]},applyGame:{description:"序列帧应用游戏列表",type:"array",items:{type:"string"}}},required:["url","list","frame","category","applyGame"]},GenderEnum:{type:"string",description:"角色性别",enum:["male","female","nonhuman"]},AgeEnum:{type:"string",description:"年纪",enum:["child","teenager","youth","adult","elder"]},RoleGenerateStageEnum:{type:"string",description:"生成阶段",enum:["prompts","figure","expression","frame"]},UpdateRoleDto:{type:"object",properties:{uid:{type:"string",description:"用户ID"},id:{type:"string",description:"角色ID"},name:{type:"string",description:"角色名字"},unrestricted:{type:"boolean",description:"自由画风开关"},timbre:{type:"string",description:"音色"},original:{type:"string",description:"原文(角色描述)"},url:{type:"string",description:"主立绘图片"},list:{description:"备选角色变体",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"角色对应的大模型信息ID"},feature:{type:"string",description:"人格"},word:{type:"string",description:"角色正向提示词"},prompts:{type:"string",description:"提示词(修饰词)"},expressions:{description:"表情差分图",type:"array",items:{$ref:"#/components/schemas/Expression"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},gender:{example:'{"MALE":"male","FEMALE":"female","NONHUMAN":"nonhuman"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},age:{example:'{"CHILD":"child","TEENAGER":"teenager","YOUNG":"youth","ADULT":"adult","ELDER":"elder"}',$ref:"#/components/schemas/AgeEnum"},stage:{example:'{"PROMPTS":"prompts","FIGURE":"figure","EXPRESSION":"expression","FRAME":"frame"}',$ref:"#/components/schemas/RoleGenerateStageEnum"}},required:["uid","id","name","unrestricted","timbre","original","url","list","tlmId","feature","word","prompts","expressions","progress","gender","style","age","stage"]},BatchRole:{type:"object",properties:{list:{description:"角色数据列表",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["list","progress"]},Title:{type:"object",properties:{column:{type:"string",description:"列标签"},name:{type:"string",description:"列名称"}},required:["column","name"]},BatchBgm:{type:"object",properties:{progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},title:{description:"音乐表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{type:"object",description:"音乐数据"},more:{type:"object",description:"More"}},required:["progress","title","stock","more"]},ExtractTypeEnum:{type:"string",description:"批处理类型",enum:["extract","picture"]},BatchExtraction:{type:"object",properties:{bg:{description:"背景数据",allOf:[{$ref:"#/components/schemas/BatchBg"}]},role:{description:"角色数据",allOf:[{$ref:"#/components/schemas/BatchRole"}]},bgm:{description:"BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]},id:{type:"string",description:"批量提取ID"},uid:{type:"string",description:"用户ID"},gameId:{type:"string",description:"游戏ID"},type:{example:'{"EXTRACT":"extract","PICTURE":"picture"}',$ref:"#/components/schemas/ExtractTypeEnum"}},required:["bg","role","bgm","progress","id","uid","gameId","type"]},CreateGameRspVo:{type:"object",properties:{list:{description:"游戏列表",type:"array",items:{$ref:"#/components/schemas/GameVO"}},batch:{description:"批量提取任务",allOf:[{$ref:"#/components/schemas/BatchExtraction"}]}},required:["list","batch"]},RenameDto:{type:"object",properties:{newName:{type:"string",description:"新游戏名称"}},required:["newName"]},ChapterNodeTypeEnum:{type:"string",description:"类型",enum:["chapter","start"]},ChapterNodeData:{type:"object",properties:{label:{type:"string",description:"章节名称"},startSceneId:{type:"string",description:"开始节点"},isPublish:{type:"boolean",description:"是否已发布",default:!1,example:!1},isRead:{type:"boolean",description:"是否已读",default:!1,example:!1},isBuy:{type:"boolean",description:"是否已购买",default:!1,example:!1},isHide:{type:"boolean",description:"是否隐藏",default:!1,example:!1}},required:["label","startSceneId"]},ChapterNode:{type:"object",properties:{id:{type:"string",description:"章节id"},type:{example:'{"chapter":"chapter","start":"start"}',$ref:"#/components/schemas/ChapterNodeTypeEnum"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/ChapterNodeData"}]}},required:["id","type","data"]},ChapterEdgeData:{type:"object",properties:{label:{type:"string",description:"标题, 对应source章节中结束节点标题"},endSceneId:{type:"string",description:"结束场景ID, 对应source章节中结束场景节点ID"}},required:["label","endSceneId"]},ChapterEdge:{type:"object",properties:{id:{type:"string",description:"线ID"},source:{type:"string",description:"起点章节 ID"},target:{type:"string",description:"终点章节 ID"},data:{$ref:"#/components/schemas/ChapterEdgeData"}},required:["id","source","target","data"]},GameChapterSyncVO:{type:"object",properties:{uid:{type:"string",description:"用户ID"},gameId:{type:"string",description:"游戏ID"},gameName:{type:"string",description:"游戏名"},nodes:{description:"章节节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"章节连线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}}},required:["uid","gameId","gameName","nodes","edges"]},GameConfigVo:{type:"object",properties:{gameId:{type:"string",description:"游戏id"},gameName:{type:"string",description:"游戏名称"},gameStyle:{example:'{"SolvePuzzles":"solvePuzzles","Otome":"otome","Watercolor":"watercolor"}',$ref:"#/components/schemas/GameStyleEnum"},gameCover:{type:"string"},gameBgm:{type:"string"},gameLogo:{type:"string"}},required:["gameId","gameName","gameStyle","gameCover","gameBgm","gameLogo"]},GameResourceRouterVo:{type:"object",properties:{key:{type:"string",description:"资源 key"},url:{type:"string",description:"资源 url"}},required:["key","url"]},StoryLine:{type:"object",properties:{id:{type:"string",description:"故事线id"},name:{type:"string",description:"故事线名称"},desc:{type:"string",description:"故事线描述"},isMain:{type:"boolean",description:"是否为主线",default:!1,example:!1},edgeIds:{description:"故事线所经过的线ID",type:"array",items:{type:"string"}},chapterIds:{description:"故事线所经过的章节ID",type:"array",items:{type:"string"}},color:{type:"string",description:"故事线的颜色值"}},required:["id","name","desc","edgeIds","chapterIds","color"]},ChapterCanvasRspDTO:{type:"object",properties:{nodes:{description:"节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}},stories:{description:"故事线",type:"array",items:{$ref:"#/components/schemas/StoryLine"}}},required:["nodes","edges","stories"]},SaveProgressDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"}},required:["gameId","chapterId"]},SaveUserSettingDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},data:{type:"object",description:"保存 JSON 数据"}},required:["gameId","data"]},RecommendRoleDTO:{type:"object",properties:{features:{description:"推荐人格",type:"array",items:{type:"string"}},timbre:{type:"string",description:"推荐音色"}},required:["features","timbre"]},ImageUploadDto:{type:"object",properties:{category:{type:"string",description:"图片类别"},original:{type:"string",description:"蒙版对应原始图片名称"}},required:["category","original"]},ExtractFileDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"}},required:["gameId"]},IDRspDto:{type:"object",properties:{id:{type:"string",description:"ID"}},required:["id"]},ValidSensitiveWordsDTO:{type:"object",properties:{field:{type:"string",description:"敏感字段"},word:{type:"string",description:"处理后的文本"}},required:["field","word"]},BgmConfirm:{type:"object",properties:{column:{type:"string",description:"列名"},locationId:{description:"位置ID",type:"array",items:{type:"string"}}},required:["column","locationId"]},BatchBgRoleReqDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",type:"array",items:{$ref:"#/components/schemas/BgmConfirm"}}},required:["bg","role","bgm"]},BatchUpdateRspDto:{type:"object",properties:{bg:{description:"背景数据",type:"array",items:{$ref:"#/components/schemas/UpdateBgDto"}},role:{description:"角色数据",type:"array",items:{$ref:"#/components/schemas/UpdateRoleDto"}},bgm:{description:"确认BGM",allOf:[{$ref:"#/components/schemas/BatchBgm"}]}},required:["bg","role","bgm"]},BatchValidSensitiveWordsDTO:{type:"object",properties:{id:{type:"string",description:"ID"},valids:{description:"校验列表",type:"array",items:{$ref:"#/components/schemas/ValidSensitiveWordsDTO"}}},required:["id","valids"]},BatchValidRoleBgSensitiveWordsDTO:{type:"object",properties:{role:{description:"角色列表",type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}},bg:{description:"背景列表",type:"array",items:{$ref:"#/components/schemas/BatchValidSensitiveWordsDTO"}}},required:["role","bg"]},IdNameDto:{type:"object",properties:{id:{type:"string",description:"ID"},name:{type:"string",description:"名称"}},required:["id","name"]},BatchConfirmRspDto:{type:"object",properties:{success:{description:"成功数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}},fail:{description:"失败数据",type:"array",items:{$ref:"#/components/schemas/IdNameDto"}}},required:["success","fail"]},FindRoleDto:{type:"object",properties:{name:{type:"string",description:"角色名称"}},required:["name"]},ResourceTypeEnum:{type:"string",description:"资源类型",enum:["figure","background","bgm"]},Remark:{type:"object",properties:{applyFrame:{description:"应用差分帧图",type:"array",items:{type:"string"}}},required:["applyFrame"]},CreateResourceDto:{type:"object",properties:{name:{type:"string",description:"资源名称"},path:{type:"string",description:"资源路径"},list:{description:"备选图",type:"array",items:{type:"string"}},frame:{description:"差分帧图",allOf:[{$ref:"#/components/schemas/Frame"}]},type:{example:'{"FIGURE":"figure","BACKGROUND":"background","BGM":"bgm"}',$ref:"#/components/schemas/ResourceTypeEnum"},uid:{type:"string",description:"用户ID"},pid:{type:"string",description:"父级资源ID"},category:{description:"分类",allOf:[{$ref:"#/components/schemas/Category"}]},remark:{description:"备注",allOf:[{$ref:"#/components/schemas/Remark"}]}},required:["name","path","list","frame","type","uid","pid","category","remark"]},UpdateResourceDto:{type:"object",properties:{}},FindBgDto:{type:"object",properties:{name:{type:"string",description:"背景名称"}},required:["name"]},StockColumnData:{type:"object",properties:{id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐相对地址"},locationId:{type:"string",description:"位置ID"},checked:{type:"boolean",description:"勾选"}},required:["id","name","url","locationId","checked"]},StockColumn:{type:"object",properties:{column:{type:"string",description:"列值"},data:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumnData"}}},required:["column","data"]},Stock:{type:"object",properties:{name:{type:"string",description:"行标签名称"},columns:{description:"行标签对应列数据",type:"array",items:{$ref:"#/components/schemas/StockColumn"}}},required:["name","columns"]},BgmTableDto:{type:"object",properties:{title:{description:"音乐库表头",type:"array",items:{$ref:"#/components/schemas/Title"}},stock:{description:"音乐库数据",type:"array",items:{$ref:"#/components/schemas/Stock"}}},required:["title","stock"]},BgmListDto:{type:"object",properties:{locationId:{type:"string",description:"位置ID"},id:{type:"string",description:"音乐ID"},name:{type:"string",description:"音乐名称"},url:{type:"string",description:"音乐地址"},category:{type:"string",description:"音乐类型"}},required:["locationId","id","name","url","category"]},AudioCutDto:{type:"object",properties:{sceneId:{type:"string",description:"场景名称"},audio:{type:"string",description:"音乐名"},url:{type:"string",description:"音乐库地址"},loop:{type:"string",description:"是否循环"},volume:{type:"number",description:"音量0-100"},rate:{type:"number",description:"播放速度"}},required:["sceneId","audio","url","loop","volume","rate"]},ResultData:{type:"object",properties:{code:{type:"number",default:200},msg:{type:"string",default:"ok"},data:{type:"any",default:null,nullable:!0}},required:["code","msg","data"]},SceneDetailDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"}},required:["gameId","chapterId","sceneId"]},EditorCommandEnum:{type:"string",description:"命令",enum:["narr","clp","bst","bgi","bgm","cg","cp"]},Role:{type:"object",properties:{id:{type:"string",description:"角色ID"},emotion:{type:"string",description:"表情"},name:{type:"string",description:"角色名称"},gender:{example:'{"MALE":"male","FEMALE":"female","NONHUMAN":"nonhuman"}',$ref:"#/components/schemas/GenderEnum"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},timbre:{type:"string",description:"音色"}},required:["id","emotion","name","gender","style","timbre"]},Vocal:{type:"object",properties:{hash:{type:"string",description:"hash"},timbre:{type:"string",description:"音色"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"}},required:["hash","timbre","vocal","url"]},Prop:{type:"object",properties:{id:{type:"string",description:"道具ID"},name:{type:"string",description:"道具名称"},disabled:{type:"boolean",description:"是否失效, true-失效|false-有效",default:!1}},required:["id","name"]},SoundEffectTypeEnum:{type:"string",description:"音效类型",enum:["flow","scene"]},SoundEffect:{type:"object",properties:{id:{type:"string",description:"id"},ids:{description:"音效对应ID层级",type:"array",items:{type:"string"}},type:{example:'{"FLOW":"flow","SCENE":"scene"}',$ref:"#/components/schemas/SoundEffectTypeEnum"},label:{type:"string",description:"音效标签"},loop:{type:"boolean",description:"是否循环",default:!1},volume:{type:"number",description:"音量0-100",default:50,minimum:0,maximum:100},disabled:{type:"boolean",description:"是否失效, true-失效|false-有效",default:!1}},required:["id","ids","type","label","loop","volume"]},LineDto:{type:"object",properties:{id:{type:"string",description:"行ID"},content:{type:"string",description:"内容"},command:{type:"array",example:'{"Narrator":"narr","ClearPorp":"clp","BlackScreenText":"bst","BackgroundImage":"bgi","BackgroundMusic":"bgm","ComputerGraphics":"cg","CharacterPortrait":"cp"}',items:{$ref:"#/components/schemas/EditorCommandEnum"}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]},soundEffects:{description:"音效",type:"array",items:{$ref:"#/components/schemas/SoundEffect"}}},required:["id","content","command","role","vocal","prop","soundEffects"]},Figure:{type:"object",properties:{name:{type:"string",description:"立绘名称"},path:{type:"string",description:"图片路径"}},required:["name","path"]},BgmVO:{type:"object",properties:{audio:{type:"string",description:"音乐"},url:{type:"string",description:"URL"},loop:{type:"boolean",description:"是否循环",default:!0},volume:{type:"number",description:"音量0-100",default:100},rate:{type:"number",description:"播放速度",default:1}},required:["audio","url","loop","volume","rate"]},SceneDetailRsp:{type:"object",properties:{sceneId:{type:"string",description:"场景文件名"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}},figures:{description:"立绘信息(拥有资源的角色)",type:"array",items:{$ref:"#/components/schemas/Figure"}},bg:{type:"string",description:"背景"},cg:{type:"string",description:"CG"},bgm:{description:"音乐",allOf:[{$ref:"#/components/schemas/BgmVO"}]},isBatchVocal:{type:"boolean",description:"批量配音"},recommendBgm:{description:"推荐音乐",type:"array",items:{$ref:"#/components/schemas/BgmListDto"}}},required:["sceneId","dialogues","figures","bg","cg","bgm","isBatchVocal","recommendBgm"]},SceneReq:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},dialogues:{description:"对话框内容",type:"array",items:{$ref:"#/components/schemas/LineDto"}}},required:["gameId","chapterId","sceneId","dialogues"]},UpdateUiResourceDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},bg:{type:"string",description:"更新背景"},cg:{type:"string",description:"更新CG"},clearBg:{type:"boolean",description:"清除背景"},clearCg:{type:"boolean",description:"清除CG"}},required:["gameId","chapterId","sceneId","bg","cg","clearBg","clearCg"]},SceneDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"}},required:["gameId","chapterId","sceneId"]},CheckContentSensitiveWordsReq:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},lineId:{type:"string",description:"行ID"}},required:["gameId","chapterId","sceneId"]},SpliceContentTypeEnum:{type:"string",description:"类型",enum:["pass","err"]},SpliceContent:{type:"object",properties:{type:{$ref:"#/components/schemas/SpliceContentTypeEnum"},part:{type:"string",description:"片段"}},required:["type","part"]},CheckContentSensitiveWordsDTO:{type:"object",properties:{id:{type:"string",description:"行ID"},command:{type:"array",example:'{"Narrator":"narr","ClearPorp":"clp","BlackScreenText":"bst","BackgroundImage":"bgi","BackgroundMusic":"bgm","ComputerGraphics":"cg","CharacterPortrait":"cp"}',items:{$ref:"#/components/schemas/EditorCommandEnum"}},role:{description:"角色",allOf:[{$ref:"#/components/schemas/Role"}]},vocal:{description:"配音",allOf:[{$ref:"#/components/schemas/Vocal"}]},prop:{description:"道具",allOf:[{$ref:"#/components/schemas/Prop"}]},soundEffects:{description:"音效",type:"array",items:{$ref:"#/components/schemas/SoundEffect"}},content:{description:"校验内容",type:"array",items:{$ref:"#/components/schemas/SpliceContent"}}},required:["id","command","role","vocal","prop","soundEffects","content"]},VocalBindingDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},id:{type:"string",description:"行标识"},timbre:{type:"string",description:"音色"},url:{type:"string",description:"配音相对地址"}},required:["gameId","chapterId","sceneId","id","timbre","url"]},VocalUntieDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},sceneId:{type:"string",description:"场景ID"},id:{type:"string",description:"行标识"},url:{type:"string",description:"解绑配音相对地址"}},required:["gameId","chapterId","sceneId","id","url"]},VocalBaseLineDTO:{type:"object",properties:{lineId:{type:"string",description:"行标识"},content:{type:"string",description:"行内容"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},timbre:{type:"string",description:"音色"}},required:["lineId","content","category","categoryLabel","emotion","timbre"]},VocalReadyDTO:{type:"object",properties:{subject:{type:"string",description:"角色名/旁白"},subjectId:{type:"string",description:"角色名ID/narr"},timbre:{type:"string",description:"音色ID"},style:{type:"string",description:"风格"},vocals:{description:"剧本语句",type:"array",items:{$ref:"#/components/schemas/VocalBaseLineDTO"}}},required:["subject","subjectId","timbre","style","vocals"]},LineVocal:{type:"object",properties:{lineId:{type:"string",description:"行ID"},content:{type:"string",description:"行内容"},hash:{type:"string",description:"hash"},style:{type:"string",description:"角色风格"},timbre:{type:"string",description:"音色"},category:{type:"string",description:"表情大类英文"},categoryLabel:{type:"string",description:"表情大类中文"},emotion:{type:"string",description:"表情小类中文"},vocal:{type:"string",description:"配音文件(不包含路径)"},url:{type:"string",description:"配音地址"},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["lineId","content","hash","style","timbre","category","categoryLabel","emotion","vocal","url","progress"]},BatchVocal:{type:"object",properties:{vocals:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/LineVocal"}},subject:{type:"string",description:"主题"}},required:["vocals","subject"]},BatchGenerateVocal:{type:"object",properties:{batchs:{description:"配音列表",type:"array",items:{$ref:"#/components/schemas/BatchVocal"}},progress:{description:"总进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["batchs","progress"]},AddChapterCanvasDTO:{type:"object",properties:{nodes:{description:"新增节点",type:"array",items:{$ref:"#/components/schemas/ChapterNode"}},edges:{description:"新增线",type:"array",items:{$ref:"#/components/schemas/ChapterEdge"}}},required:["nodes","edges"]},RenameChapterDTO:{type:"object",properties:{name:{type:"string",description:"名称"}},required:["name"]},EndNode:{type:"object",properties:{id:{type:"string",description:"节点id"},label:{type:"string",description:"节点标签"}},required:["id","label"]},CheckChapterRspDTO:{type:"object",properties:{isAddChapter:{type:"boolean",description:"新增章节",default:!0},isAddStoryLine:{type:"boolean",description:"新增故事线",default:!0},isUpdateStoryLine:{type:"boolean",description:"更新故事线",default:!0},isRename:{type:"boolean",description:"重命名",default:!0},isDelete:{type:"boolean",description:"刪除",default:!0},endNodes:{description:"结束节点列表",type:"array",items:{$ref:"#/components/schemas/EndNode"}}},required:["isAddChapter","isAddStoryLine","isUpdateStoryLine","isRename","isDelete","endNodes"]},UpdateVariableDto:{type:"object",properties:{id:{type:"string",description:"变量表ID"}},required:["id"]},PropSizeEnum:{type:"string",description:"道具大小",enum:["small","middle","big"]},PropGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","prop"]},PropDto:{type:"object",properties:{id:{type:"string",description:"道具ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"道具名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{example:'{"Anime":"anime","Romantic":"romantic","Watercolor":"watercolor"}',$ref:"#/components/schemas/ImageStyleEnum"},original:{type:"string",description:"原文(道具描述)"},prompts:{type:"string",description:"提示词"},url:{type:"string",description:"道具图片"},list:{description:"道具图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},tlmId:{type:"string",description:"道具对应大模型输出ID"},category:{description:"道具分类",example:["生活","娱乐场所","都市酒吧"],type:"array",items:{type:"string"}},size:{example:'{"SMALL":"small","MIDDLE":"middle","BIG":"big"}',$ref:"#/components/schemas/PropSizeEnum"},stage:{example:'{"PROMPTS":"prompts","PROP":"prop"}',$ref:"#/components/schemas/PropGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","url","list","tlmId","category","size","stage","progress"]},FindPropDto:{type:"object",properties:{name:{type:"string",description:"道具名称"}},required:["name"]},CgGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","cg"]},CgDto:{type:"object",properties:{id:{type:"string",description:"Cg ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"Cg名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{type:"string",description:"Cg风格"},original:{type:"string",description:"原文(Cg描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"Cg对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"Cg图片"},list:{description:"Cg图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},stage:{example:'{"PROMPTS":"prompts","CG":"cg"}',$ref:"#/components/schemas/CgGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","list","stage","progress"]},FindCgDto:{type:"object",properties:{name:{type:"string",description:"Cg名称"}},required:["name"]},ImageFromEnum:{type:"string",description:"图片来源",enum:["aigc","upload"]},CoverGenerateStage:{type:"string",description:"生成阶段",enum:["prompts","drawing"]},CoverDTO:{type:"object",properties:{id:{type:"string",description:"封面ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"封面名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{type:"string",description:"封面风格"},original:{type:"string",description:"原文(封面描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"封面对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"封面图片"},cgid:{type:"string",description:"CGID"},list:{description:"封面图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},from:{example:'{"AIGC":"aigc","UPLOAD":"upload"}',$ref:"#/components/schemas/ImageFromEnum"},stage:{example:'{"PROMPTS":"prompts","COVER":"drawing"}',$ref:"#/components/schemas/CoverGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","cgid","list","from","stage","progress"]},CoverVO:{type:"object",properties:{id:{type:"string",description:"封面ID"},uid:{type:"string",description:"用户ID"},name:{type:"string",description:"封面名称"},unrestricted:{type:"boolean",description:"自由画风开关"},style:{type:"string",description:"封面风格"},original:{type:"string",description:"原文(封面描述)"},prompts:{type:"string",description:"提示词"},tlmId:{type:"string",description:"封面对应大模型输出ID"},mood:{description:"角色情绪",type:"array",items:{type:"string"}},role:{type:"string",description:"关联角色ID"},factor:{description:"影响因子",type:"array",items:{type:"string"}},atmosphere:{type:"string",description:"画面氛围"},url:{type:"string",description:"封面图片"},cgid:{type:"string",description:"CGID"},list:{description:"封面图片列表",type:"array",items:{$ref:"#/components/schemas/Picture"}},from:{example:'{"AIGC":"aigc","UPLOAD":"upload"}',$ref:"#/components/schemas/ImageFromEnum"},stage:{example:'{"PROMPTS":"prompts","COVER":"drawing"}',$ref:"#/components/schemas/CoverGenerateStage"},progress:{description:"进度",allOf:[{$ref:"#/components/schemas/Progress"}]},active:{type:"boolean",description:"激活状态"}},required:["id","uid","name","unrestricted","style","original","prompts","tlmId","mood","role","factor","atmosphere","url","cgid","list","from","stage","progress","active"]},CoverGameDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"}},required:["gameId"]},CgToCoverDTO:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},cgid:{type:"string",description:"CGID"}},required:["gameId","cgid"]},EffectListDto:{type:"object",properties:{value:{type:"string",description:"音效ID"},label:{type:"string",description:"音效名"},style:{type:"string",description:"风格",nullable:!0},tags:{description:"音效标签",nullable:!0,type:"array",items:{type:"string"}},url:{type:"string",description:"资源文件路径",nullable:!0},children:{description:"下级分类",nullable:!0,type:"array",items:{$ref:"#/components/schemas/EffectListDto"}}},required:["value","label","style","tags","url","children"]},CanvasNodeTypeEnum:{type:"string",description:"类型",enum:["start","scene","branch","end"]},Variable:{type:"object",properties:{id:{type:"string"},alias:{type:"string"},name:{type:"string"}},required:["id","alias","name"]},EscapeCharacterEnum:{type:"string",description:"转义字符",enum:["lt","le","eq","ne","ge","gt"]},ExpValue:{type:"object",properties:{value:{type:"number"},exp:{example:'{"LT":"lt","LE":"le","EQ":"eq","NE":"ne","GE":"ge","GT":"gt"}',$ref:"#/components/schemas/EscapeCharacterEnum"}},required:["value","exp"]},LogicalOperatorEnum:{type:"string",description:"条件",enum:["and","or",""]},ICondition:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"}},required:["isEnabled","variable","lower","upper","condition"]},IOptions:{type:"object",properties:{name:{type:"string",description:"选项名称"},nodeId:{type:"string",description:"关联的节点"},sound:{type:"string",description:"绑定音频"},varId:{type:"string",description:"选定的变量ID"},alias:{type:"string",description:"选定的变量"},varValue:{type:"number",description:"设定的变量值"},advanced:{description:"高级选项",allOf:[{$ref:"#/components/schemas/ICondition"}]}},required:["name","nodeId","sound","varId","alias","varValue","advanced"]},NodeData:{type:"object",properties:{label:{type:"string",description:"节点名称"},chapterId:{type:"string",description:"章节id"},background:{type:"string",description:"绑定背景"},options:{description:"选项",type:"array",items:{$ref:"#/components/schemas/IOptions"}}},required:["label","chapterId","background","options"]},Node:{type:"object",properties:{id:{type:"string",description:"id"},type:{example:'{"START":"start","SCENE":"scene","BRANCH":"branch","END":"end"}',$ref:"#/components/schemas/CanvasNodeTypeEnum"},data:{description:"节点数据",allOf:[{$ref:"#/components/schemas/NodeData"}]}},required:["id","type","data"]},EdgeData:{type:"object",properties:{isEnabled:{type:"boolean",description:"是否启用"},variable:{description:"变量信息",allOf:[{$ref:"#/components/schemas/Variable"}]},lower:{description:"条件一",allOf:[{$ref:"#/components/schemas/ExpValue"}]},upper:{description:"条件二",allOf:[{$ref:"#/components/schemas/ExpValue"}]},condition:{example:'{"AND":"and","OR":"or","NULL":""}',$ref:"#/components/schemas/LogicalOperatorEnum"}},required:["isEnabled","variable","lower","upper","condition"]},Edge:{type:"object",properties:{id:{type:"string",description:"id"},source:{type:"string"},target:{type:"string"},data:{$ref:"#/components/schemas/EdgeData"}},required:["id","source","target","data"]},CanvasBody:{type:"object",properties:{nodes:{description:"节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["nodes","edges"]},Valid:{type:"object",properties:{id:{type:"string"},msg:{type:"string"},type:{type:"string"}},required:["id","msg","type"]},ValidateCanvas:{type:"object",properties:{only:{description:"节点重复集",type:"array",items:{$ref:"#/components/schemas/Valid"}},scene:{description:"场景报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},branch:{description:"节点报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}},edge:{description:"边报错集",type:"array",items:{$ref:"#/components/schemas/Valid"}}},required:["only","scene","branch","edge"]},CanvasHistory:{type:"object",properties:{_id:{type:"string",description:"画布ID"},updatedAt:{type:"string",description:"更新时间"},createdAt:{type:"string",description:"创建时间"}},required:["_id","updatedAt","createdAt"]},AddScene:{type:"object",properties:{id:{type:"string",description:"场景ID"},type:{example:'{"START":"start","SCENE":"scene","BRANCH":"branch","END":"end"}',$ref:"#/components/schemas/CanvasNodeTypeEnum"}},required:["id","type"]},AddSceneDto:{type:"object",properties:{gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},scenes:{description:"场景列表",type:"array",items:{$ref:"#/components/schemas/AddScene"}}},required:["gameId","chapterId","scenes"]},RecordCanvasDto:{type:"object",properties:{editorType:{example:'{"UI":"ui","TXT":"txt"}',$ref:"#/components/schemas/EditorTypeEnum"},gameId:{type:"string",description:"游戏ID"},chapterId:{type:"string",description:"章节ID"},nodes:{description:"画布节点信息",type:"array",items:{$ref:"#/components/schemas/Node"}},edges:{description:"画布边信息",type:"array",items:{$ref:"#/components/schemas/Edge"}}},required:["editorType","gameId","chapterId","nodes","edges"]},CanvasView:{type:"object",properties:{canvas:{description:"节点信息",allOf:[{$ref:"#/components/schemas/CanvasBody"}]},valid:{description:"校验信息",allOf:[{$ref:"#/components/schemas/ValidateCanvas"}]}},required:["canvas","valid"]},UserVO:{type:"object",properties:{uid:{type:"string",description:"用户ID"},nickname:{type:"string",description:"昵称"},avatar:{type:"string",description:"头像"},gender:{type:"number",description:"性别"}},required:["uid","nickname","avatar","gender"]}}},n={openapi:e,paths:t,info:r,tags:s,servers:o,components:i};exports.components=i,exports.default=n,exports.info=r,exports.openapi=e,exports.paths=t,exports.servers=o,exports.tags=s;