flyshell 1.5.8__tar.gz → 1.5.9__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 (77) hide show
  1. {flyshell-1.5.8/src/flyshell.egg-info → flyshell-1.5.9}/PKG-INFO +1 -1
  2. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/system.py +1 -1
  3. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/constants.py +3 -3
  4. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/data.py +20 -19
  5. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/main.py +1 -1
  6. {flyshell-1.5.8 → flyshell-1.5.9/src/flyshell.egg-info}/PKG-INFO +1 -1
  7. {flyshell-1.5.8 → flyshell-1.5.9}/LICENSE +0 -0
  8. {flyshell-1.5.8 → flyshell-1.5.9}/MANIFEST.in +0 -0
  9. {flyshell-1.5.8 → flyshell-1.5.9}/README.md +0 -0
  10. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/diskops.c +0 -0
  11. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/cat.c +0 -0
  12. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/cp.c +0 -0
  13. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/dir.c +0 -0
  14. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/mkdir.c +0 -0
  15. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/mv.c +0 -0
  16. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rename.c +0 -0
  17. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rm.c +0 -0
  18. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rmdir.c +0 -0
  19. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/touch.c +0 -0
  20. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/dir_types.c +0 -0
  21. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/dir_types.h +0 -0
  22. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/native_errors.h +0 -0
  23. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/win32_utf.h +0 -0
  24. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/cat.c +0 -0
  25. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/cp.c +0 -0
  26. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/dir.c +0 -0
  27. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/mkdir.c +0 -0
  28. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/mv.c +0 -0
  29. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rename.c +0 -0
  30. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rm.c +0 -0
  31. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rmdir.c +0 -0
  32. {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/touch.c +0 -0
  33. {flyshell-1.5.8 → flyshell-1.5.9}/pyproject.toml +0 -0
  34. {flyshell-1.5.8 → flyshell-1.5.9}/setup.cfg +0 -0
  35. {flyshell-1.5.8 → flyshell-1.5.9}/setup.py +0 -0
  36. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/__init__.py +0 -0
  37. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/__init__.py +0 -0
  38. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/base_cmd.py +0 -0
  39. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/base_plugin.py +0 -0
  40. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/parent_cmd.py +0 -0
  41. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/accounts/__init__.py +0 -0
  42. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/accounts/auth.py +0 -0
  43. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/bin/__init__.py +0 -0
  44. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/__init__.py +0 -0
  45. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/fs.py +0 -0
  46. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/pkg.py +0 -0
  47. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/utils.py +0 -0
  48. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/__init__.py +0 -0
  49. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/console.py +0 -0
  50. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/directory.py +0 -0
  51. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/__init__.py +0 -0
  52. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/diskops_bridge.py +0 -0
  53. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/diskops_handler.py +0 -0
  54. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/legacy/__init__.py +0 -0
  55. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/legacy/diskops.py +0 -0
  56. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/__init__.py +0 -0
  57. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/deps.py +0 -0
  58. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/env.py +0 -0
  59. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/loader.py +0 -0
  60. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/seasonal.py +0 -0
  61. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/SOURCES.txt +0 -0
  62. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/dependency_links.txt +0 -0
  63. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/entry_points.txt +0 -0
  64. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/requires.txt +0 -0
  65. {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/top_level.txt +0 -0
  66. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_auth.py +0 -0
  67. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_data.py +0 -0
  68. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_deps.py +0 -0
  69. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_directory.py +0 -0
  70. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_diskops_ext.py +0 -0
  71. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_diskops_lgc.py +0 -0
  72. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_env.py +0 -0
  73. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_fs.py +0 -0
  74. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_loader.py +0 -0
  75. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_pkg.py +0 -0
  76. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_security.py +0 -0
  77. {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
@@ -42,7 +42,7 @@ class OpenFile(BaseCmd):
42
42
  aliases = []
43
43
 
44
44
  def execute(self, args):
45
- target = " ".join(args).strip().strip("\"'")
45
+ target = " ".join(args).strip().strip('"')
46
46
  if not target:
47
47
  return (0, "")
48
48
  is_path = os.path.exists(target)
@@ -5,9 +5,9 @@ import os
5
5
  import platform
6
6
  import time
7
7
 
8
- BUILD = 197
9
- VERFULL = "1.5.8d"
10
- VERSION = "1.5.8"
8
+ BUILD = 200
9
+ VERFULL = "1.5.9c"
10
+ VERSION = "1.5.9"
11
11
 
12
12
 
13
13
  def _resolve_app_dir() -> Path:
@@ -8,10 +8,11 @@ import sqlite3
8
8
  import time
9
9
 
10
10
 
11
- def get_storage_size() -> str:
12
- if not c.FILE_PATH.exists():
11
+ def get_storage_size(filename=None) -> str:
12
+ target = Path(filename) if filename is not None else c.FILE_PATH
13
+ if not target.exists():
13
14
  return "File not found"
14
- num_bytes = float(c.FILE_PATH.stat().st_size)
15
+ num_bytes = float(target.stat().st_size)
15
16
  for unit in ["B", "KB", "MB", "GB"]:
16
17
  if num_bytes < 1024.0:
17
18
  return (
@@ -84,7 +85,7 @@ def initialise(filename=None, initialised=None):
84
85
  initialised.add(target)
85
86
 
86
87
 
87
- def get_auth(filename=c.FILE_PATH) -> dict | None:
88
+ def get_auth(filename=None) -> dict | None:
88
89
  initialise(filename)
89
90
  with _get_connection(filename) as conn:
90
91
  row = conn.execute(
@@ -100,7 +101,7 @@ def get_auth(filename=c.FILE_PATH) -> dict | None:
100
101
  }
101
102
 
102
103
 
103
- def set_auth(username: str, pwd_hash: str, salt: str, filename=c.FILE_PATH) -> None:
104
+ def set_auth(username: str, pwd_hash: str, salt: str, filename=None) -> None:
104
105
  initialise(filename)
105
106
  now_utc = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
106
107
  with _get_connection(filename) as conn:
@@ -114,7 +115,7 @@ def set_auth(username: str, pwd_hash: str, salt: str, filename=c.FILE_PATH) -> N
114
115
  )
115
116
 
116
117
 
117
- def clear_auth(filename=c.FILE_PATH) -> bool:
118
+ def clear_auth(filename=None) -> bool:
118
119
  initialise(filename)
119
120
  with _get_connection(filename) as conn:
120
121
  with conn:
@@ -122,7 +123,7 @@ def clear_auth(filename=c.FILE_PATH) -> bool:
122
123
  return cursor.rowcount > 0
123
124
 
124
125
 
125
- def append_history(cmd: str, timestamp: str, filename=c.FILE_PATH) -> None:
126
+ def append_history(cmd: str, timestamp: str, filename=None) -> None:
126
127
  initialise(filename)
127
128
  with _get_connection(filename) as conn:
128
129
  with conn:
@@ -132,7 +133,7 @@ def append_history(cmd: str, timestamp: str, filename=c.FILE_PATH) -> None:
132
133
  )
133
134
 
134
135
 
135
- def get_history(limit: int | None = None, filename=c.FILE_PATH) -> list[dict]:
136
+ def get_history(limit: int | None = None, filename=None) -> list[dict]:
136
137
  initialise(filename)
137
138
  with _get_connection(filename) as conn:
138
139
  if limit is not None and limit > 0:
@@ -147,7 +148,7 @@ def get_history(limit: int | None = None, filename=c.FILE_PATH) -> list[dict]:
147
148
  return [{"command": r[0], "timestamp": r[1]} for r in rows]
148
149
 
149
150
 
150
- def clear_history(filename=c.FILE_PATH) -> bool:
151
+ def clear_history(filename=None) -> bool:
151
152
  initialise(filename)
152
153
  with _get_connection(filename) as conn:
153
154
  with conn:
@@ -155,7 +156,7 @@ def clear_history(filename=c.FILE_PATH) -> bool:
155
156
  return True
156
157
 
157
158
 
158
- def get_config(key: str, default=None, filename=c.FILE_PATH):
159
+ def get_config(key: str, default=None, filename=None):
159
160
  initialise(filename)
160
161
  with _get_connection(filename) as conn:
161
162
  row = conn.execute(
@@ -169,7 +170,7 @@ def get_config(key: str, default=None, filename=c.FILE_PATH):
169
170
  return row[0]
170
171
 
171
172
 
172
- def set_config(key: str, value, filename=c.FILE_PATH) -> None:
173
+ def set_config(key: str, value, filename=None) -> None:
173
174
  initialise(filename)
174
175
  serialized = json.dumps(value)
175
176
  with _get_connection(filename) as conn:
@@ -183,7 +184,7 @@ def set_config(key: str, value, filename=c.FILE_PATH) -> None:
183
184
  )
184
185
 
185
186
 
186
- def delete_config(key: str, filename=c.FILE_PATH) -> bool:
187
+ def delete_config(key: str, filename=None) -> bool:
187
188
  initialise(filename)
188
189
  with _get_connection(filename) as conn:
189
190
  with conn:
@@ -191,7 +192,7 @@ def delete_config(key: str, filename=c.FILE_PATH) -> bool:
191
192
  return cursor.rowcount > 0
192
193
 
193
194
 
194
- def register_plugin(plugin_name: str, filename=c.FILE_PATH) -> None:
195
+ def register_plugin(plugin_name: str, filename=None) -> None:
195
196
  initialise(filename)
196
197
  now_utc = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
197
198
  with _get_connection(filename) as conn:
@@ -205,7 +206,7 @@ def register_plugin(plugin_name: str, filename=c.FILE_PATH) -> None:
205
206
  )
206
207
 
207
208
 
208
- def get_plugin_data(plugin_name: str, key: str, default=None, filename=c.FILE_PATH):
209
+ def get_plugin_data(plugin_name: str, key: str, default=None, filename=None):
209
210
  initialise(filename)
210
211
  with _get_connection(filename) as conn:
211
212
  row = conn.execute(
@@ -222,7 +223,7 @@ def get_plugin_data(plugin_name: str, key: str, default=None, filename=c.FILE_PA
222
223
  return row[0]
223
224
 
224
225
 
225
- def set_plugin_data(plugin_name: str, key: str, value, filename=c.FILE_PATH) -> None:
226
+ def set_plugin_data(plugin_name: str, key: str, value, filename=None) -> None:
226
227
  initialise(filename)
227
228
  register_plugin(plugin_name, filename=filename)
228
229
  serialized = json.dumps(value)
@@ -237,7 +238,7 @@ def set_plugin_data(plugin_name: str, key: str, value, filename=c.FILE_PATH) ->
237
238
  )
238
239
 
239
240
 
240
- def get_all_plugin_data(plugin_name: str, filename=c.FILE_PATH) -> dict:
241
+ def get_all_plugin_data(plugin_name: str, filename=None) -> dict:
241
242
  initialise(filename)
242
243
  with _get_connection(filename) as conn:
243
244
  rows = conn.execute(
@@ -252,7 +253,7 @@ def get_all_plugin_data(plugin_name: str, filename=c.FILE_PATH) -> dict:
252
253
  return result
253
254
 
254
255
 
255
- def purge_plugin(plugin_name: str, filename=c.FILE_PATH) -> bool:
256
+ def purge_plugin(plugin_name: str, filename=None) -> bool:
256
257
  initialise(filename)
257
258
  with _get_connection(filename) as conn:
258
259
  with conn:
@@ -262,7 +263,7 @@ def purge_plugin(plugin_name: str, filename=c.FILE_PATH) -> bool:
262
263
  return cursor.rowcount > 0
263
264
 
264
265
 
265
- def purge_all_plugin_data(filename=c.FILE_PATH) -> bool:
266
+ def purge_all_plugin_data(filename=None) -> bool:
266
267
  initialise(filename)
267
268
  with _get_connection(filename) as conn:
268
269
  with conn:
@@ -271,7 +272,7 @@ def purge_all_plugin_data(filename=c.FILE_PATH) -> bool:
271
272
  return True
272
273
 
273
274
 
274
- def delete_plugin_data(plugin_name: str, key: str, filename=c.FILE_PATH) -> bool:
275
+ def delete_plugin_data(plugin_name: str, key: str, filename=None) -> bool:
275
276
  initialise(filename)
276
277
  with _get_connection(filename) as conn:
277
278
  with conn:
@@ -72,7 +72,7 @@ def main():
72
72
  from flyshell.core import console
73
73
  from flyshell.startup import loader
74
74
 
75
- if c.HOST_OS in ["Windows", "Darwin", "Linux"]:
75
+ if c.HOST_OS in c.SUPPORTED_OS:
76
76
  if sys.version_info < c.SUPPORTED_PYTHON:
77
77
  print(
78
78
  "\nCRITICAL ERROR: Your Python version is too old to be supported by Flyshell."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
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