mirror of
https://github.com/DanielLavrushin/b4.git
synced 2026-08-22 07:23:45 +00:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
634b71a1dd
commit
100c5cef3b
19 changed files with 4812 additions and 353 deletions
47
.github/workflows/release.yml
vendored
47
.github/workflows/release.yml
vendored
|
|
@ -113,6 +113,53 @@ jobs:
|
|||
path: out/assets/*
|
||||
retention-days: 1
|
||||
|
||||
swagger:
|
||||
name: Update Swagger Docs
|
||||
needs: [build-linux]
|
||||
if: github.ref == 'refs/heads/main' && inputs.prerelease == false
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: src/go.mod
|
||||
|
||||
- name: Generate Swagger spec
|
||||
run: make swagger VERSION="$VERSION"
|
||||
|
||||
- name: Archive versioned spec
|
||||
run: |
|
||||
mkdir -p docs/static/swagger-versions
|
||||
cp docs/static/swagger.json "docs/static/swagger-versions/v${VERSION}.json"
|
||||
# Build versions manifest from files on disk
|
||||
echo "[" > docs/static/swagger-versions/index.json
|
||||
first=true
|
||||
for f in $(ls -v docs/static/swagger-versions/v*.json 2>/dev/null | sort -rV); do
|
||||
ver=$(basename "$f" .json)
|
||||
if [ "$first" = true ]; then first=false; else echo "," >> docs/static/swagger-versions/index.json; fi
|
||||
echo " \"$ver\"" >> docs/static/swagger-versions/index.json
|
||||
done
|
||||
echo "]" >> docs/static/swagger-versions/index.json
|
||||
cat docs/static/swagger-versions/index.json
|
||||
|
||||
- name: Commit swagger docs
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add docs/static/swagger.json docs/static/swagger-versions/
|
||||
git diff --cached --quiet && echo "No swagger changes" || \
|
||||
(git commit -m "docs: update swagger spec to v${VERSION}" && git push)
|
||||
|
||||
- name: Trigger docs deployment
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh workflow run docs.yml --ref main
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
needs: [build-linux]
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -31,6 +31,10 @@ ANDROID_MIN_API := 21
|
|||
swagger:
|
||||
@echo "Generating Swagger docs..."
|
||||
@cd $(SRC_DIR) && go run github.com/swaggo/swag/cmd/swag@v1.16.4 init --generalInfo main.go --output docs --parseDependency
|
||||
@rm -f $(SRC_DIR)/docs/docs.go
|
||||
@sed -i 's/"version": *"[^"]*"/"version": "$(VERSION)"/' $(SRC_DIR)/docs/swagger.json
|
||||
@cp $(SRC_DIR)/docs/swagger.json ./docs/static/swagger.json
|
||||
@echo "Swagger spec (v$(VERSION)) copied to docs/static/"
|
||||
|
||||
# Build for current platform
|
||||
.PHONY: build
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
- IMPROVED: **Discovery no longer interrupts normal traffic** — discovery now runs on its own isolated flow, so your internet connection stays unaffected while discovery is testing strategies.
|
||||
- IMPROVED: **Stopping discovery is now reliable** — cancelling a running discovery now properly cleans up all firewall rules and stops immediately.
|
||||
- CHANGED: **Swagger UI moved to documentation site** — the embedded Swagger UI has been removed from the binary to reduce its size (~27MB → ~13MB). API documentation is now available at [daniellavrushin.github.io/b4/swagger](https://daniellavrushin.github.io/b4/swagger) with the ability to connect to a live B4 instance for testing. The `/swagger/` endpoint now redirects to the documentation site.
|
||||
|
||||
## [1.46.6] - 2026-03-26
|
||||
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
title: API
|
||||
---
|
||||
|
||||
# API
|
||||
|
||||
b4 предоставляет REST API для управления всеми аспектами конфигурации и мониторинга. Веб-интерфейс использует этот же API.
|
||||
|
||||
## Swagger UI
|
||||
|
||||
Для просмотра документации API включите Swagger в конфигурации:
|
||||
|
||||
В файле `b4.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"system": {
|
||||
"web_server": {
|
||||
"swagger": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
После перезапуска Swagger UI доступен по адресу:
|
||||
|
||||
```text
|
||||
http://<IP>:7000/swagger/
|
||||
```
|
||||
|
||||
:::info
|
||||
Swagger UI показывает все доступные эндпоинты, параметры запросов, форматы ответов и позволяет отправлять тестовые запросы прямо из браузера.
|
||||
:::
|
||||
|
||||
## Основные группы эндпоинтов
|
||||
|
||||
| Группа | Базовый путь | Описание |
|
||||
| --- | --- | --- |
|
||||
| Config | `/api/config` | Чтение и сохранение системной конфигурации |
|
||||
| Sets | `/api/sets` | CRUD-операции с сетами |
|
||||
| Geodat | `/api/geodat` | Управление GeoSite/GeoIP базами |
|
||||
| Discovery | `/api/discovery` | Запуск и управление дискавери |
|
||||
| Detector | `/api/detector` | Запуск DPI-детектора |
|
||||
| Connections | `/api/ws/logs` | WebSocket — поток соединений и логов |
|
||||
| Metrics | `/api/ws/metrics` | WebSocket — метрики в реальном времени |
|
||||
| Devices | `/api/devices` | Управление устройствами и алиасами |
|
||||
| Capture | `/api/capture` | Генерация и управление TLS-пэйлоадами |
|
||||
| Auth | `/api/auth/login` | Авторизация |
|
||||
| Backup | `/api/backup` | Скачивание и восстановление конфигурации |
|
||||
| Integration | `/api/integration` | RIPE, IPInfo и другие внешние сервисы |
|
||||
| MTProto | `/api/mtproto` | Генерация секрета MTProto |
|
||||
| SOCKS5 | `/api/socks5` | Конфигурация SOCKS5 |
|
||||
|
||||
## Авторизация
|
||||
|
||||
Если в настройках задан логин и пароль, API требует авторизацию. Получите токен через:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:7000/api/auth/login \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"username": "admin", "password": "password"}'
|
||||
```
|
||||
|
||||
Используйте полученный токен в заголовке:
|
||||
|
||||
```bash
|
||||
curl http://localhost:7000/api/config \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
## WebSocket
|
||||
|
||||
Два WebSocket-эндпоинта обеспечивают данные в реальном времени:
|
||||
|
||||
- `/api/ws/logs` — поток логов и соединений (используется страницами Соединения и Логи)
|
||||
- `/api/ws/metrics` — метрики системы (используется Дашбордом)
|
||||
|
|
@ -9,5 +9,5 @@ title: Продвинутое
|
|||
|
||||
- [CLI-параметры](./cli) — флаги командной строки
|
||||
- [Конфигурационный файл](./config) — структура `b4.json`
|
||||
- [API](./api) — Swagger-документация и REST API
|
||||
- [API](/b4/swagger) — Swagger-документация и REST API
|
||||
- [Как работает ТСПУ](./tspu) — техническое описание российской системы DPI
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@ const config: Config = {
|
|||
position: "left",
|
||||
label: "Документация",
|
||||
},
|
||||
{
|
||||
to: "/swagger",
|
||||
label: "API",
|
||||
position: "left",
|
||||
},
|
||||
{
|
||||
href: "https://github.com/DanielLavrushin/b4",
|
||||
label: "GitHub",
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
"@docusaurus/module-type-aliases": "3.9.2",
|
||||
"@docusaurus/tsconfig": "3.9.2",
|
||||
"@docusaurus/types": "3.9.2",
|
||||
"@types/react": "^19.2.14",
|
||||
"typescript": "~5.6.3"
|
||||
},
|
||||
"browserslist": {
|
||||
|
|
@ -44,5 +45,6 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": ">=20.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@10.29.2+sha512.bef43fa759d91fd2da4b319a5a0d13ef7a45bb985a3d7342058470f9d2051a3ba8674e629672654686ef9443ad13a82da2beb9eeb3e0221c87b8154fff9d74b8"
|
||||
}
|
||||
|
|
|
|||
365
docs/pnpm-lock.yaml
generated
365
docs/pnpm-lock.yaml
generated
|
|
@ -13,7 +13,7 @@ importers:
|
|||
version: 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
'@docusaurus/preset-classic':
|
||||
specifier: 3.9.2
|
||||
version: 3.9.2(@algolia/client-search@5.49.2)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)
|
||||
version: 3.9.2(@algolia/client-search@5.50.0)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)
|
||||
'@docusaurus/theme-mermaid':
|
||||
specifier: ^3.9.2
|
||||
version: 3.9.2(@docusaurus/plugin-content-docs@3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3))(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
|
|
@ -42,14 +42,17 @@ importers:
|
|||
'@docusaurus/types':
|
||||
specifier: 3.9.2
|
||||
version: 3.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
'@types/react':
|
||||
specifier: ^19.2.14
|
||||
version: 19.2.14
|
||||
typescript:
|
||||
specifier: ~5.6.3
|
||||
version: 5.6.3
|
||||
|
||||
packages:
|
||||
|
||||
'@algolia/abtesting@1.15.2':
|
||||
resolution: {integrity: sha512-rF7vRVE61E0QORw8e2NNdnttcl3jmFMWS9B4hhdga12COe+lMa26bQLfcBn/Nbp9/AF/8gXdaRCPsVns3CnjsA==}
|
||||
'@algolia/abtesting@1.16.0':
|
||||
resolution: {integrity: sha512-alHFZ68/i9qLC/muEB07VQ9r7cB8AvCcGX6dVQi2PNHhc/ZQRmmFAv8KK1ay4UiseGSFr7f0nXBKsZ/jRg7e4g==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/autocomplete-core@1.19.2':
|
||||
|
|
@ -66,59 +69,59 @@ packages:
|
|||
'@algolia/client-search': '>= 4.9.1 < 6'
|
||||
algoliasearch: '>= 4.9.1 < 6'
|
||||
|
||||
'@algolia/client-abtesting@5.49.2':
|
||||
resolution: {integrity: sha512-XyvKCm0RRmovMI/ChaAVjTwpZhXdbgt3iZofK914HeEHLqD1MUFFVLz7M0+Ou7F56UkHXwRbpHwb9xBDNopprQ==}
|
||||
'@algolia/client-abtesting@5.50.0':
|
||||
resolution: {integrity: sha512-mfgUdLQNxOAvCZUGzPQxjahEWEPuQkKlV0ZtGmePOa9ZxIQZlk31vRBNbM6ScU8jTH41SCYE77G/lCifDr1SVw==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-analytics@5.49.2':
|
||||
resolution: {integrity: sha512-jq/3qvtmj3NijZlhq7A1B0Cl41GfaBpjJxcwukGsYds6aMSCWrEAJ9pUqw/C9B3hAmILYKl7Ljz3N9SFvekD3Q==}
|
||||
'@algolia/client-analytics@5.50.0':
|
||||
resolution: {integrity: sha512-5mjokeKYyPaP3Q8IYJEnutI+O4dW/Ixxx5IgsSxT04pCfGqPXxTOH311hTQxyNpcGGEOGrMv8n8Z+UMTPamioQ==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-common@5.49.2':
|
||||
resolution: {integrity: sha512-bn0biLequn3epobCfjUqCxlIlurLr4RHu7RaE4trgN+RDcUq6HCVC3/yqq1hwbNYpVtulnTOJzcaxYlSr1fnuw==}
|
||||
'@algolia/client-common@5.50.0':
|
||||
resolution: {integrity: sha512-emtOvR6dl3rX3sBJXXbofMNHU1qMQqQSWu319RMrNL5BWoBqyiq7y0Zn6cjJm7aGHV/Qbf+KCCYeWNKEMPI3BQ==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-insights@5.49.2':
|
||||
resolution: {integrity: sha512-z14wfFs1T3eeYbCArC8pvntAWsPo9f6hnUGoj8IoRUJTwgJiiySECkm8bmmV47/x0oGHfsVn3kBdjMX0yq0sNA==}
|
||||
'@algolia/client-insights@5.50.0':
|
||||
resolution: {integrity: sha512-IerGH2/hcj/6bwkpQg/HHRqmlGN1XwygQWythAk0gZFBrghs9danJaYuSS3ShzLSVoIVth4jY5GDPX9Lbw5cgg==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-personalization@5.49.2':
|
||||
resolution: {integrity: sha512-GpRf7yuuAX93+Qt0JGEJZwgtL0MFdjFO9n7dn8s2pA9mTjzl0Sc5+uTk1VPbIAuf7xhCP9Mve+URGb6J+EYxgA==}
|
||||
'@algolia/client-personalization@5.50.0':
|
||||
resolution: {integrity: sha512-3idPJeXn5L0MmgP9jk9JJqblrQ/SguN93dNK9z9gfgyupBhHnJMOEjrRYcVgTIfvG13Y04wO+Q0FxE2Ut8PVbA==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-query-suggestions@5.49.2':
|
||||
resolution: {integrity: sha512-HZwApmNkp0DiAjZcLYdQLddcG4Agb88OkojiAHGgcm5DVXobT5uSZ9lmyrbw/tmQBJwgu2CNw4zTyXoIB7YbPA==}
|
||||
'@algolia/client-query-suggestions@5.50.0':
|
||||
resolution: {integrity: sha512-q7qRoWrQK1a8m5EFQEmPlo7+pg9mVQ8X5jsChtChERre0uS2pdYEDixBBl0ydBSGkdGbLUDufcACIhH/077E4g==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/client-search@5.49.2':
|
||||
resolution: {integrity: sha512-y1IOpG6OSmTpGg/CT0YBb/EAhR2nsC18QWp9Jy8HO9iGySpcwaTvs5kHa17daP3BMTwWyaX9/1tDTDQshZzXdg==}
|
||||
'@algolia/client-search@5.50.0':
|
||||
resolution: {integrity: sha512-Jc360x4yqb3eEg4OY4KEIdGePBxZogivKI+OGIU8aLXgAYPTECvzeOBc90312yHA1hr3AeRlAFl0rIc8lQaIrQ==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/events@4.0.1':
|
||||
resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==}
|
||||
|
||||
'@algolia/ingestion@1.49.2':
|
||||
resolution: {integrity: sha512-YYJRjaZ2bqk923HxE4um7j/Cm3/xoSkF2HC2ZweOF8cXL3sqnlndSUYmCaxHFjNPWLaSHk2IfssX6J/tdKTULw==}
|
||||
'@algolia/ingestion@1.50.0':
|
||||
resolution: {integrity: sha512-OS3/Viao+NPpyBbEY3tf6hLewppG+UclD+9i0ju56mq2DrdMJFCkEky6Sk9S5VPcbLzxzg3BqBX6u9Q35w19aQ==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/monitoring@1.49.2':
|
||||
resolution: {integrity: sha512-9WgH+Dha39EQQyGKCHlGYnxW/7W19DIrEbCEbnzwAMpGAv1yTWCHMPXHxYa+LcL3eCp2V/5idD1zHNlIKmHRHg==}
|
||||
'@algolia/monitoring@1.50.0':
|
||||
resolution: {integrity: sha512-/znwgSiGufpbJVIoDmeQaHtTq+OMdDawFRbMSJVv+12n79hW+qdQXS8/Uu3BD3yn0BzgVFJEvrsHrCsInZKdhw==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/recommend@5.49.2':
|
||||
resolution: {integrity: sha512-K7Gp5u+JtVYgaVpBxF5rGiM+Ia8SsMdcAJMTDV93rwh00DKNllC19o1g+PwrDjDvyXNrnTEbofzbTs2GLfFyKA==}
|
||||
'@algolia/recommend@5.50.0':
|
||||
resolution: {integrity: sha512-dHjUfu4jfjdQiKDpCpAnM7LP5yfG0oNShtfpF5rMCel6/4HIoqJ4DC4h5GKDzgrvJYtgAhblo0AYBmOM00T+lQ==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/requester-browser-xhr@5.49.2':
|
||||
resolution: {integrity: sha512-3UhYCcWX6fbtN8ABcxZlhaQEwXFh3CsFtARyyadQShHMPe3mJV9Wel4FpJTa+seugRkbezFz0tt6aPTZSYTBuA==}
|
||||
'@algolia/requester-browser-xhr@5.50.0':
|
||||
resolution: {integrity: sha512-bffIbUljAWnh/Ctu5uScORajuUavqmZ0ACYd1fQQeSSYA9NNN83ynO26pSc2dZRXpSK0fkc1//qSSFXMKGu+aw==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/requester-fetch@5.49.2':
|
||||
resolution: {integrity: sha512-G94VKSGbsr+WjsDDOBe5QDQ82QYgxvpxRGJfCHZBnYKYsy/jv9qGIDb93biza+LJWizQBUtDj7bZzp3QZyzhPQ==}
|
||||
'@algolia/requester-fetch@5.50.0':
|
||||
resolution: {integrity: sha512-y0EwNvPGvkM+yTAqqO6Gpt9wVGm3CLDtpLvNEiB3VGvN3WzfkjZGtLUsG/ru2kVJIIU7QcV0puuYgEpBeFxcJg==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@algolia/requester-node-http@5.49.2':
|
||||
resolution: {integrity: sha512-UuihBGHafG/ENsrcTGAn5rsOffrCIRuHMOsD85fZGLEY92ate+BMTUqxz60dv5zerh8ZumN4bRm8eW2z9L11jA==}
|
||||
'@algolia/requester-node-http@5.50.0':
|
||||
resolution: {integrity: sha512-xpwefe4fCOWnZgXCbkGpqQY6jgBSCf2hmgnySbyzZIccrv3SoashHKGPE4x6vVG+gdHrGciMTAcDo9HOZwH22Q==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
'@antfu/install-pkg@1.1.0':
|
||||
|
|
@ -1020,8 +1023,8 @@ packages:
|
|||
resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
||||
'@docsearch/core@4.6.0':
|
||||
resolution: {integrity: sha512-IqG3oSd529jVRQ4dWZQKwZwQLVd//bWJTz2HiL0LkiHrI4U/vLrBasKB7lwQB/69nBAcCgs3TmudxTZSLH/ZQg==}
|
||||
'@docsearch/core@4.6.2':
|
||||
resolution: {integrity: sha512-/S0e6Dj7Zcm8m9Rru49YEX49dhU11be68c+S/BCyN8zQsTTgkKzXlhRbVL5mV6lOLC2+ZRRryaTdcm070Ug2oA==}
|
||||
peerDependencies:
|
||||
'@types/react': '>= 16.8.0 < 20.0.0'
|
||||
react: '>= 16.8.0 < 20.0.0'
|
||||
|
|
@ -1034,11 +1037,11 @@ packages:
|
|||
react-dom:
|
||||
optional: true
|
||||
|
||||
'@docsearch/css@4.6.0':
|
||||
resolution: {integrity: sha512-YlcAimkXclvqta47g47efzCM5CFxDwv2ClkDfEs/fC/Ak0OxPH2b3czwa4o8O1TRBf+ujFF2RiUwszz2fPVNJQ==}
|
||||
'@docsearch/css@4.6.2':
|
||||
resolution: {integrity: sha512-fH/cn8BjEEdM2nJdjNMHIvOVYupG6AIDtFVDgIZrNzdCSj4KXr9kd+hsehqsNGYjpUjObeKYKvgy/IwCb1jZYQ==}
|
||||
|
||||
'@docsearch/react@4.6.0':
|
||||
resolution: {integrity: sha512-j8H5B4ArGxBPBWvw3X0J0Rm/Pjv2JDa2rV5OE0DLTp5oiBCptIJ/YlNOhZxuzbO2nwge+o3Z52nJRi3hryK9cA==}
|
||||
'@docsearch/react@4.6.2':
|
||||
resolution: {integrity: sha512-/BbtGFtqVOGwZx0dw/UfhN/0/DmMQYnulY4iv0tPRhC2JCXv0ka/+izwt3Jzo1ZxXS/2eMvv9zHsBJOK1I9f/w==}
|
||||
peerDependencies:
|
||||
'@types/react': '>= 16.8.0 < 20.0.0'
|
||||
react: '>= 16.8.0 < 20.0.0'
|
||||
|
|
@ -1938,13 +1941,13 @@ packages:
|
|||
ajv@8.18.0:
|
||||
resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==}
|
||||
|
||||
algoliasearch-helper@3.28.0:
|
||||
resolution: {integrity: sha512-GBN0xsxGggaCPElZq24QzMdfphrjIiV2xA+hRXE4/UMpN3nsF2WrM8q+x80OGvGpJWtB7F+4Hq5eSfWwuejXrg==}
|
||||
algoliasearch-helper@3.28.1:
|
||||
resolution: {integrity: sha512-6iXpbkkrAI5HFpCWXlNmIDSBuoN/U1XnEvb2yJAoWfqrZ+DrybI7MQ5P5mthFaprmocq+zbi6HxnR28xnZAYBw==}
|
||||
peerDependencies:
|
||||
algoliasearch: '>= 3.1 < 6'
|
||||
|
||||
algoliasearch@5.49.2:
|
||||
resolution: {integrity: sha512-1K0wtDaRONwfhL4h8bbJ9qTjmY6rhGgRvvagXkMBsAOMNr+3Q2SffHECh9DIuNVrMA1JwA0zCwhyepgBZVakng==}
|
||||
algoliasearch@5.50.0:
|
||||
resolution: {integrity: sha512-yE5I83Q2s8euVou8Y3feXK08wyZInJWLYXgWO6Xti9jBUEZAGUahyeQ7wSZWkifLWVnQVKEz5RAmBlXG5nqxog==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
ansi-align@3.0.1:
|
||||
|
|
@ -2046,8 +2049,8 @@ packages:
|
|||
balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
|
||||
baseline-browser-mapping@2.10.10:
|
||||
resolution: {integrity: sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==}
|
||||
baseline-browser-mapping@2.10.12:
|
||||
resolution: {integrity: sha512-qyq26DxfY4awP2gIRXhhLWfwzwI+N5Nxk6iQi8EFizIaWIjqicQTE4sLnZZVdeKPRcVNoJOkkpfzoIYuvCKaIQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
|
||||
|
|
@ -2079,8 +2082,8 @@ packages:
|
|||
resolution: {integrity: sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
||||
brace-expansion@1.1.12:
|
||||
resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==}
|
||||
brace-expansion@1.1.13:
|
||||
resolution: {integrity: sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==}
|
||||
|
||||
braces@3.0.3:
|
||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||
|
|
@ -2148,8 +2151,8 @@ packages:
|
|||
caniuse-api@3.0.0:
|
||||
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
|
||||
|
||||
caniuse-lite@1.0.30001780:
|
||||
resolution: {integrity: sha512-llngX0E7nQci5BPJDqoZSbuZ5Bcs9F5db7EtgfwBerX9XGtkkiO4NwfDDIRzHTTwcYC8vC7bmeUEPGrKlR/TkQ==}
|
||||
caniuse-lite@1.0.30001782:
|
||||
resolution: {integrity: sha512-dZcaJLJeDMh4rELYFw1tvSn1bhZWYFOt468FcbHHxx/Z/dFidd1I6ciyFdi3iwfQCyOjqo9upF6lGQYtMiJWxw==}
|
||||
|
||||
ccount@2.0.1:
|
||||
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
|
||||
|
|
@ -2793,8 +2796,8 @@ packages:
|
|||
ee-first@1.1.1:
|
||||
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
|
||||
|
||||
electron-to-chromium@1.5.321:
|
||||
resolution: {integrity: sha512-L2C7Q279W2D/J4PLZLk7sebOILDSWos7bMsMNN06rK482umHUrh/3lM8G7IlHFOYip2oAg5nha1rCMxr/rs6ZQ==}
|
||||
electron-to-chromium@1.5.328:
|
||||
resolution: {integrity: sha512-QNQ5l45DzYytThO21403XN3FvK0hOkWDG8viNf6jqS42msJ8I4tGDSpBCgvDRRPnkffafiwAym2X2eHeGD2V0w==}
|
||||
|
||||
emoji-regex@8.0.0:
|
||||
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
|
||||
|
|
@ -3536,8 +3539,8 @@ packages:
|
|||
jsonfile@6.2.0:
|
||||
resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==}
|
||||
|
||||
katex@0.16.40:
|
||||
resolution: {integrity: sha512-1DJcK/L05k1Y9Gf7wMcyuqFOL6BiY3vY0CFcAM/LPRN04NALxcl6u7lOWNsp3f/bCHWxigzQl6FbR95XJ4R84Q==}
|
||||
katex@0.16.44:
|
||||
resolution: {integrity: sha512-EkxoDTk8ufHqHlf9QxGwcxeLkWRR3iOuYfRpfORgYfqc8s13bgb+YtRY59NK5ZpRaCwq1kqA6a5lpX8C/eLphQ==}
|
||||
hasBin: true
|
||||
|
||||
keyv@4.5.4:
|
||||
|
|
@ -3899,8 +3902,8 @@ packages:
|
|||
resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
|
||||
mini-css-extract-plugin@2.10.1:
|
||||
resolution: {integrity: sha512-k7G3Y5QOegl380tXmZ68foBRRjE9Ljavx835ObdvmZjQ639izvZD8CS7BkWw1qKPPzHsGL/JDhl0uyU1zc2rJw==}
|
||||
mini-css-extract-plugin@2.10.2:
|
||||
resolution: {integrity: sha512-AOSS0IdEB95ayVkxn5oGzNQwqAi2J0Jb/kKm43t7H73s8+f5873g0yuj0PNvK4dO75mu5DHg4nlgp4k6Kga8eg==}
|
||||
engines: {node: '>= 12.13.0'}
|
||||
peerDependencies:
|
||||
webpack: ^5.0.0
|
||||
|
|
@ -4110,8 +4113,8 @@ packages:
|
|||
path-parse@1.0.7:
|
||||
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
|
||||
|
||||
path-to-regexp@0.1.12:
|
||||
resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==}
|
||||
path-to-regexp@0.1.13:
|
||||
resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==}
|
||||
|
||||
path-to-regexp@1.9.0:
|
||||
resolution: {integrity: sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==}
|
||||
|
|
@ -4129,8 +4132,8 @@ packages:
|
|||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
|
||||
picomatch@2.3.1:
|
||||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
picomatch@2.3.2:
|
||||
resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
|
||||
engines: {node: '>=8.6'}
|
||||
|
||||
pkg-dir@7.0.0:
|
||||
|
|
@ -4639,8 +4642,8 @@ packages:
|
|||
peerDependencies:
|
||||
react: ^18.0.0 || ^19.0.0
|
||||
|
||||
react-loadable-ssr-addon-v5-slorber@1.0.1:
|
||||
resolution: {integrity: sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==}
|
||||
react-loadable-ssr-addon-v5-slorber@1.0.3:
|
||||
resolution: {integrity: sha512-GXfh9VLwB5ERaCsU6RULh7tkemeX15aNh6wuMEBtfdyMa7fFG8TXrhXlx1SoEK2Ty/l6XIkzzYIQmyaWW3JgdQ==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
peerDependencies:
|
||||
react-loadable: '*'
|
||||
|
|
@ -5094,8 +5097,8 @@ packages:
|
|||
engines: {node: '>=14.0.0'}
|
||||
hasBin: true
|
||||
|
||||
tapable@2.3.0:
|
||||
resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==}
|
||||
tapable@2.3.2:
|
||||
resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
terser-webpack-plugin@5.4.0:
|
||||
|
|
@ -5488,113 +5491,113 @@ packages:
|
|||
|
||||
snapshots:
|
||||
|
||||
'@algolia/abtesting@1.15.2':
|
||||
'@algolia/abtesting@1.16.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/autocomplete-core@1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)(search-insights@2.17.3)':
|
||||
'@algolia/autocomplete-core@1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)(search-insights@2.17.3)':
|
||||
dependencies:
|
||||
'@algolia/autocomplete-plugin-algolia-insights': 1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)(search-insights@2.17.3)
|
||||
'@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)
|
||||
'@algolia/autocomplete-plugin-algolia-insights': 1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)(search-insights@2.17.3)
|
||||
'@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- algoliasearch
|
||||
- search-insights
|
||||
|
||||
'@algolia/autocomplete-plugin-algolia-insights@1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)(search-insights@2.17.3)':
|
||||
'@algolia/autocomplete-plugin-algolia-insights@1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)(search-insights@2.17.3)':
|
||||
dependencies:
|
||||
'@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)
|
||||
'@algolia/autocomplete-shared': 1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)
|
||||
search-insights: 2.17.3
|
||||
transitivePeerDependencies:
|
||||
- '@algolia/client-search'
|
||||
- algoliasearch
|
||||
|
||||
'@algolia/autocomplete-shared@1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)':
|
||||
'@algolia/autocomplete-shared@1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)':
|
||||
dependencies:
|
||||
'@algolia/client-search': 5.49.2
|
||||
algoliasearch: 5.49.2
|
||||
'@algolia/client-search': 5.50.0
|
||||
algoliasearch: 5.50.0
|
||||
|
||||
'@algolia/client-abtesting@5.49.2':
|
||||
'@algolia/client-abtesting@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/client-analytics@5.49.2':
|
||||
'@algolia/client-analytics@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/client-common@5.49.2': {}
|
||||
'@algolia/client-common@5.50.0': {}
|
||||
|
||||
'@algolia/client-insights@5.49.2':
|
||||
'@algolia/client-insights@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/client-personalization@5.49.2':
|
||||
'@algolia/client-personalization@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/client-query-suggestions@5.49.2':
|
||||
'@algolia/client-query-suggestions@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/client-search@5.49.2':
|
||||
'@algolia/client-search@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/events@4.0.1': {}
|
||||
|
||||
'@algolia/ingestion@1.49.2':
|
||||
'@algolia/ingestion@1.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/monitoring@1.49.2':
|
||||
'@algolia/monitoring@1.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/recommend@5.49.2':
|
||||
'@algolia/recommend@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
'@algolia/requester-browser-xhr@5.49.2':
|
||||
'@algolia/requester-browser-xhr@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
|
||||
'@algolia/requester-fetch@5.49.2':
|
||||
'@algolia/requester-fetch@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
|
||||
'@algolia/requester-node-http@5.49.2':
|
||||
'@algolia/requester-node-http@5.50.0':
|
||||
dependencies:
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/client-common': 5.50.0
|
||||
|
||||
'@antfu/install-pkg@1.1.0':
|
||||
dependencies:
|
||||
|
|
@ -6687,19 +6690,19 @@ snapshots:
|
|||
|
||||
'@discoveryjs/json-ext@0.5.7': {}
|
||||
|
||||
'@docsearch/core@4.6.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)':
|
||||
'@docsearch/core@4.6.2(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)':
|
||||
optionalDependencies:
|
||||
'@types/react': 19.2.14
|
||||
react: 19.2.4
|
||||
react-dom: 19.2.4(react@19.2.4)
|
||||
|
||||
'@docsearch/css@4.6.0': {}
|
||||
'@docsearch/css@4.6.2': {}
|
||||
|
||||
'@docsearch/react@4.6.0(@algolia/client-search@5.49.2)(@types/react@19.2.14)(algoliasearch@5.49.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)':
|
||||
'@docsearch/react@4.6.2(@algolia/client-search@5.50.0)(@types/react@19.2.14)(algoliasearch@5.50.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)':
|
||||
dependencies:
|
||||
'@algolia/autocomplete-core': 1.19.2(@algolia/client-search@5.49.2)(algoliasearch@5.49.2)(search-insights@2.17.3)
|
||||
'@docsearch/core': 4.6.0(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
'@docsearch/css': 4.6.0
|
||||
'@algolia/autocomplete-core': 1.19.2(@algolia/client-search@5.50.0)(algoliasearch@5.50.0)(search-insights@2.17.3)
|
||||
'@docsearch/core': 4.6.2(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
'@docsearch/css': 4.6.2
|
||||
optionalDependencies:
|
||||
'@types/react': 19.2.14
|
||||
react: 19.2.4
|
||||
|
|
@ -6751,7 +6754,7 @@ snapshots:
|
|||
cssnano: 6.1.2(postcss@8.5.8)
|
||||
file-loader: 6.2.0(webpack@5.105.4)
|
||||
html-minifier-terser: 7.2.0
|
||||
mini-css-extract-plugin: 2.10.1(webpack@5.105.4)
|
||||
mini-css-extract-plugin: 2.10.2(webpack@5.105.4)
|
||||
null-loader: 4.0.1(webpack@5.105.4)
|
||||
postcss: 8.5.8
|
||||
postcss-loader: 7.3.4(postcss@8.5.8)(typescript@5.6.3)(webpack@5.105.4)
|
||||
|
|
@ -6810,7 +6813,7 @@ snapshots:
|
|||
react-dom: 19.2.4(react@19.2.4)
|
||||
react-helmet-async: '@slorber/react-helmet-async@1.3.0(react-dom@19.2.4(react@19.2.4))(react@19.2.4)'
|
||||
react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.4)'
|
||||
react-loadable-ssr-addon-v5-slorber: 1.0.1(@docusaurus/react-loadable@6.0.0(react@19.2.4))(webpack@5.105.4)
|
||||
react-loadable-ssr-addon-v5-slorber: 1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.4))(webpack@5.105.4)
|
||||
react-router: 5.3.4(react@19.2.4)
|
||||
react-router-config: 5.1.1(react-router@5.3.4(react@19.2.4))(react@19.2.4)
|
||||
react-router-dom: 5.3.4(react@19.2.4)
|
||||
|
|
@ -7211,7 +7214,7 @@ snapshots:
|
|||
- utf-8-validate
|
||||
- webpack-cli
|
||||
|
||||
'@docusaurus/preset-classic@3.9.2(@algolia/client-search@5.49.2)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)':
|
||||
'@docusaurus/preset-classic@3.9.2(@algolia/client-search@5.50.0)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@docusaurus/core': 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
'@docusaurus/plugin-content-blog': 3.9.2(@docusaurus/plugin-content-docs@3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3))(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
|
|
@ -7226,7 +7229,7 @@ snapshots:
|
|||
'@docusaurus/plugin-svgr': 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
'@docusaurus/theme-classic': 3.9.2(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
'@docusaurus/theme-common': 3.9.2(@docusaurus/plugin-content-docs@3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
'@docusaurus/theme-search-algolia': 3.9.2(@algolia/client-search@5.49.2)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)
|
||||
'@docusaurus/theme-search-algolia': 3.9.2(@algolia/client-search@5.50.0)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)
|
||||
'@docusaurus/types': 3.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
react: 19.2.4
|
||||
react-dom: 19.2.4(react@19.2.4)
|
||||
|
|
@ -7357,9 +7360,9 @@ snapshots:
|
|||
- utf-8-validate
|
||||
- webpack-cli
|
||||
|
||||
'@docusaurus/theme-search-algolia@3.9.2(@algolia/client-search@5.49.2)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)':
|
||||
'@docusaurus/theme-search-algolia@3.9.2(@algolia/client-search@5.50.0)(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(@types/react@19.2.14)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@docsearch/react': 4.6.0(@algolia/client-search@5.49.2)(@types/react@19.2.14)(algoliasearch@5.49.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)
|
||||
'@docsearch/react': 4.6.2(@algolia/client-search@5.50.0)(@types/react@19.2.14)(algoliasearch@5.50.0)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(search-insights@2.17.3)
|
||||
'@docusaurus/core': 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
'@docusaurus/logger': 3.9.2
|
||||
'@docusaurus/plugin-content-docs': 3.9.2(@mdx-js/react@3.1.1(@types/react@19.2.14)(react@19.2.4))(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@5.6.3)
|
||||
|
|
@ -7367,8 +7370,8 @@ snapshots:
|
|||
'@docusaurus/theme-translations': 3.9.2
|
||||
'@docusaurus/utils': 3.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
'@docusaurus/utils-validation': 3.9.2(react-dom@19.2.4(react@19.2.4))(react@19.2.4)
|
||||
algoliasearch: 5.49.2
|
||||
algoliasearch-helper: 3.28.0(algoliasearch@5.49.2)
|
||||
algoliasearch: 5.50.0
|
||||
algoliasearch-helper: 3.28.1(algoliasearch@5.50.0)
|
||||
clsx: 2.1.1
|
||||
eta: 2.2.0
|
||||
fs-extra: 11.3.4
|
||||
|
|
@ -8385,27 +8388,27 @@ snapshots:
|
|||
json-schema-traverse: 1.0.0
|
||||
require-from-string: 2.0.2
|
||||
|
||||
algoliasearch-helper@3.28.0(algoliasearch@5.49.2):
|
||||
algoliasearch-helper@3.28.1(algoliasearch@5.50.0):
|
||||
dependencies:
|
||||
'@algolia/events': 4.0.1
|
||||
algoliasearch: 5.49.2
|
||||
algoliasearch: 5.50.0
|
||||
|
||||
algoliasearch@5.49.2:
|
||||
algoliasearch@5.50.0:
|
||||
dependencies:
|
||||
'@algolia/abtesting': 1.15.2
|
||||
'@algolia/client-abtesting': 5.49.2
|
||||
'@algolia/client-analytics': 5.49.2
|
||||
'@algolia/client-common': 5.49.2
|
||||
'@algolia/client-insights': 5.49.2
|
||||
'@algolia/client-personalization': 5.49.2
|
||||
'@algolia/client-query-suggestions': 5.49.2
|
||||
'@algolia/client-search': 5.49.2
|
||||
'@algolia/ingestion': 1.49.2
|
||||
'@algolia/monitoring': 1.49.2
|
||||
'@algolia/recommend': 5.49.2
|
||||
'@algolia/requester-browser-xhr': 5.49.2
|
||||
'@algolia/requester-fetch': 5.49.2
|
||||
'@algolia/requester-node-http': 5.49.2
|
||||
'@algolia/abtesting': 1.16.0
|
||||
'@algolia/client-abtesting': 5.50.0
|
||||
'@algolia/client-analytics': 5.50.0
|
||||
'@algolia/client-common': 5.50.0
|
||||
'@algolia/client-insights': 5.50.0
|
||||
'@algolia/client-personalization': 5.50.0
|
||||
'@algolia/client-query-suggestions': 5.50.0
|
||||
'@algolia/client-search': 5.50.0
|
||||
'@algolia/ingestion': 1.50.0
|
||||
'@algolia/monitoring': 1.50.0
|
||||
'@algolia/recommend': 5.50.0
|
||||
'@algolia/requester-browser-xhr': 5.50.0
|
||||
'@algolia/requester-fetch': 5.50.0
|
||||
'@algolia/requester-node-http': 5.50.0
|
||||
|
||||
ansi-align@3.0.1:
|
||||
dependencies:
|
||||
|
|
@ -8430,7 +8433,7 @@ snapshots:
|
|||
anymatch@3.1.3:
|
||||
dependencies:
|
||||
normalize-path: 3.0.0
|
||||
picomatch: 2.3.1
|
||||
picomatch: 2.3.2
|
||||
|
||||
arg@5.0.2: {}
|
||||
|
||||
|
|
@ -8455,7 +8458,7 @@ snapshots:
|
|||
autoprefixer@10.4.27(postcss@8.5.8):
|
||||
dependencies:
|
||||
browserslist: 4.28.1
|
||||
caniuse-lite: 1.0.30001780
|
||||
caniuse-lite: 1.0.30001782
|
||||
fraction.js: 5.3.4
|
||||
picocolors: 1.1.1
|
||||
postcss: 8.5.8
|
||||
|
|
@ -8508,7 +8511,7 @@ snapshots:
|
|||
|
||||
balanced-match@1.0.2: {}
|
||||
|
||||
baseline-browser-mapping@2.10.10: {}
|
||||
baseline-browser-mapping@2.10.12: {}
|
||||
|
||||
batch@0.6.1: {}
|
||||
|
||||
|
|
@ -8562,7 +8565,7 @@ snapshots:
|
|||
widest-line: 4.0.1
|
||||
wrap-ansi: 8.1.0
|
||||
|
||||
brace-expansion@1.1.12:
|
||||
brace-expansion@1.1.13:
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
concat-map: 0.0.1
|
||||
|
|
@ -8573,9 +8576,9 @@ snapshots:
|
|||
|
||||
browserslist@4.28.1:
|
||||
dependencies:
|
||||
baseline-browser-mapping: 2.10.10
|
||||
caniuse-lite: 1.0.30001780
|
||||
electron-to-chromium: 1.5.321
|
||||
baseline-browser-mapping: 2.10.12
|
||||
caniuse-lite: 1.0.30001782
|
||||
electron-to-chromium: 1.5.328
|
||||
node-releases: 2.0.36
|
||||
update-browserslist-db: 1.2.3(browserslist@4.28.1)
|
||||
|
||||
|
|
@ -8634,11 +8637,11 @@ snapshots:
|
|||
caniuse-api@3.0.0:
|
||||
dependencies:
|
||||
browserslist: 4.28.1
|
||||
caniuse-lite: 1.0.30001780
|
||||
caniuse-lite: 1.0.30001782
|
||||
lodash.memoize: 4.1.2
|
||||
lodash.uniq: 4.5.0
|
||||
|
||||
caniuse-lite@1.0.30001780: {}
|
||||
caniuse-lite@1.0.30001782: {}
|
||||
|
||||
ccount@2.0.1: {}
|
||||
|
||||
|
|
@ -9323,7 +9326,7 @@ snapshots:
|
|||
|
||||
ee-first@1.1.1: {}
|
||||
|
||||
electron-to-chromium@1.5.321: {}
|
||||
electron-to-chromium@1.5.328: {}
|
||||
|
||||
emoji-regex@8.0.0: {}
|
||||
|
||||
|
|
@ -9340,7 +9343,7 @@ snapshots:
|
|||
enhanced-resolve@5.20.1:
|
||||
dependencies:
|
||||
graceful-fs: 4.2.11
|
||||
tapable: 2.3.0
|
||||
tapable: 2.3.2
|
||||
|
||||
entities@2.2.0: {}
|
||||
|
||||
|
|
@ -9488,7 +9491,7 @@ snapshots:
|
|||
methods: 1.1.2
|
||||
on-finished: 2.4.1
|
||||
parseurl: 1.3.3
|
||||
path-to-regexp: 0.1.12
|
||||
path-to-regexp: 0.1.13
|
||||
proxy-addr: 2.0.7
|
||||
qs: 6.14.2
|
||||
range-parser: 1.2.1
|
||||
|
|
@ -9858,7 +9861,7 @@ snapshots:
|
|||
html-minifier-terser: 6.1.0
|
||||
lodash: 4.17.23
|
||||
pretty-error: 4.0.0
|
||||
tapable: 2.3.0
|
||||
tapable: 2.3.2
|
||||
optionalDependencies:
|
||||
webpack: 5.105.4
|
||||
|
||||
|
|
@ -10075,7 +10078,7 @@ snapshots:
|
|||
chalk: 4.1.2
|
||||
ci-info: 3.9.0
|
||||
graceful-fs: 4.2.11
|
||||
picomatch: 2.3.1
|
||||
picomatch: 2.3.2
|
||||
|
||||
jest-worker@27.5.1:
|
||||
dependencies:
|
||||
|
|
@ -10129,7 +10132,7 @@ snapshots:
|
|||
optionalDependencies:
|
||||
graceful-fs: 4.2.11
|
||||
|
||||
katex@0.16.40:
|
||||
katex@0.16.44:
|
||||
dependencies:
|
||||
commander: 8.3.0
|
||||
|
||||
|
|
@ -10452,7 +10455,7 @@ snapshots:
|
|||
dagre-d3-es: 7.0.14
|
||||
dayjs: 1.11.20
|
||||
dompurify: 3.3.3
|
||||
katex: 0.16.40
|
||||
katex: 0.16.44
|
||||
khroma: 2.1.0
|
||||
lodash-es: 4.17.23
|
||||
marked: 16.4.2
|
||||
|
|
@ -10761,7 +10764,7 @@ snapshots:
|
|||
micromatch@4.0.8:
|
||||
dependencies:
|
||||
braces: 3.0.3
|
||||
picomatch: 2.3.1
|
||||
picomatch: 2.3.2
|
||||
|
||||
mime-db@1.33.0: {}
|
||||
|
||||
|
|
@ -10789,17 +10792,17 @@ snapshots:
|
|||
|
||||
mimic-response@4.0.0: {}
|
||||
|
||||
mini-css-extract-plugin@2.10.1(webpack@5.105.4):
|
||||
mini-css-extract-plugin@2.10.2(webpack@5.105.4):
|
||||
dependencies:
|
||||
schema-utils: 4.3.3
|
||||
tapable: 2.3.0
|
||||
tapable: 2.3.2
|
||||
webpack: 5.105.4
|
||||
|
||||
minimalistic-assert@1.0.1: {}
|
||||
|
||||
minimatch@3.1.5:
|
||||
dependencies:
|
||||
brace-expansion: 1.1.12
|
||||
brace-expansion: 1.1.13
|
||||
|
||||
minimist@1.2.8: {}
|
||||
|
||||
|
|
@ -10999,7 +11002,7 @@ snapshots:
|
|||
|
||||
path-parse@1.0.7: {}
|
||||
|
||||
path-to-regexp@0.1.12: {}
|
||||
path-to-regexp@0.1.13: {}
|
||||
|
||||
path-to-regexp@1.9.0:
|
||||
dependencies:
|
||||
|
|
@ -11013,7 +11016,7 @@ snapshots:
|
|||
|
||||
picocolors@1.1.1: {}
|
||||
|
||||
picomatch@2.3.1: {}
|
||||
picomatch@2.3.2: {}
|
||||
|
||||
pkg-dir@7.0.0:
|
||||
dependencies:
|
||||
|
|
@ -11574,7 +11577,7 @@ snapshots:
|
|||
dependencies:
|
||||
react: 19.2.4
|
||||
|
||||
react-loadable-ssr-addon-v5-slorber@1.0.1(@docusaurus/react-loadable@6.0.0(react@19.2.4))(webpack@5.105.4):
|
||||
react-loadable-ssr-addon-v5-slorber@1.0.3(@docusaurus/react-loadable@6.0.0(react@19.2.4))(webpack@5.105.4):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.29.2
|
||||
react-loadable: '@docusaurus/react-loadable@6.0.0(react@19.2.4)'
|
||||
|
|
@ -11630,7 +11633,7 @@ snapshots:
|
|||
|
||||
readdirp@3.6.0:
|
||||
dependencies:
|
||||
picomatch: 2.3.1
|
||||
picomatch: 2.3.2
|
||||
|
||||
recma-build-jsx@1.0.0:
|
||||
dependencies:
|
||||
|
|
@ -12155,7 +12158,7 @@ snapshots:
|
|||
picocolors: 1.1.1
|
||||
sax: 1.6.0
|
||||
|
||||
tapable@2.3.0: {}
|
||||
tapable@2.3.2: {}
|
||||
|
||||
terser-webpack-plugin@5.4.0(webpack@5.105.4):
|
||||
dependencies:
|
||||
|
|
@ -12493,7 +12496,7 @@ snapshots:
|
|||
mime-types: 2.1.35
|
||||
neo-async: 2.6.2
|
||||
schema-utils: 4.3.3
|
||||
tapable: 2.3.0
|
||||
tapable: 2.3.2
|
||||
terser-webpack-plugin: 5.4.0(webpack@5.105.4)
|
||||
watchpack: 2.5.1
|
||||
webpack-sources: 3.3.4
|
||||
|
|
|
|||
217
docs/src/pages/swagger.tsx
Normal file
217
docs/src/pages/swagger.tsx
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
import Layout from "@theme/Layout";
|
||||
import BrowserOnly from "@docusaurus/BrowserOnly";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import { useState, useEffect, useRef, useCallback } from "react";
|
||||
|
||||
const STORAGE_KEY = "b4-swagger-base-url";
|
||||
|
||||
function buildSwaggerHtml(specUrl: string, server: string): string {
|
||||
const serverScript = server
|
||||
? `
|
||||
const parsed = new URL(${JSON.stringify(server)});
|
||||
spec.host = parsed.host;
|
||||
spec.basePath = "/api";
|
||||
spec.schemes = [parsed.protocol.replace(":", "")];`
|
||||
: "";
|
||||
|
||||
return `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css"/>
|
||||
<style>body { margin: 0; } .swagger-ui .topbar { display: none; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
|
||||
<script>
|
||||
fetch(${JSON.stringify(specUrl)})
|
||||
.then(r => r.json())
|
||||
.then(spec => {${serverScript}
|
||||
SwaggerUIBundle({ spec, dom_id: "#swagger-ui" });
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>`;
|
||||
}
|
||||
|
||||
function SwaggerUILoader() {
|
||||
const latestSpecUrl = useBaseUrl("/swagger.json");
|
||||
const versionsIndexUrl = useBaseUrl("/swagger-versions/index.json");
|
||||
const versionsBaseUrl = useBaseUrl("/swagger-versions/");
|
||||
|
||||
const iframeRef = useRef<HTMLIFrameElement>(null);
|
||||
const [baseUrl, setBaseUrl] = useState(
|
||||
() => (typeof window !== "undefined" ? localStorage.getItem(STORAGE_KEY) : "") || ""
|
||||
);
|
||||
const [inputValue, setInputValue] = useState(baseUrl);
|
||||
const [versions, setVersions] = useState([]);
|
||||
const [selectedVersion, setSelectedVersion] = useState("latest");
|
||||
|
||||
useEffect(() => {
|
||||
fetch(versionsIndexUrl)
|
||||
.then((r) => (r.ok ? r.json() : []))
|
||||
.then((v) => setVersions(v))
|
||||
.catch(() => {});
|
||||
}, [versionsIndexUrl]);
|
||||
|
||||
const getSpecUrl = useCallback(
|
||||
(version: string) =>
|
||||
version === "latest"
|
||||
? latestSpecUrl
|
||||
: `${versionsBaseUrl}${version}.json`,
|
||||
[latestSpecUrl, versionsBaseUrl]
|
||||
);
|
||||
|
||||
const renderSwagger = useCallback(
|
||||
(specUrl: string, server: string) => {
|
||||
const iframe = iframeRef.current;
|
||||
if (!iframe) return;
|
||||
const html = buildSwaggerHtml(specUrl, server);
|
||||
iframe.srcdoc = html;
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
renderSwagger(getSpecUrl(selectedVersion), baseUrl);
|
||||
}, []);
|
||||
|
||||
function handleConnect() {
|
||||
const url = inputValue.trim();
|
||||
setBaseUrl(url);
|
||||
if (url) {
|
||||
localStorage.setItem(STORAGE_KEY, url);
|
||||
} else {
|
||||
localStorage.removeItem(STORAGE_KEY);
|
||||
}
|
||||
renderSwagger(getSpecUrl(selectedVersion), url);
|
||||
}
|
||||
|
||||
function handleDisconnect() {
|
||||
setInputValue("");
|
||||
setBaseUrl("");
|
||||
localStorage.removeItem(STORAGE_KEY);
|
||||
renderSwagger(getSpecUrl(selectedVersion), "");
|
||||
}
|
||||
|
||||
function handleVersionChange(version: string) {
|
||||
setSelectedVersion(version);
|
||||
renderSwagger(getSpecUrl(version), baseUrl);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
gap: "0.5rem",
|
||||
padding: "0.75rem 1rem",
|
||||
marginBottom: "0",
|
||||
background: "var(--ifm-color-emphasis-100)",
|
||||
borderRadius: "var(--ifm-border-radius)",
|
||||
flexWrap: "wrap",
|
||||
}}
|
||||
>
|
||||
<label style={{ fontWeight: 600, whiteSpace: "nowrap" }}>
|
||||
B4 Instance:
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
onKeyDown={(e) => e.key === "Enter" && handleConnect()}
|
||||
placeholder="http://192.168.1.1:7000"
|
||||
style={{
|
||||
flex: 1,
|
||||
minWidth: "200px",
|
||||
padding: "0.4rem 0.6rem",
|
||||
border: "1px solid var(--ifm-color-emphasis-300)",
|
||||
borderRadius: "var(--ifm-border-radius)",
|
||||
fontSize: "0.9rem",
|
||||
fontFamily: "monospace",
|
||||
}}
|
||||
/>
|
||||
<button
|
||||
onClick={handleConnect}
|
||||
className="button button--primary button--sm"
|
||||
>
|
||||
{baseUrl ? "Reconnect" : "Connect"}
|
||||
</button>
|
||||
{baseUrl && (
|
||||
<button
|
||||
onClick={handleDisconnect}
|
||||
className="button button--outline button--secondary button--sm"
|
||||
>
|
||||
Disconnect
|
||||
</button>
|
||||
)}
|
||||
<span
|
||||
style={{
|
||||
fontSize: "0.8rem",
|
||||
color: baseUrl
|
||||
? "var(--ifm-color-success)"
|
||||
: "var(--ifm-color-emphasis-600)",
|
||||
}}
|
||||
>
|
||||
{baseUrl
|
||||
? `Connected to ${baseUrl}`
|
||||
: "Read-only mode (no API calls)"}
|
||||
</span>
|
||||
|
||||
{versions.length > 0 && (
|
||||
<>
|
||||
<div
|
||||
style={{
|
||||
width: "1px",
|
||||
height: "1.5rem",
|
||||
background: "var(--ifm-color-emphasis-300)",
|
||||
margin: "0 0.25rem",
|
||||
}}
|
||||
/>
|
||||
<label style={{ fontWeight: 600, whiteSpace: "nowrap" }}>
|
||||
API Version:
|
||||
</label>
|
||||
<select
|
||||
value={selectedVersion}
|
||||
onChange={(e) => handleVersionChange(e.target.value)}
|
||||
style={{
|
||||
padding: "0.4rem 0.6rem",
|
||||
border: "1px solid var(--ifm-color-emphasis-300)",
|
||||
borderRadius: "var(--ifm-border-radius)",
|
||||
fontSize: "0.9rem",
|
||||
}}
|
||||
>
|
||||
<option value="latest">latest</option>
|
||||
{versions.map((v: string) => (
|
||||
<option key={v} value={v}>
|
||||
{v}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<iframe
|
||||
ref={iframeRef}
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "calc(100vh - 120px)",
|
||||
border: "none",
|
||||
}}
|
||||
title="Swagger UI"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function SwaggerPage() {
|
||||
return (
|
||||
<Layout title="API Reference" description="B4 REST API documentation">
|
||||
<main style={{ padding: "1rem" }}>
|
||||
<BrowserOnly>{() => <SwaggerUILoader />}</BrowserOnly>
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
3
docs/static/swagger-versions/index.json
vendored
Normal file
3
docs/static/swagger-versions/index.json
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
"v1.46.6"
|
||||
]
|
||||
3959
docs/static/swagger-versions/v1.46.6.json
vendored
Normal file
3959
docs/static/swagger-versions/v1.46.6.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
173
src/docs/docs.go → docs/static/swagger.json
vendored
173
src/docs/docs.go → docs/static/swagger.json
vendored
|
|
@ -1,19 +1,12 @@
|
|||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"description": "B4 network packet processor REST API",
|
||||
"title": "B4 API",
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"basePath": "/api",
|
||||
"paths": {
|
||||
"/asn": {
|
||||
"get": {
|
||||
|
|
@ -1942,6 +1935,106 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/mtproto/config": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Get MTProto configuration",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Update MTProto configuration",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "MTProto configuration",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/config.MTProtoConfig"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/mtproto/generate-secret": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Generate MTProto secret",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "fake_sni field required",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sets": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
|
@ -2705,6 +2798,12 @@ const docTemplate = `{
|
|||
"config_propagate_ms": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_flow_mark": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_injected_mark": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_timeout": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
@ -2940,6 +3039,29 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"config.MTProtoConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bind_address": {
|
||||
"type": "string"
|
||||
},
|
||||
"dc_relay": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fake_sni": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"config.QueueConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -2959,6 +3081,7 @@ const docTemplate = `{
|
|||
"type": "boolean"
|
||||
},
|
||||
"mark": {
|
||||
"description": "Main injected packets mark",
|
||||
"type": "integer"
|
||||
},
|
||||
"mss_clamp": {
|
||||
|
|
@ -3105,6 +3228,9 @@ const docTemplate = `{
|
|||
"logging": {
|
||||
"$ref": "#/definitions/config.Logging"
|
||||
},
|
||||
"mtproto": {
|
||||
"$ref": "#/definitions/config.MTProtoConfig"
|
||||
},
|
||||
"socks5": {
|
||||
"$ref": "#/definitions/config.Socks5Config"
|
||||
},
|
||||
|
|
@ -3271,9 +3397,6 @@ const docTemplate = `{
|
|||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"swagger": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tls_cert": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -3833,22 +3956,4 @@ const docTemplate = `{
|
|||
"in": "header"
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "1.0",
|
||||
Host: "",
|
||||
BasePath: "/api",
|
||||
Schemes: []string{},
|
||||
Title: "B4 API",
|
||||
Description: "B4 network packet processor REST API",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
||||
}
|
||||
|
|
@ -203,7 +203,6 @@ type WebServerConfig struct {
|
|||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Language string `json:"language"`
|
||||
Swagger bool `json:"swagger"`
|
||||
IsEnabled bool `json:"-"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"description": "B4 network packet processor REST API",
|
||||
"title": "B4 API",
|
||||
"contact": {},
|
||||
"version": "1.0"
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"basePath": "/api",
|
||||
"paths": {
|
||||
|
|
@ -1935,6 +1935,106 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/mtproto/config": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Get MTProto configuration",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Update MTProto configuration",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "MTProto configuration",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/config.MTProtoConfig"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/mtproto/generate-secret": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"MTProto"
|
||||
],
|
||||
"summary": "Generate MTProto secret",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "fake_sni field required",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sets": {
|
||||
"get": {
|
||||
"security": [
|
||||
|
|
@ -2698,6 +2798,12 @@
|
|||
"config_propagate_ms": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_flow_mark": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_injected_mark": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discovery_timeout": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
@ -2933,6 +3039,29 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"config.MTProtoConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bind_address": {
|
||||
"type": "string"
|
||||
},
|
||||
"dc_relay": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"fake_sni": {
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"config.QueueConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -2952,6 +3081,7 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"mark": {
|
||||
"description": "Main injected packets mark",
|
||||
"type": "integer"
|
||||
},
|
||||
"mss_clamp": {
|
||||
|
|
@ -3098,6 +3228,9 @@
|
|||
"logging": {
|
||||
"$ref": "#/definitions/config.Logging"
|
||||
},
|
||||
"mtproto": {
|
||||
"$ref": "#/definitions/config.MTProtoConfig"
|
||||
},
|
||||
"socks5": {
|
||||
"$ref": "#/definitions/config.Socks5Config"
|
||||
},
|
||||
|
|
@ -3264,9 +3397,6 @@
|
|||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"swagger": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tls_cert": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ definitions:
|
|||
properties:
|
||||
config_propagate_ms:
|
||||
type: integer
|
||||
discovery_flow_mark:
|
||||
type: integer
|
||||
discovery_injected_mark:
|
||||
type: integer
|
||||
discovery_timeout:
|
||||
type: integer
|
||||
reference_dns:
|
||||
|
|
@ -270,6 +274,21 @@ definitions:
|
|||
description: MSS value in bytes (e.g., 88)
|
||||
type: integer
|
||||
type: object
|
||||
config.MTProtoConfig:
|
||||
properties:
|
||||
bind_address:
|
||||
type: string
|
||||
dc_relay:
|
||||
type: string
|
||||
enabled:
|
||||
type: boolean
|
||||
fake_sni:
|
||||
type: string
|
||||
port:
|
||||
type: integer
|
||||
secret:
|
||||
type: string
|
||||
type: object
|
||||
config.QueueConfig:
|
||||
properties:
|
||||
devices:
|
||||
|
|
@ -283,6 +302,7 @@ definitions:
|
|||
ipv6:
|
||||
type: boolean
|
||||
mark:
|
||||
description: Main injected packets mark
|
||||
type: integer
|
||||
mss_clamp:
|
||||
$ref: '#/definitions/config.MSSClampConfig'
|
||||
|
|
@ -379,6 +399,8 @@ definitions:
|
|||
$ref: '#/definitions/config.GeoDatConfig'
|
||||
logging:
|
||||
$ref: '#/definitions/config.Logging'
|
||||
mtproto:
|
||||
$ref: '#/definitions/config.MTProtoConfig'
|
||||
socks5:
|
||||
$ref: '#/definitions/config.Socks5Config'
|
||||
tables:
|
||||
|
|
@ -490,8 +512,6 @@ definitions:
|
|||
type: string
|
||||
port:
|
||||
type: integer
|
||||
swagger:
|
||||
type: boolean
|
||||
tls_cert:
|
||||
type: string
|
||||
tls_key:
|
||||
|
|
@ -2038,6 +2058,67 @@ paths:
|
|||
summary: Get metrics summary
|
||||
tags:
|
||||
- Metrics
|
||||
/mtproto/config:
|
||||
get:
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Get MTProto configuration
|
||||
tags:
|
||||
- MTProto
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: MTProto configuration
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/config.MTProtoConfig'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Update MTProto configuration
|
||||
tags:
|
||||
- MTProto
|
||||
/mtproto/generate-secret:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: fake_sni field required
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Generate MTProto secret
|
||||
tags:
|
||||
- MTProto
|
||||
/sets:
|
||||
get:
|
||||
produces:
|
||||
|
|
|
|||
21
src/go.mod
21
src/go.mod
|
|
@ -4,22 +4,24 @@ go 1.25.3
|
|||
|
||||
require (
|
||||
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/spec v0.20.9 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.6 // indirect
|
||||
github.com/go-openapi/spec v0.20.4 // indirect
|
||||
github.com/go-openapi/swag v0.19.15 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/josharian/native v1.1.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/mdlayher/socket v0.4.1 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
github.com/swaggo/files/v2 v2.0.0 // indirect
|
||||
golang.org/x/mod v0.17.0 // indirect
|
||||
golang.org/x/mod v0.28.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
golang.org/x/text v0.30.0 // indirect
|
||||
golang.org/x/tools v0.37.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
@ -29,7 +31,6 @@ require (
|
|||
github.com/mdlayher/netlink v1.7.2
|
||||
github.com/spf13/cobra v1.10.1
|
||||
github.com/spf13/pflag v1.0.10
|
||||
github.com/swaggo/http-swagger/v2 v2.0.2
|
||||
github.com/swaggo/swag v1.16.6
|
||||
github.com/urlesistiana/v2dat v0.0.0-20221215035016-47b8ee51fb52
|
||||
github.com/yl2chen/cidranger v1.0.2
|
||||
|
|
|
|||
49
src/go.sum
49
src/go.sum
|
|
@ -1,5 +1,9 @@
|
|||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
|
@ -8,18 +12,15 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
|
|||
github.com/florianl/go-nfqueue v1.3.2 h1:8DPzhKJHywpHJAE/4ktgcqveCL7qmMLsEsVD68C4x4I=
|
||||
github.com/florianl/go-nfqueue v1.3.2/go.mod h1:eSnAor2YCfMCVYrVNEhkLGN/r1L+J4uDjc0EUy0tfq4=
|
||||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
|
||||
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
|
||||
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
|
||||
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
|
||||
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
|
||||
github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8=
|
||||
github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
|
||||
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
|
||||
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
|
||||
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
|
||||
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
||||
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
|
||||
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
|
|
@ -36,23 +37,21 @@ github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2C
|
|||
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
|
||||
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mdlayher/netlink v1.6.0/go.mod h1:0o3PlBmGst1xve7wQ7j/hwpNaFaH4qCRyWCdcZk8/vA=
|
||||
github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
|
||||
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
|
||||
github.com/mdlayher/socket v0.1.1/go.mod h1:mYV5YIZAfHh4dzDVzI8x8tWLWCliuX8Mon5Awbj+qDs=
|
||||
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
|
||||
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
|
|
@ -63,20 +62,11 @@ github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
|
|||
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/swaggo/files/v2 v2.0.0 h1:hmAt8Dkynw7Ssz46F6pn8ok6YmGZqHSVLZ+HQM7i0kw=
|
||||
github.com/swaggo/files/v2 v2.0.0/go.mod h1:24kk2Y9NYEJ5lHuCra6iVwkMjIekMCaFq/0JQj66kyM=
|
||||
github.com/swaggo/http-swagger/v2 v2.0.2 h1:FKCdLsl+sFCx60KFsyM0rDarwiUSZ8DqbfSyIKC9OBg=
|
||||
github.com/swaggo/http-swagger/v2 v2.0.2/go.mod h1:r7/GBkAWIfK6E/OLnE8fXnviHiDeAHmgIyooa4xm3AQ=
|
||||
github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI=
|
||||
github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg=
|
||||
github.com/urlesistiana/v2dat v0.0.0-20221215035016-47b8ee51fb52 h1:xGdRIe8tdY//BboFmQokkduaNf17YNQaWV25HEI1KR0=
|
||||
|
|
@ -85,8 +75,9 @@ github.com/yl2chen/cidranger v1.0.2 h1:lbOWZVCG1tCRX4u24kuM1Tb4nHqWkDxwLdoS+Seva
|
|||
github.com/yl2chen/cidranger v1.0.2/go.mod h1:9U1yz7WPYDwf0vpNWFaeRh0bjwz5RVgRy/9UEQfHl0g=
|
||||
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
|
||||
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
|
||||
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
|
||||
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=
|
||||
|
|
@ -95,6 +86,7 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
|
|
@ -106,18 +98,19 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
|
|||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
|
||||
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
|
|
|
|||
|
|
@ -10,12 +10,10 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/daniellavrushin/b4/config"
|
||||
_ "github.com/daniellavrushin/b4/docs"
|
||||
"github.com/daniellavrushin/b4/http/handler"
|
||||
"github.com/daniellavrushin/b4/http/ws"
|
||||
"github.com/daniellavrushin/b4/log"
|
||||
"github.com/daniellavrushin/b4/nfq"
|
||||
httpSwagger "github.com/swaggo/http-swagger/v2"
|
||||
)
|
||||
|
||||
//go:embed ui/dist/*
|
||||
|
|
@ -35,13 +33,6 @@ func StartServer(cfg *config.Config, pool *nfq.Pool) (*stdhttp.Server, error) {
|
|||
registerAPIEndpoints(mux, cfg)
|
||||
registerAuthEndpoints(mux, cfg)
|
||||
|
||||
if cfg.System.WebServer.Swagger {
|
||||
mux.Handle("/swagger/", httpSwagger.Handler(
|
||||
httpSwagger.URL("/swagger/doc.json"),
|
||||
))
|
||||
log.Infof("Swagger UI enabled at /swagger/")
|
||||
}
|
||||
|
||||
handler.RegisterSpa(mux, uiDist)
|
||||
|
||||
var httpHandler stdhttp.Handler = mux
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@ export default defineConfig({
|
|||
ws: true,
|
||||
secure: false,
|
||||
},
|
||||
"/swagger": {
|
||||
target: REMOTE_BACKEND,
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue