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.
- {flyshell-1.5.8/src/flyshell.egg-info → flyshell-1.5.9}/PKG-INFO +1 -1
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/system.py +1 -1
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/constants.py +3 -3
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/data.py +20 -19
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/main.py +1 -1
- {flyshell-1.5.8 → flyshell-1.5.9/src/flyshell.egg-info}/PKG-INFO +1 -1
- {flyshell-1.5.8 → flyshell-1.5.9}/LICENSE +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/MANIFEST.in +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/README.md +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/diskops.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/cat.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/cp.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/dir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/mkdir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/mv.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rename.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rm.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/rmdir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/posix/touch.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/dir_types.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/dir_types.h +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/native_errors.h +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/shared/win32_utf.h +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/cat.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/cp.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/dir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/mkdir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/mv.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rename.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rm.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/rmdir.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/c_src/diskops/win32/touch.c +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/pyproject.toml +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/setup.cfg +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/setup.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/base_cmd.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/base_plugin.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/abstract/parent_cmd.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/accounts/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/accounts/auth.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/bin/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/fs.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/pkg.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/builtin/utils.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/console.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/core/directory.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/diskops_bridge.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/diskops_handler.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/legacy/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/native/legacy/diskops.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/__init__.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/deps.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/env.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/loader.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell/startup/seasonal.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/SOURCES.txt +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/dependency_links.txt +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/entry_points.txt +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/requires.txt +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/src/flyshell.egg-info/top_level.txt +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_auth.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_data.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_deps.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_directory.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_diskops_ext.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_diskops_lgc.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_env.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_fs.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_loader.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_pkg.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_security.py +0 -0
- {flyshell-1.5.8 → flyshell-1.5.9}/tests/test_utils.py +0 -0
|
@@ -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
|
|
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(
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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=
|
|
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
|
|
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."
|
|
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
|
|
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
|
|
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
|
|
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
|