flyshell 1.3.12__tar.gz → 1.3.13__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.3.12/src/flyshell.egg-info → flyshell-1.3.13}/PKG-INFO +2 -2
- {flyshell-1.3.12 → flyshell-1.3.13}/README.md +1 -1
- {flyshell-1.3.12 → flyshell-1.3.13}/pyproject.toml +1 -3
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/constants.py +2 -2
- {flyshell-1.3.12 → flyshell-1.3.13/src/flyshell.egg-info}/PKG-INFO +2 -2
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell.egg-info/SOURCES.txt +1 -0
- flyshell-1.3.13/tests/test_diskops_ext.py +78 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/LICENSE +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/MANIFEST.in +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/diskops.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/posix/cat.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/posix/dir.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/posix/touch.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/shared/dir_types.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/shared/dir_types.h +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/shared/native_errors.h +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/win32/cat.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/win32/dir.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/c_src/diskops/win32/touch.c +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/setup.cfg +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/setup.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/abstract/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/abstract/base_cmd.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/abstract/base_plugin.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/abstract/parent_cmd.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/accounts/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/accounts/auth.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/bin/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/diskops.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/fs.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/pkg.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/system.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/builtin/utils.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/core/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/core/console.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/core/data.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/core/directory.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/main.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/native/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/native/diskops_bridge.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/native/diskops_handler.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/native/legacy/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/native/legacy/diskops.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/startup/__init__.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/startup/deps.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/startup/env.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell/startup/loader.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell.egg-info/dependency_links.txt +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell.egg-info/entry_points.txt +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell.egg-info/requires.txt +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/src/flyshell.egg-info/top_level.txt +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_auth.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_data.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_deps.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_directory.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_diskops_lgc.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_diskops_old.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_env.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_fs.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_loader.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_pkg.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_security.py +0 -0
- {flyshell-1.3.12 → flyshell-1.3.13}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flyshell
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.13
|
|
4
4
|
Summary: A modular, zero-dependency command-line environment in Python.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -21,7 +21,7 @@ Dynamic: license-file
|
|
|
21
21
|

|
|
22
22
|

|
|
23
23
|

|
|
24
|
-

|
|
25
25
|
|
|
26
26
|
> Documentation last updated: v1.3.0
|
|
27
27
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|

|
|
7
|
-

