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.
Files changed (23) hide show
  1. {stml_cli-0.1.2 → stml_cli-0.1.3}/PKG-INFO +1 -1
  2. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/__init__.py +1 -1
  3. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/commands.py +20 -6
  4. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/PKG-INFO +1 -1
  5. {stml_cli-0.1.2 → stml_cli-0.1.3}/README.md +0 -0
  6. {stml_cli-0.1.2 → stml_cli-0.1.3}/pyproject.toml +0 -0
  7. {stml_cli-0.1.2 → stml_cli-0.1.3}/setup.cfg +0 -0
  8. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/__main__.py +0 -0
  9. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/config.py +0 -0
  10. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/http.py +0 -0
  11. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/oauth.py +0 -0
  12. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/packaging.py +0 -0
  13. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/paths.py +0 -0
  14. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli/refs.py +0 -0
  15. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/SOURCES.txt +0 -0
  16. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/dependency_links.txt +0 -0
  17. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/entry_points.txt +0 -0
  18. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/requires.txt +0 -0
  19. {stml_cli-0.1.2 → stml_cli-0.1.3}/stml_cli.egg-info/top_level.txt +0 -0
  20. {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_disambiguation.py +0 -0
  21. {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_paths.py +0 -0
  22. {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_refs.py +0 -0
  23. {stml_cli-0.1.2 → stml_cli-0.1.3}/tests/test_whoami_expiry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stml-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: The stml partner CLI — pull, edit, push, and publish stml apps and libraries.
5
5
  Author: stml
6
6
  Project-URL: Homepage, https://stml.io
@@ -9,7 +9,7 @@ from __future__ import annotations
9
9
 
10
10
  import os
11
11
 
12
- __version__ = "0.1.2"
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
- # Display name + mode (035: attached/detached/scratch) + the app URL — the
74
- # exact handle `stml pull`/`push` accept (the URL's app slug is unique, so
75
- # it never collides even when a library is installed twice). Rows to stdout
76
- # so `stml list | grep …` works; header to stderr.
77
- name_w = max(len(a.get("name") or "") for a in apps)
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(f"{'APP'.ljust(name_w)} {'MODE'.ljust(mode_w)} URL")
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stml-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: The stml partner CLI — pull, edit, push, and publish stml apps and libraries.
5
5
  Author: stml
6
6
  Project-URL: Homepage, https://stml.io
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