proxy-platform 0.3.5__tar.gz → 0.3.7__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.
Files changed (40) hide show
  1. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/PKG-INFO +1 -1
  2. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/__init__.py +1 -1
  3. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/main_public.py +22 -9
  4. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/PKG-INFO +1 -1
  5. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/pyproject.toml +1 -1
  6. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/README.md +0 -0
  7. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/README.public.md +0 -0
  8. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/client.py +0 -0
  9. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/__init__.py +0 -0
  10. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/auth.py +0 -0
  11. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/clusters.py +0 -0
  12. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/deployments.py +0 -0
  13. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/feedback.py +0 -0
  14. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/firewalls.py +0 -0
  15. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/orders.py +0 -0
  16. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/products.py +0 -0
  17. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/support.py +0 -0
  18. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/commands/users.py +0 -0
  19. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/config.py +0 -0
  20. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform/main.py +0 -0
  21. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/SOURCES.txt +0 -0
  22. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/dependency_links.txt +0 -0
  23. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/entry_points.txt +0 -0
  24. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/requires.txt +0 -0
  25. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/proxy_platform.egg-info/top_level.txt +0 -0
  26. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/setup.cfg +0 -0
  27. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/setup.py +0 -0
  28. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_admin_feedback.py +0 -0
  29. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_auth.py +0 -0
  30. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_client.py +0 -0
  31. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_clusters.py +0 -0
  32. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_config.py +0 -0
  33. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_deployments.py +0 -0
  34. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_dev.py +0 -0
  35. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_feedback.py +0 -0
  36. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_firewalls.py +0 -0
  37. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_main.py +0 -0
  38. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_orders.py +0 -0
  39. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_products.py +0 -0
  40. {proxy_platform-0.3.5 → proxy_platform-0.3.7}/tests/test_users.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxy-platform
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: CLI client for the Proxy Platform
5
5
  Author: Proxy Platform B.V.
6
6
  License: Proprietary - Proxy Platform B.V.
@@ -1,3 +1,3 @@
1
1
  """Proxy Platform CLI."""
2
2
 
3
- __version__ = "0.3.5"
3
+ __version__ = "0.3.7"
@@ -6,13 +6,29 @@ 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
 
27
+ # Strip admin/internal-only sub-commands from shared Typer apps for the public CLI.
28
+ auth.app.registered_commands = [
29
+ c for c in auth.app.registered_commands if (c.callback.__name__ if c.callback else c.name) != "switch"
30
+ ]
31
+
16
32
  app = typer.Typer(
17
33
  name="proxy-platform",
18
34
  help="Proxy Platform CLI",
@@ -75,30 +91,27 @@ def version() -> None:
75
91
  def login_alias(
76
92
  email: str | None = typer.Option(None, "--email", "-e", help="Email address"),
77
93
  password: str | None = typer.Option(None, "--password", "-p", help="Password"),
78
- api: str = typer.Option("user", "--api", "-a", help="API type"),
79
94
  ) -> None:
80
- """Login to the API (alias for 'auth login')."""
95
+ """Login (alias for 'auth login')."""
81
96
  from .commands.auth import login as auth_login
82
97
 
83
- auth_login(email=email, password=password, api=api)
98
+ auth_login(email=email, password=password, api="user")
84
99
 
85
100
 
86
101
  @app.command(name="logout")
87
102
  def logout_alias() -> None:
88
- """Logout from the API (alias for 'auth logout')."""
103
+ """Logout (alias for 'auth logout')."""
89
104
  from .commands.auth import logout as auth_logout
90
105
 
91
106
  auth_logout()
92
107
 
93
108
 
94
109
  @app.command(name="whoami")
95
- def whoami_alias(
96
- api: str | None = typer.Option(None, "--api", "-a", help="API type"),
97
- ) -> None:
110
+ def whoami_alias() -> None:
98
111
  """Show current user info (alias for 'auth whoami')."""
99
112
  from .commands.auth import whoami as auth_whoami
100
113
 
101
- auth_whoami(api=api)
114
+ auth_whoami(api="user")
102
115
 
103
116
 
104
117
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxy-platform
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: CLI client for the Proxy Platform
5
5
  Author: Proxy Platform B.V.
6
6
  License: Proprietary - Proxy Platform B.V.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "proxy-platform"
7
- version = "0.3.5"
7
+ version = "0.3.7"
8
8
  description = "CLI client for the Proxy Platform"
9
9
  authors = [{ name = "Proxy Platform B.V." }]
10
10
  readme = "README.public.md"
File without changes
File without changes
File without changes