serverwatcher 1.dev4__py3-none-any.whl → 1.dev5__py3-none-any.whl

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.
serverwatcher/settings.py CHANGED
@@ -1,5 +1,3 @@
1
- from pathlib import Path
2
-
3
1
  from mapres import loadConfig
4
2
 
5
3
  from serverwatcher.configclasses.config import GlobalConfig
@@ -11,11 +9,10 @@ from serverwatcher.configclasses.watcher import WatcherConfig
11
9
 
12
10
  class SettingsManager:
13
11
  def __init__(self):
14
- Path('config').mkdir(parents=True, exist_ok=True)
15
- self.config = loadConfig(GlobalConfig, write_default=False)
16
- self.evaluation = loadConfig(EvaluatorConfig, write_default=False)
17
- self.logging = loadConfig(LoggingConfig, write_default=False)
18
- self.messages = loadConfig(MessagesConfig, write_default=False)
19
- self.watcher = loadConfig(WatcherConfig, write_default=False)
12
+ self.config = loadConfig(GlobalConfig)
13
+ self.evaluation = loadConfig(EvaluatorConfig)
14
+ self.logging = loadConfig(LoggingConfig)
15
+ self.messages = loadConfig(MessagesConfig)
16
+ self.watcher = loadConfig(WatcherConfig)
20
17
 
21
18
  settings = SettingsManager()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: serverwatcher
3
- Version: 1.dev4
3
+ Version: 1.dev5
4
4
  Summary: A HungerCore-powered Minecraft server automation engine.
5
5
  Author: iFamished
6
6
  License: GPL-3.0
@@ -55,13 +55,13 @@ A highly configurable Minecraft server monitoring and restart engine for HungerB
55
55
  ## Installation
