fix(config): 完成生产配置向 config.toml 的迁移

This commit is contained in:
2026-09-19 00:39:09 +08:00
parent 4599ea32b2
commit 045d598400
26 changed files with 908 additions and 254 deletions
+88
View File
@@ -0,0 +1,88 @@
# BlueArchive Toolkit shared application configuration.
# Priority: CLI flags > process environment > config.toml > built-in defaults.
# This file is the application configuration. The application never reads .env.
#
# Rust bat consumes [runtime], [resource], [localized], [repository], [network]
# and [translation.worker]. Go bat-api consumes [api]. Each binary ignores the
# other application's section.
[runtime]
state_dir = '/tmp/bat-pid'
interval_seconds = 3600
error_retry_seconds = 60
quiet_up_to_date = false
output_format = 'human'
banner = true
progress = true
tail_lines = 200
[resource]
output_root = './bat-resources'
auto_discover = true
app_version = ''
connection_group = ''
launcher_version = '1.7.2'
platforms = ['windows', 'android']
snapshot_path = ''
dry_run = false
plan = false
force = false
audit_local = true
repair = true
[resource.server_info]
kind = 'none'
value = ''
[localized]
output_root = './bat-localized'
[repository]
import_repository = false
import_cas_root = ''
import_resource_repository_path = ''
[network]
curl_command = 'curl'
proxy = 'auto'
unzip_command = 'unzip'
zip_command = 'zip'
download_concurrency = 8
[translation.worker]
provider = 'mock'
fixture = ''
translation_memory_path = ''
glossary_path = ''
concurrency = 8
max_attempts = 3
lease_seconds = 300
retry_backoff_seconds = 5
max_tasks = ''
worker_id = ''
[api]
listen = ':18080'
public_base_url = 'http://127.0.0.1:18080'
state_dir = '/tmp/bat-pid'
socket_path = ''
resource_root = ''
server_info_file = ''
require_indexed = true
verify_size = true
rpc_timeout = '30s'
refresh_interval = '1m'
auth_token = ''
auth_query_param = 'bat_token'
auth_exempt_paths = []
trust_proxy_headers = false
access_log = false
rate_limit_rps = 0
rate_limit_burst = 0
max_resource_page_limit = 1000
# Reserved for a future API persistence layer.
database_url = ''
database_password = ''
redis_url = ''
redis_password = ''