flyshell 1.2.8__tar.gz → 1.2.10__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 (41) hide show
  1. {flyshell-1.2.8/src/flyshell.egg-info → flyshell-1.2.10}/PKG-INFO +1 -1
  2. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/constants.py +2 -2
  3. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/env.py +0 -2
  4. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/loader.py +32 -1
  5. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/main.py +1 -0
  6. {flyshell-1.2.8 → flyshell-1.2.10/src/flyshell.egg-info}/PKG-INFO +1 -1
  7. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_env_keys.py +0 -1
  8. {flyshell-1.2.8 → flyshell-1.2.10}/LICENSE +0 -0
  9. {flyshell-1.2.8 → flyshell-1.2.10}/README.md +0 -0
  10. {flyshell-1.2.8 → flyshell-1.2.10}/pyproject.toml +0 -0
  11. {flyshell-1.2.8 → flyshell-1.2.10}/setup.cfg +0 -0
  12. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/__init__.py +0 -0
  13. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/abstract/__init__.py +0 -0
  14. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/abstract/base_cmd.py +0 -0
  15. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/abstract/base_plugin.py +0 -0
  16. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/abstract/parent_cmd.py +0 -0
  17. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/__init__.py +0 -0
  18. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/diskops.py +0 -0
  19. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/fs.py +0 -0
  20. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/pkg.py +0 -0
  21. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/system.py +0 -0
  22. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/builtin/utils.py +0 -0
  23. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/__init__.py +0 -0
  24. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/auth.py +0 -0
  25. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/console.py +0 -0
  26. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/data.py +0 -0
  27. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell/core/directory.py +0 -0
  28. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell.egg-info/SOURCES.txt +0 -0
  29. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell.egg-info/dependency_links.txt +0 -0
  30. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell.egg-info/entry_points.txt +0 -0
  31. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell.egg-info/requires.txt +0 -0
  32. {flyshell-1.2.8 → flyshell-1.2.10}/src/flyshell.egg-info/top_level.txt +0 -0
  33. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_auth.py +0 -0
  34. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_data.py +0 -0
  35. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_directory.py +0 -0
  36. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_diskops.py +0 -0
  37. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_fs.py +0 -0
  38. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_loader.py +0 -0
  39. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_pkg.py +0 -0
  40. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_security.py +0 -0
  41. {flyshell-1.2.8 → flyshell-1.2.10}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.2.8
3
+ Version: 1.2.10
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
@@ -5,8 +5,8 @@ import os
5
5
  import platform
6
6
  import time
7
7
 
8
- BUILD = 133
9
- VERSION = "1.2.8"
8
+ BUILD = 135
9
+ VERSION = "1.2.10"
10
10
 
11
11
 
12
12
  def _resolve_app_dir() -> Path:
@@ -39,7 +39,6 @@ def read_env_file() -> dict[str, str]:
39
39
 
40
40
 
41
41
  def _resolve_plugin_dir_name(target_name: str) -> tuple[str, object | None]:
42
- """Resolves an identifier, display name, or dir name to (dir_name, plugin_instance)."""
43
42
  target_lower = target_name.strip().lower()
44
43
  if hasattr(c, "PLUGINS"):
45
44
  if target_lower in c.PLUGINS:
@@ -85,7 +84,6 @@ def get_plugin_api_keys(plugin_name_or_dir: str) -> dict[str, str]:
85
84
 
86
85
 
87
86
  def get_all_keys() -> tuple[int, str]:
88
- """Retrieve and display all configured API keys in the environment."""
89
87
  env_path = get_env_path()
90
88
  if not env_path.exists():
91
89
  return (1, f"File Config Error: Environment file not found at '{env_path}'.")
@@ -67,7 +67,7 @@ def scan_plugins(plugin_folder=None):
67
67
  print(f"Please define them in: {env_file} as:")
68
68
  for mk in missing_keys:
69
69
  print(f"{default_name}_{mk}=<your_key>")
70
- break
70
+ print("You can do this once Flyshell has booted.")
71
71
  instance = obj(ctx)
72
72
  candidates.setdefault(resolved_name, []).append(
73
73
  (instance, file_path)
@@ -114,3 +114,34 @@ def build_context(plugin_name, default_name, file_path=None):
114
114
  "storage": plugin_storage,
115
115
  }
116
116
  return context
117
+
118
+
119
+ def check_plugin_api_keys():
120
+ if not c.PLUGINS:
121
+ return
122
+ print("\nFlyshell will now check plugin API keys.")
123
+ has_keys_to_report = False
124
+ for identifier, plugin in c.PLUGINS.items():
125
+ required_keys = getattr(plugin, "api_keys", [])
126
+ configured_keys = getattr(plugin, "api_keys_data", {})
127
+ dir_name = plugin.context.get("plugin_dir_name", identifier)
128
+ if not required_keys and not configured_keys:
129
+ continue
130
+ has_keys_to_report = True
131
+ configured_lookup = {k.lower(): (k, v) for k, v in configured_keys.items()}
132
+ seen_keys = set()
133
+ print(f"\nPlugin: {plugin.name} ({identifier})")
134
+ for req in required_keys:
135
+ req_lower = req.lower()
136
+ seen_keys.add(req_lower)
137
+ if req_lower in configured_lookup:
138
+ orig_k, _ = configured_lookup[req_lower]
139
+ print(f"✅ {orig_k} - Key found [Required]")
140
+ else:
141
+ print(f"⚠️ {req} - KEY NOT FOUND [Required]")
142
+ print(f"Please define in the .env file as: {dir_name}_{req}=<your_key>")
143
+ for k_lower, (orig_k, _) in sorted(configured_lookup.items()):
144
+ if k_lower not in seen_keys:
145
+ print(f"✅ {orig_k} - Key found [Optional/Extra]")
146
+ if not has_keys_to_report:
147
+ print("✅ No API keys required for any loaded plugins.")
@@ -82,6 +82,7 @@ def main():
82
82
  print(f"\nYour OS '{c.HOST_OS}' is compatible with Flyshell.")
83
83
  print("Flyshell will now boot.")
84
84
  loader.scan_plugins()
85
+ loader.check_plugin_api_keys()
85
86
  if auth.login_flow():
86
87
  console.boot()
87
88
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.2.8
3
+ Version: 1.2.10
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
@@ -82,7 +82,6 @@ def test_loader_rejects_plugin_with_missing_keys(
82
82
  )
83
83
  monkeypatch.setattr(c, "USER_PLUGIN_DIR", tmp_path)
84
84
  loader.scan_plugins(plugin_folder=tmp_path)
85
- assert "needkey" not in c.PLUGINS
86
85
  out = capsys.readouterr().out
87
86
  assert "API Key Error" in out
88
87
  assert "second" in out
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