← ソースコード説明書
scripts/ - スクリプト一覧
作成日: 2026-03-06 / 更新日: 2026-06-10
概要
開発、テスト、デプロイ、バックアップ、ユーティリティのシェルスクリプトと TypeScript スクリプト。.sh/.ts/.mjs 合計約 187 ファイル。
開発 (5 ファイル)
| ファイル | 行数 | 用途 |
|---|---|---|
| dev-start.sh | 125 | 開発サーバー起動(既存プロセス停止→PostgreSQL確認→npm install→起動) |
| pre-deploy-check.sh | 32 | デプロイ前チェック |
| check-e2e-sync.sh | 24 | E2E セレクタ整合性チェック |
| local-env.sh | 4 | ローカル URL/設定表示 |
| azure-env.sh | 8 | Azure URL/認証情報表示 |
dev-start.sh の使い方
./scripts/dev-start.sh # API + Next.js (デフォルト)
./scripts/dev-start.sh all # 全サーバー
./scripts/dev-start.sh api editor # 指定のみ
テストランナー - ローカル (scripts/test/local/)
| ファイル | 行数 | 用途 |
|---|---|---|
| scripts/test/local/run-all.sh | 181 | マスター(Phase 1-8 統合) |
| scripts/test/local/health.sh | 60 | Phase 1: curl ヘルスチェック |
| scripts/test/local/api.sh | 128 | Phase 2: API テスト |
| scripts/test/local/unit.sh | 83 | Phase 3: ユニットテスト (core, compiler, interpreter) |
| scripts/test/local/e2e.sh | 168 | Phase 4: Playwright E2E |
| scripts/test/local/auth.sh | 16 | Phase 5: 認証 E2E |
| scripts/test/local/ks-editor.sh | 14 | Phase 6: KSC エディタ E2E |
| scripts/test/local/editor.sh | 51 | Editor ユニットテスト |
| scripts/test/local/security.sh | 450 | セキュリティチェック |
run-all.sh の使い方
bash scripts/test/local/run-all.sh # 全 Phase
bash scripts/test/local/run-all.sh --phase 3 # Phase 3 (ユニットテスト) まで
bash scripts/test/local/run-all.sh --repeat 3 # 3回連続実行(安定性確認)
テストランナー - Azure (scripts/test/azure/)
| ファイル | 行数 | 用途 |
|---|---|---|
| scripts/test/azure/run-all.sh | 184 | マスター(Phase 1-7 統合) |
| scripts/test/azure/health.sh | 47 | Phase 1: サービスヘルスチェック |
| scripts/test/azure/api.sh | 101 | Phase 2: API テスト |
| scripts/test/azure/e2e.sh | 11 | Phase 3: Playwright E2E |
| scripts/test/azure/auth.sh | 11 | Phase 4: 認証テスト |
| scripts/test/azure/ks-editor.sh | 20 | Phase 7: KSC エディタ |
| scripts/test/azure/editor-api.sh | 305 | Editor API テスト |
| scripts/test/azure/security.sh | 467 | セキュリティチェック |
デプロイ (2 ファイル)
| ファイル | 行数 | 用途 |
|---|---|---|
| deploy-verify.sh | 184 | git push → Actions 待ち → 全テスト |
| scripts/deploy/deploy-azure.sh | — | 使用禁止(ローカルデプロイ禁止、GitHub Actions を使う) |
deploy-verify.sh の使い方
./scripts/deploy-verify.sh # push → 待機 → テスト
./scripts/deploy-verify.sh --no-push # push 済み → テストのみ
./scripts/deploy-verify.sh --skip-test # push のみ
ビルド / ネイティブ (5 ファイル)
| ファイル | 行数 | 用途 |
|---|---|---|
| build-title.sh | 19 | ゲームタイトル/ロゴアセットビルド |
| download-sdl2-sources.sh | 52 | SDL2/SDL_image ソースダウンロード |
| sync-native.sh | 14 | ネイティブエンジン更新同期 |
| sync-oss.sh | 22 | OSS ライセンス同期 |
バックアップ / 監視 (6 ファイル)
| ファイル | 行数 | 用途 |
|---|---|---|
| backup-setup.sh | 41 | Azure Backup vault セットアップ |
| backup-status.sh | 22 | バックアップ健全性確認 |
| backup-dump.sh | 12 | PostgreSQL バックアップ |
| backup-restore-test.sh | 28 | 復元テスト |
| backup-daily-check.sh | 32 | 定期バックアップ検証 |
| setup-frontdoor.sh | 41 | Azure Front Door CDN セットアップ |
配信 / デバッグ (3 ファイル)
| ファイル | 行数 | 用途 |
|---|---|---|
| obs-stream.sh | 34 | OBS WebSocket 配信制御 |
| stream-ending.sh | 18 | 配信終了 |
| auto-record.sh | 31 | ゲームプレイ自動録画 |
TypeScript スクリプト (約 76 ファイル)
AI / 執筆支援
| ファイル | 行数 | 用途 |
|---|---|---|
| assist-cli.ts | 180 | AI 執筆支援 CLI (4段階パイプライン) |
| debug-google-ai.ts | — | Google AI デバッグ |
| debug-google-genai.ts | — | Google GenAI デバッグ |
| debug-google-genai-v2.ts | — | Google GenAI v2 デバッグ |
| debug-vertex-*.ts | 5種 | Google Vertex AI デバッグ/テスト |
| test-gemini-2.ts | — | Gemini 2.0 検証 |
| verify-gemini2.ts | — | Gemini 2.0 バリデーション |
| test-api-key.ts | 18 | API キー検証 |
| list-models.ts | 23 | LLM モデル一覧表示 |
RAG
| ファイル | 行数 | 用途 |
|---|---|---|
| init-rag-db.ts | 47 | RAG ベクトル DB 初期化 |
| rag-index.ts | 64 | RAG ドキュメントインデックス |
| test-rag-search.ts | 58 | RAG 検索検証 |
ユーティリティ
| ファイル | 行数 | 用途 |
|---|---|---|
| migrate-to-projects.ts | 35 | レガシー → プロジェクトデータ移行 |
| verify-doc-links.ts | 71 | ドキュメントリンク有効性チェック |
| verify-ks-spec.ts | 89 | KS コマンド仕様バリデーション |
Ad: stickyBottom (728x90)