ominfra 0.0.0.dev192__tar.gz → 0.0.0.dev193__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {ominfra-0.0.0.dev192/ominfra.egg-info → ominfra-0.0.0.dev193}/PKG-INFO +4 -4
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/configs.py +1 -28
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/conf/manager.py +2 -2
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/conf/specs.py +2 -2
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/scripts/journald2aws.py +2 -27
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/scripts/manage.py +1461 -1441
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/scripts/supervisor.py +1037 -1062
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193/ominfra.egg-info}/PKG-INFO +4 -4
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra.egg-info/requires.txt +3 -3
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/pyproject.toml +4 -4
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/LICENSE +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/MANIFEST.in +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/README.rst +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/.manifests.json +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/__about__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/__main__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/auth.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/cli.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/dataclasses.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/main.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/logs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/aws/metadata.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/gcp/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/clouds/gcp/auth.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/cmds.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/journald/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/journald/fields.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/journald/genmessages.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/journald/messages.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/journald/tailer.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/__main__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/bootstrap.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/bootstrap_.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/base.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/local.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/marshal.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/ping.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/subprocess.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/commands/types.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/config.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/apps.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/commands.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/conf/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/conf/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/config.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/deploy.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/git.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/inject_.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/interp.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/nginx.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/manager.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/owners.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/paths.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/specs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/paths/types.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/specs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/systemd.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/tags.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/tmp.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/types.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/deploy/venvs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/main.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/marshal.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/_main.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/channel.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/config.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/connection.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/execution.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/payload.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/remote/spawning.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/commands.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/config.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/packages.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/system/platforms.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/bestpython.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/bestpython.sh +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/connection.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/manage/targets/targets.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/pyremote.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/scripts/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/ssh.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/LICENSE.txt +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/__main__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/configs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/dispatchers.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/dispatchersimpl.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/events.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/exceptions.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/groups.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/groupsimpl.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/http.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/inject.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/io.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/main.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/pipes.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/privileges.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/process.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/processimpl.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/setup.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/setupimpl.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/signals.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/spawning.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/spawningimpl.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/states.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/supervisor.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/types.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/collections.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/diag.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/fds.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/fs.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/os.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/ostypes.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/signals.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/strings.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/supervisor/utils/users.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/systemd.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/tailscale/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/tailscale/api.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/tailscale/cli.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/threadworkers.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/tools/__init__.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra/tools/listresources.py +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra.egg-info/SOURCES.txt +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra.egg-info/dependency_links.txt +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra.egg-info/entry_points.txt +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/ominfra.egg-info/top_level.txt +0 -0
- {ominfra-0.0.0.dev192 → ominfra-0.0.0.dev193}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev193
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,9 +12,9 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omdev==0.0.0.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
17
|
-
Requires-Dist: omserv==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev193
|
16
|
+
Requires-Dist: omlish==0.0.0.dev193
|
17
|
+
Requires-Dist: omserv==0.0.0.dev193
|
18
18
|
Provides-Extra: all
|
19
19
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
20
20
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -1,11 +1,10 @@
|
|
1
1
|
# ruff: noqa: UP006 UP007
|
2
2
|
# @omlish-lite
|
3
|
-
import io
|
4
3
|
import json
|
5
4
|
import os.path
|
6
5
|
import typing as ta
|
7
6
|
|
8
|
-
from
|
7
|
+
from omlish.formats.toml.parser import toml_loads
|
9
8
|
from omlish.lite.check import check
|
10
9
|
from omlish.lite.marshal import OBJ_MARSHALER_MANAGER
|
11
10
|
from omlish.lite.marshal import ObjMarshalerManager
|
@@ -15,8 +14,6 @@ T = ta.TypeVar('T')
|
|
15
14
|
|
16
15
|
ConfigMapping = ta.Mapping[str, ta.Any]
|
17
16
|
|
18
|
-
IniConfigSectionSettingsMap = ta.Mapping[str, ta.Mapping[str, ta.Union[str, ta.Sequence[str]]]] # ta.TypeAlias
|
19
|
-
|
20
17
|
|
21
18
|
##
|
22
19
|
|
@@ -103,27 +100,3 @@ def build_config_named_children(
|
|
103
100
|
seen.add(n)
|
104
101
|
|
105
102
|
return lst
|
106
|
-
|
107
|
-
|
108
|
-
##
|
109
|
-
|
110
|
-
|
111
|
-
def render_ini_config(
|
112
|
-
settings_by_section: IniConfigSectionSettingsMap,
|
113
|
-
) -> str:
|
114
|
-
out = io.StringIO()
|
115
|
-
|
116
|
-
for i, (section, settings) in enumerate(settings_by_section.items()):
|
117
|
-
if i:
|
118
|
-
out.write('\n')
|
119
|
-
|
120
|
-
out.write(f'[{section}]\n')
|
121
|
-
|
122
|
-
for k, v in settings.items():
|
123
|
-
if isinstance(v, str):
|
124
|
-
out.write(f'{k}={v}\n')
|
125
|
-
else:
|
126
|
-
for vv in v:
|
127
|
-
out.write(f'{k}={vv}\n')
|
128
|
-
|
129
|
-
return out.getvalue()
|
@@ -29,7 +29,7 @@ from omlish.os.paths import relative_symlink
|
|
29
29
|
from omserv.nginx.configs import NginxConfigItems
|
30
30
|
from omserv.nginx.configs import render_nginx_config_str
|
31
31
|
|
32
|
-
from
|
32
|
+
from omlish.formats.ini.sections import render_ini_sections
|
33
33
|
from ..paths.paths import DeployPath
|
34
34
|
from ..tags import DEPLOY_TAG_SEPARATOR
|
35
35
|
from ..tags import DeployApp
|
@@ -100,7 +100,7 @@ class DeployConfManager:
|
|
100
100
|
|
101
101
|
elif isinstance(ac, IniDeployAppConfContent):
|
102
102
|
ini_sections = pcc(ac.sections)
|
103
|
-
return strip_with_newline(
|
103
|
+
return strip_with_newline(render_ini_sections(ini_sections))
|
104
104
|
|
105
105
|
elif isinstance(ac, NginxDeployAppConfContent):
|
106
106
|
nginx_items = NginxConfigItems.of(pcc(ac.items))
|
@@ -6,7 +6,7 @@ import typing as ta
|
|
6
6
|
from omlish.lite.check import check
|
7
7
|
from omlish.lite.marshal import register_single_field_type_obj_marshaler
|
8
8
|
|
9
|
-
from
|
9
|
+
from omlish.formats.ini.sections import IniSectionSettingsMap
|
10
10
|
from ..paths.specs import check_valid_deploy_spec_path
|
11
11
|
|
12
12
|
|
@@ -41,7 +41,7 @@ class JsonDeployAppConfContent(DeployAppConfContent):
|
|
41
41
|
@register_single_field_type_obj_marshaler('sections')
|
42
42
|
@dc.dataclass(frozen=True)
|
43
43
|
class IniDeployAppConfContent(DeployAppConfContent):
|
44
|
-
sections:
|
44
|
+
sections: IniSectionSettingsMap
|
45
45
|
|
46
46
|
|
47
47
|
#
|
@@ -52,7 +52,7 @@ if sys.version_info < (3, 8):
|
|
52
52
|
########################################
|
53
53
|
|
54
54
|
|
55
|
-
# ../../../../
|
55
|
+
# ../../../../omlish/formats/toml/parser.py
|
56
56
|
TomlParseFloat = ta.Callable[[str], ta.Any]
|
57
57
|
TomlKey = ta.Tuple[str, ...]
|
58
58
|
TomlPos = int # ta.TypeAlias
|
@@ -74,7 +74,6 @@ ExitStackedT = ta.TypeVar('ExitStackedT', bound='ExitStacked')
|
|
74
74
|
|
75
75
|
# ../../../configs.py
|
76
76
|
ConfigMapping = ta.Mapping[str, ta.Any]
|
77
|
-
IniConfigSectionSettingsMap = ta.Mapping[str, ta.Mapping[str, ta.Union[str, ta.Sequence[str]]]] # ta.TypeAlias
|
78
77
|
|
79
78
|
# ../../../threadworkers.py
|
80
79
|
ThreadWorkerT = ta.TypeVar('ThreadWorkerT', bound='ThreadWorker')
|
@@ -84,7 +83,7 @@ SubprocessChannelOption = ta.Literal['pipe', 'stdout', 'devnull'] # ta.TypeAlia
|
|
84
83
|
|
85
84
|
|
86
85
|
########################################
|
87
|
-
# ../../../../../
|
86
|
+
# ../../../../../omlish/formats/toml/parser.py
|
88
87
|
# SPDX-License-Identifier: MIT
|
89
88
|
# SPDX-FileCopyrightText: 2021 Taneli Hukkinen
|
90
89
|
# Licensed to PSF under a Contributor Agreement.
|
@@ -3371,30 +3370,6 @@ def build_config_named_children(
|
|
3371
3370
|
return lst
|
3372
3371
|
|
3373
3372
|
|
3374
|
-
##
|
3375
|
-
|
3376
|
-
|
3377
|
-
def render_ini_config(
|
3378
|
-
settings_by_section: IniConfigSectionSettingsMap,
|
3379
|
-
) -> str:
|
3380
|
-
out = io.StringIO()
|
3381
|
-
|
3382
|
-
for i, (section, settings) in enumerate(settings_by_section.items()):
|
3383
|
-
if i:
|
3384
|
-
out.write('\n')
|
3385
|
-
|
3386
|
-
out.write(f'[{section}]\n')
|
3387
|
-
|
3388
|
-
for k, v in settings.items():
|
3389
|
-
if isinstance(v, str):
|
3390
|
-
out.write(f'{k}={v}\n')
|
3391
|
-
else:
|
3392
|
-
for vv in v:
|
3393
|
-
out.write(f'{k}={vv}\n')
|
3394
|
-
|
3395
|
-
return out.getvalue()
|
3396
|
-
|
3397
|
-
|
3398
3373
|
########################################
|
3399
3374
|
# ../../../../journald/messages.py
|
3400
3375
|
|