stml-cli 0.1.2__tar.gz → 0.1.3__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.
- {stml_cli-0.1.2 → stml_cli-0.1.3}/PKG-INFO +1 -1
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/__init__.py +1 -1
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/commands.py +20 -6
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/PKG-INFO +1 -1
- {stml_cli-0.1.2 → stml_cli-0.1.3}/README.md +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/pyproject.toml +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/setup.cfg +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/__main__.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/config.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/http.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/oauth.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/packaging.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/paths.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/refs.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/SOURCES.txt +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/dependency_links.txt +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/entry_points.txt +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/requires.txt +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/top_level.txt +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_disambiguation.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_paths.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_refs.py +0 -0
- {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_whoami_expiry.py +0 -0
|
@@ -9,7 +9,7 @@ from __future__ import annotations
|
|
|
9
9
|
|
|
10
10
|
import os
|
|
11
11
|
|
|
12
|
-
__version__ = "0.1.
|
|
12
|
+
__version__ = "0.1.3"
|
|
13
13
|
|
|
14
14
|
# TLS trust: framework/python.org builds have no OpenSSL CA path, so a real
|
|
15
15
|
# https backend fails with "unable to get local issuer certificate". certifi's
|
|
@@ -70,16 +70,30 @@ def cmd_list(args) -> None:
|
|
|
70
70
|
if not apps:
|
|
71
71
|
_log("No apps found.")
|
|
72
72
|
return
|
|
73
|
-
#
|
|
74
|
-
# exact handle `stml pull`/`push` accept (the URL's app slug is
|
|
75
|
-
# it never collides even when a library is installed twice).
|
|
76
|
-
#
|
|
77
|
-
|
|
73
|
+
# Name + org + workspace + mode (035: attached/detached/scratch) + the app
|
|
74
|
+
# URL — the exact handle `stml pull`/`push` accept (the URL's app slug is
|
|
75
|
+
# unique, so it never collides even when a library is installed twice). Org
|
|
76
|
+
# and workspace disambiguate same-named apps across the account. Names fall
|
|
77
|
+
# back to slugs against older backends. Rows to stdout so `stml list | grep …`
|
|
78
|
+
# works; header to stderr.
|
|
79
|
+
def _org(a):
|
|
80
|
+
return a.get("org_name") or a.get("org_slug") or ""
|
|
81
|
+
|
|
82
|
+
def _ws(a):
|
|
83
|
+
return a.get("workspace_name") or a.get("workspace_slug") or ""
|
|
84
|
+
|
|
85
|
+
name_w = max((len(a.get("name") or "") for a in apps), default=3)
|
|
86
|
+
org_w = max((len(_org(a)) for a in apps), default=3)
|
|
87
|
+
ws_w = max((len(_ws(a)) for a in apps), default=2)
|
|
78
88
|
mode_w = max((len(a.get("mode") or "") for a in apps), default=4)
|
|
79
|
-
_log(
|
|
89
|
+
_log(
|
|
90
|
+
f"{'APP'.ljust(name_w)} {'ORG'.ljust(org_w)} "
|
|
91
|
+
f"{'WORKSPACE'.ljust(ws_w)} {'MODE'.ljust(mode_w)} URL"
|
|
92
|
+
)
|
|
80
93
|
for a in apps:
|
|
81
94
|
print(
|
|
82
95
|
f"{(a.get('name') or '').ljust(name_w)} "
|
|
96
|
+
f"{_org(a).ljust(org_w)} {_ws(a).ljust(ws_w)} "
|
|
83
97
|
f"{(a.get('mode') or '').ljust(mode_w)} {a.get('url') or ''}"
|
|
84
98
|
)
|
|
85
99
|
|
|
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
|