|
|
8
8
|
|
|
9
9
|
> Documentation last updated: v1.3.0
|
|
10
10
|
|
|
@@ -5,9 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[tool.cibuildwheel]
|
|
6
6
|
build = "cp310-* cp311-* cp312-* cp313-* cp314-*"
|
|
7
7
|
skip = "*-win32 *i686 *musllinux*"
|
|
8
|
-
|
|
9
|
-
test-requires = ["pytest"]
|
|
10
|
-
test-command = "pytest {project}/tests"
|
|
8
|
+
test-command = "python -c \"import flyshell; assert flyshell.check_native()\""
|
|
11
9
|
|
|
12
10
|
[tool.cibuildwheel.macos]
|
|
13
11
|
archs = ["x86_64", "arm64"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flyshell
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.13
|
|
4
4
|
Summary: A modular, zero-dependency command-line environment in Python.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -21,7 +21,7 @@ Dynamic: license-file
|
|
|
21
21
|

|
|
22
22
|

|
|
23
23
|

|
|
24
|
-

|
|
25
25
|
|
|
26
26
|
> Documentation last updated: v1.3.0
|
|
27
27
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# tests/test_diskops_ext.py
|
|
2
|
+
|
|
3
|
+
from flyshell.native import diskops_bridge as bridge
|
|
4
|
+
from flyshell.native import diskops_handler as handler
|
|
5
|
+
import flyshell
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_native_extension_loaded():
|
|
9
|
+
assert flyshell.check_native() is True
|
|
10
|
+
assert bridge.has_native_support() is True
|
|
11
|
+
assert bridge._native.ping() == 42
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_native_touch_creates_and_updates_file(tmp_path):
|
|
15
|
+
target = tmp_path / "native_touch.txt"
|
|
16
|
+
code, _ = bridge._native.touch(str(target))
|
|
17
|
+
assert code == 0
|
|
18
|
+
assert target.exists()
|
|
19
|
+
cmd = handler.Touch()
|
|
20
|
+
exit_code, msg = cmd.execute([str(target)])
|
|
21
|
+
assert exit_code == 0
|
|
22
|
+
assert "touched successfully" in msg
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_native_touch_errors(tmp_path):
|
|
26
|
+
missing_parent = tmp_path / "no_such_dir" / "file.txt"
|
|
27
|
+
code, _ = bridge._native.touch(str(missing_parent))
|
|
28
|
+
assert code == -1
|
|
29
|
+
cmd = handler.Touch()
|
|
30
|
+
exit_code, msg = cmd.execute([str(tmp_path)])
|
|
31
|
+
assert exit_code == 1
|
|
32
|
+
assert "Target is a directory, not a file" in msg
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def test_native_cat_reads_and_formats_content(tmp_path):
|
|
36
|
+
file_path = tmp_path / "native_cat.txt"
|
|
37
|
+
file_path.write_text("alpha\nbeta\ngamma\ndelta\n", encoding="utf-8")
|
|
38
|
+
code, raw_content = bridge._native.cat(str(file_path))
|
|
39
|
+
assert code == 0
|
|
40
|
+
assert "alpha" in raw_content and "delta" in raw_content
|
|
41
|
+
cmd = handler.Cat()
|
|
42
|
+
exit_code, msg = cmd.execute(["-n", "-l", "2", str(file_path)])
|
|
43
|
+
assert exit_code == 0
|
|
44
|
+
assert "1 | alpha" in msg
|
|
45
|
+
assert "2 | beta" in msg
|
|
46
|
+
assert "gamma" not in msg
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def test_native_cat_errors(tmp_path):
|
|
50
|
+
cmd = handler.Cat()
|
|
51
|
+
exit_code, msg = cmd.execute([str(tmp_path / "missing.txt")])
|
|
52
|
+
assert exit_code == 1
|
|
53
|
+
assert "File or path not found" in msg
|
|
54
|
+
empty_file = tmp_path / "empty.txt"
|
|
55
|
+
empty_file.write_text("", encoding="utf-8")
|
|
56
|
+
code, _ = bridge._native.cat(str(empty_file))
|
|
57
|
+
assert code == -8
|
|
58
|
+
exit_code, msg = cmd.execute([str(empty_file)])
|
|
59
|
+
assert exit_code == 1
|
|
60
|
+
assert "Target file is empty" in msg
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_native_dir_lists_entries_and_handles_errors(tmp_path):
|
|
64
|
+
(tmp_path / "folder_a").mkdir()
|
|
65
|
+
(tmp_path / "file_b.txt").write_text("hello", encoding="utf-8")
|
|
66
|
+
code, items = bridge._native.dir(str(tmp_path))
|
|
67
|
+
assert code == 0
|
|
68
|
+
assert ("folder_a", True) in items
|
|
69
|
+
assert ("file_b.txt", False) in items
|
|
70
|
+
cmd = handler.Dir()
|
|
71
|
+
exit_code, msg = cmd.execute([str(tmp_path)])
|
|
72
|
+
assert exit_code == 0
|
|
73
|
+
assert "[DIR] folder_a/" in msg
|
|
74
|
+
assert "[FILE] file_b.txt" in msg
|
|
75
|
+
assert "Total items in directory: 2" in msg
|
|
76
|
+
exit_code, msg = cmd.execute([str(tmp_path / "does_not_exist")])
|
|
77
|
+
assert exit_code == 1
|
|
78
|
+
assert "File or path not found" in msg
|
|
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
|