56
56
  - Import the [ServerWatcher Pterodactyl egg](https://github.com/HungerNet/ServerWatcher/blob/main/eggs/egg-serverwatcher.json) into your panel and create a server with Python 3.14.
57
57
  - Run the installer. It checks out the configured Git branch and installs `uv`; Python dependencies are synced on startup.
58
- - Start the server once to create the empty `config/` directory. Add the required panel/server credentials as local overrides in `config/config.yaml`, then restart.
59
- - On startup, missing override files silently use their packaged defaults. The example panel and API credentials are placeholders, so valid credentials are required before the watcher can connect.
58
+ - Start the server once to generate the runtime YAML files in `config/`. Set the required panel/server credentials in `config/config.yaml`, then restart.
59
+ - Missing runtime files are copied from packaged defaults without overwriting existing files. The example panel and API credentials are placeholders, so valid credentials are required before the watcher can connect.
60
60
  - Subsequent starts update the checkout when `AUTO_UPDATE` is enabled, sync the Python environment, and run ServerWatcher.
61
61
 
62
62
  The egg defaults to the `main` branch and enables startup auto-updates. Set `AUTO_UPDATE` to `0` to keep the installed checkout fixed, or change `GIT_BRANCH` to use another branch.
63
63
 
64
- Defaults are loaded directly from the packaged YAML files in `src/serverwatcher/defaultconfigs/`; ServerWatcher does not copy them into the project directory. To override settings, create a matching YAML file under `config/` with only the values you want to change. MapRes merges those overrides over packaged defaults. `config/config.yaml` overrides server/API and logging settings; `evaluation.yaml`, `messages.yaml`, and `watcher.yaml` override their corresponding settings.
64
+ The YAML files in `src/serverwatcher/defaultconfigs/` are the canonical packaged defaults. MapRes copies each one into the ignored runtime `config/` directory on first startup; edit the runtime files, which are never committed as a second source of defaults. `config/config.yaml` contains server/API and logging settings; `evaluation.yaml`, `messages.yaml`, and `watcher.yaml` contain their corresponding settings.
65
65
 
66
66
  ## HungerNet Bot Webhook
67
67
  Set `hungernetbot.enabled` to `True`, `hungernetbot.url` to the Bot's `/webhook` endpoint, and `hungernetbot.token` to the same secret configured as `BRIDGE_WEBHOOK_TOKEN` in HungerNet Bot. For example:
@@ -23,7 +23,7 @@ serverwatcher/connection.py,sha256=Zf-_1pzd0Clwp2xpuWhl7hd3PRgX4rdjUNvUlZP9x80,1
23
23
  serverwatcher/evaluator.py,sha256=Y5YvWpqv6yJmIOlkCggT4e226WtXwhnwyXABASENEmI,2618
24
24
  serverwatcher/metricfetcher.py,sha256=wJMw96lWEWm8agKo0sYHSmCYii46mIDImPOYW99QRos,2910
25
25
  serverwatcher/router.py,sha256=B8EF7RELG7JflcUWPdUmZB4Rp4pDCkZdsmr-ZHbARj8,2085
26
- serverwatcher/settings.py,sha256=nwQEkz8gALNl3EGagXsylrnd0OFslZxcbbkMSRJUmss,864
26
+ serverwatcher/settings.py,sha256=afhiXqsMnNOMk354dJXfqPeM2IKE96cDSr6UFdSjh0M,675
27
27
  serverwatcher/configclasses/__init__.py,sha256=PLLzlldBbriJlzPvzCQhne9WVoKOu0qCv4QzMqpg0hE,312
28
28
  serverwatcher/configclasses/config.py,sha256=Q0ZpVe9wsLOCvkfJ2C5QEssRYC7_Wa6LyGxlcUNVs9Y,740
29
29
  serverwatcher/configclasses/evaluation.py,sha256=9lZbu9OCO5vR_LODjMxIH4w0lLKcOuZitN_ObDAfMeM,1854
@@ -34,9 +34,9 @@ serverwatcher/defaultconfigs/config.yaml,sha256=GGTM5rnw8jpWT9iasyT_m4vSdfz2tw4h
34
34
  serverwatcher/defaultconfigs/evaluation.yaml,sha256=pmV3b8Ln7ZGUCtaECdypcjVr0RefYy7yWf3d9eBFYZw,733
35
35
  serverwatcher/defaultconfigs/messages.yaml,sha256=jSVEl-RYqPHhe5U5KLl8zfJtUBymvyE74hmzH0RFC_Y,3177
36
36
  serverwatcher/defaultconfigs/watcher.yaml,sha256=iev4whdLrGBWE9zcmuMrUNnZc89iaxujKjUWqdWKGv0,189
37
- serverwatcher-1.dev4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
38
- serverwatcher-1.dev4.dist-info/METADATA,sha256=mTFI6E_KlXvBchYn8OeYavOzoPXtF8-jn-w1BEWAEuE,4282
39
- serverwatcher-1.dev4.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
40
- serverwatcher-1.dev4.dist-info/entry_points.txt,sha256=5d464Lg4-6S6_1bS71BnHAXds6Yyw6vMrrkUMlB7LDQ,57
41
- serverwatcher-1.dev4.dist-info/top_level.txt,sha256=BSOmfMtsjx7XwYL55cWMZb7rp48ow5Jry9qmMncah8U,18
42
- serverwatcher-1.dev4.dist-info/RECORD,,
37
+ serverwatcher-1.dev5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
38
+ serverwatcher-1.dev5.dist-info/METADATA,sha256=2Q_P2pYKRb_P4f5tQYtW0hFtaL2_CXVlpmvIYaPwgEg,4227
39
+ serverwatcher-1.dev5.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
40
+ serverwatcher-1.dev5.dist-info/entry_points.txt,sha256=5d464Lg4-6S6_1bS71BnHAXds6Yyw6vMrrkUMlB7LDQ,57
41
+ serverwatcher-1.dev5.dist-info/top_level.txt,sha256=BSOmfMtsjx7XwYL55cWMZb7rp48ow5Jry9qmMncah8U,18
42
+ serverwatcher-1.dev5.dist-info/RECORD,,