proxy-platform 0.3.5__tar.gz → 0.3.6__tar.gz
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.
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/PKG-INFO +1 -1
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/__init__.py +1 -1
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/main_public.py +17 -9
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/PKG-INFO +1 -1
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/pyproject.toml +1 -1
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/README.md +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/README.public.md +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/client.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/__init__.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/auth.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/clusters.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/deployments.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/feedback.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/firewalls.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/orders.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/products.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/support.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/commands/users.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/config.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform/main.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/SOURCES.txt +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/dependency_links.txt +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/entry_points.txt +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/requires.txt +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/proxy_platform.egg-info/top_level.txt +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/setup.cfg +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/setup.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_admin_feedback.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_auth.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_client.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_clusters.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_config.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_deployments.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_dev.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_feedback.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_firewalls.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_main.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_orders.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_products.py +0 -0
- {proxy_platform-0.3.5 → proxy_platform-0.3.6}/tests/test_users.py +0 -0
|
@@ -6,11 +6,22 @@ import typer
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
from rich.logging import RichHandler
|
|
8
8
|
|
|
9
|
-
from . import __version__, config
|
|
9
|
+
from . import __version__, client, config
|
|
10
10
|
|
|
11
11
|
config.get_current_environment = lambda: "production"
|
|
12
12
|
config.get_default_api_type = lambda: "user"
|
|
13
13
|
|
|
14
|
+
# Force every APIClient instance to user-API regardless of what --api was passed.
|
|
15
|
+
# The shared commands accept --api admin|user; for the public CLI admin doesn't exist.
|
|
16
|
+
_orig_apiclient_init = client.APIClient.__init__
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _public_apiclient_init(self, api_type=None): # type: ignore[no-untyped-def]
|
|
20
|
+
_orig_apiclient_init(self, api_type="user")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
client.APIClient.__init__ = _public_apiclient_init # type: ignore[method-assign]
|
|
24
|
+
|
|
14
25
|
from .commands import auth, clusters, feedback, firewalls, orders, products, support, users # noqa: E402
|
|
15
26
|
|
|
16
27
|
app = typer.Typer(
|
|
@@ -75,30 +86,27 @@ def version() -> None:
|
|
|
75
86
|
def login_alias(
|
|
76
87
|
email: str | None = typer.Option(None, "--email", "-e", help="Email address"),
|
|
77
88
|
password: str | None = typer.Option(None, "--password", "-p", help="Password"),
|
|
78
|
-
api: str = typer.Option("user", "--api", "-a", help="API type"),
|
|
79
89
|
) -> None:
|
|
80
|
-
"""Login
|
|
90
|
+
"""Login (alias for 'auth login')."""
|
|
81
91
|
from .commands.auth import login as auth_login
|
|
82
92
|
|
|
83
|
-
auth_login(email=email, password=password, api=
|
|
93
|
+
auth_login(email=email, password=password, api="user")
|
|
84
94
|
|
|
85
95
|
|
|
86
96
|
@app.command(name="logout")
|
|
87
97
|
def logout_alias() -> None:
|
|
88
|
-
"""Logout
|
|
98
|
+
"""Logout (alias for 'auth logout')."""
|
|
89
99
|
from .commands.auth import logout as auth_logout
|
|
90
100
|
|
|
91
101
|
auth_logout()
|
|
92
102
|
|
|
93
103
|
|
|
94
104
|
@app.command(name="whoami")
|
|
95
|
-
def whoami_alias(
|
|
96
|
-
api: str | None = typer.Option(None, "--api", "-a", help="API type"),
|
|
97
|
-
) -> None:
|
|
105
|
+
def whoami_alias() -> None:
|
|
98
106
|
"""Show current user info (alias for 'auth whoami')."""
|
|
99
107
|
from .commands.auth import whoami as auth_whoami
|
|
100
108
|
|
|
101
|
-
auth_whoami(api=
|
|
109
|
+
auth_whoami(api="user")
|
|
102
110
|
|
|
103
111
|
|
|
104
112
|
if __name__ == "__main__":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|