ptn 0.2.5__py3-none-any.whl → 0.4.2__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.
- porterminal/__init__.py +63 -11
- porterminal/_version.py +2 -2
- porterminal/app.py +25 -1
- porterminal/application/ports/__init__.py +2 -0
- porterminal/application/ports/connection_registry_port.py +46 -0
- porterminal/application/services/management_service.py +30 -55
- porterminal/application/services/session_service.py +3 -11
- porterminal/application/services/terminal_service.py +97 -56
- porterminal/cli/args.py +91 -30
- porterminal/cli/display.py +18 -16
- porterminal/cli/script_discovery.py +112 -0
- porterminal/composition.py +8 -7
- porterminal/config.py +12 -2
- porterminal/container.py +4 -0
- porterminal/domain/__init__.py +0 -9
- porterminal/domain/entities/output_buffer.py +56 -1
- porterminal/domain/entities/tab.py +11 -10
- porterminal/domain/services/__init__.py +0 -2
- porterminal/domain/values/__init__.py +0 -4
- porterminal/domain/values/environment_rules.py +3 -0
- porterminal/infrastructure/auth.py +131 -0
- porterminal/infrastructure/cloudflared.py +18 -12
- porterminal/infrastructure/config/shell_detector.py +407 -1
- porterminal/infrastructure/repositories/in_memory_session.py +1 -4
- porterminal/infrastructure/repositories/in_memory_tab.py +2 -10
- porterminal/infrastructure/server.py +28 -3
- porterminal/pty/env.py +16 -78
- porterminal/pty/manager.py +6 -4
- porterminal/static/assets/app-DlWNJWFE.js +87 -0
- porterminal/static/assets/app-xPAM7YhQ.css +1 -0
- porterminal/static/index.html +14 -2
- porterminal/updater.py +13 -5
- {ptn-0.2.5.dist-info → ptn-0.4.2.dist-info}/METADATA +84 -23
- {ptn-0.2.5.dist-info → ptn-0.4.2.dist-info}/RECORD +37 -34
- porterminal/static/assets/app-By4EXMHC.js +0 -72
- porterminal/static/assets/app-DQePboVd.css +0 -32
- {ptn-0.2.5.dist-info → ptn-0.4.2.dist-info}/WHEEL +0 -0
- {ptn-0.2.5.dist-info → ptn-0.4.2.dist-info}/entry_points.txt +0 -0
- {ptn-0.2.5.dist-info → ptn-0.4.2.dist-info}/licenses/LICENSE +0 -0
porterminal/pty/manager.py
CHANGED
|
@@ -5,6 +5,8 @@ import shutil
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
|
+
from porterminal.domain.values import MAX_COLS, MAX_ROWS, MIN_COLS, MIN_ROWS
|
|
9
|
+
|
|
8
10
|
from .env import build_safe_environment
|
|
9
11
|
from .protocol import PTYBackend
|
|
10
12
|
|
|
@@ -43,8 +45,8 @@ class SecurePTYManager:
|
|
|
43
45
|
"""
|
|
44
46
|
self._backend = backend
|
|
45
47
|
self.shell_config = shell_config
|
|
46
|
-
self.cols = max(
|
|
47
|
-
self.rows = max(
|
|
48
|
+
self.cols = max(MIN_COLS, min(cols, MAX_COLS))
|
|
49
|
+
self.rows = max(MIN_ROWS, min(rows, MAX_ROWS))
|
|
48
50
|
self.cwd = cwd
|
|
49
51
|
self._closed = False
|
|
50
52
|
|
|
@@ -133,8 +135,8 @@ class SecurePTYManager:
|
|
|
133
135
|
if self._closed:
|
|
134
136
|
return
|
|
135
137
|
|
|
136
|
-
cols = max(
|
|
137
|
-
rows = max(
|
|
138
|
+
cols = max(MIN_COLS, min(cols, MAX_COLS))
|
|
139
|
+
rows = max(MIN_ROWS, min(rows, MAX_ROWS))
|
|
138
140
|
|
|
139
141
|
try:
|
|
140
142
|
self._backend.resize(rows, cols)
|