ghosttrap-cli 0.3.11__tar.gz → 0.3.12__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ghosttrap-cli
3
- Version: 0.3.11
3
+ Version: 0.3.12
4
4
  Summary: Watch for errors streaming from ghosttrap.io
5
5
  Project-URL: Homepage, https://github.com/alex-rowley/ghosttrap-cli
6
6
  Requires-Python: >=3.10
@@ -19,9 +19,10 @@ KNOWN_SKILL_HASHES = {
19
19
  "5759b2e0dc8ca47c3801915fd688cc8da878a7ab8d405f5183ffd7e8c8df4c55", # v0.3.4..v0.3.7
20
20
  "0651bb4247cf5c68960ff5b63d6a5d0c85ff1ce08e7966ab4823601ff02cf1f4", # v0.3.9
21
21
  "38810f43867a2a91420cc3dacbc71d2acabd7125596fd5b43f222b49725c9696", # v0.3.10
22
+ "19b67d913dc5214ee4db3610bd8749da67324c174b904b5da71ee6de13e23e63", # v0.3.11
22
23
  }
23
24
 
24
- __version__ = "0.3.11"
25
+ __version__ = "0.3.12"
25
26
 
26
27
  GHOSTTRAP_SERVER = "wss://ghosttrap.io/stream/"
27
28
  CONFIG_DIR = os.path.expanduser("~/.ghosttrap")
@@ -61,7 +62,7 @@ description: Production error monitoring via ghosttrap.io. Trigger when starting
61
62
  # Ghosttrap
62
63
 
63
64
  Read `~/.ghosttrap/config.json` for state. It contains:
64
- - `repos`: map keyed by GitHub repo id (stringified int) to `{"github_id": int, "owner": str, "name": str, "token": "t_xxx", "sdk_installed": bool, "sdk_version": str, "init_file": str}`. Older configs may still be keyed by `"owner/name"` — same shape inside.
65
+ - `repos`: map keyed by GitHub repo id (stringified int) to `{"github_id": int, "owner": str, "name": str, "token": "t_xxx", "sdk_installed": bool, "sdk_version": str, "init_file": str}`.
65
66
  - `cursor`: last seen error ID
66
67
 
67
68
  ## On session start
@@ -121,11 +122,6 @@ def _save_repos(config, repos):
121
122
  for r in repos:
122
123
  key = _repo_key(r)
123
124
  existing = config["repos"].get(key, {})
124
- # Drop any legacy slug-keyed entry now superseded by a github_id key.
125
- if r.get("github_id") is not None:
126
- legacy_key = f"{r.get('owner')}/{r.get('name')}"
127
- if legacy_key in config["repos"] and legacy_key != key:
128
- existing = {**config["repos"].pop(legacy_key), **existing}
129
125
  existing.update({
130
126
  "github_id": r.get("github_id"),
131
127
  "owner": r["owner"],
@@ -210,8 +206,6 @@ def _get_repo_token(config):
210
206
  for entry in repos.values():
211
207
  if f"{entry.get('owner')}/{entry.get('name')}" == cwd_repo:
212
208
  return entry["token"]
213
- if cwd_repo in repos:
214
- return repos[cwd_repo]["token"]
215
209
  if repos:
216
210
  return next(iter(repos.values()))["token"]
217
211
  print("error: no repos configured. run 'ghosttrap setup' first.", file=sys.stderr)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ghosttrap-cli
3
- Version: 0.3.11
3
+ Version: 0.3.12
4
4
  Summary: Watch for errors streaming from ghosttrap.io
5
5
  Project-URL: Homepage, https://github.com/alex-rowley/ghosttrap-cli
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ghosttrap-cli"
7
- version = "0.3.11"
7
+ version = "0.3.12"
8
8
  description = "Watch for errors streaming from ghosttrap.io"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes