flyshell 1.1.11__tar.gz → 1.2.1__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.1.11/src/flyshell.egg-info → flyshell-1.2.1}/PKG-INFO +13 -5
- {flyshell-1.1.11 → flyshell-1.2.1}/README.md +12 -4
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/abstract/base_plugin.py +1 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/constants.py +2 -2
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/loader.py +23 -11
- {flyshell-1.1.11 → flyshell-1.2.1/src/flyshell.egg-info}/PKG-INFO +13 -5
- {flyshell-1.1.11 → flyshell-1.2.1}/LICENSE +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/pyproject.toml +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/setup.cfg +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/__init__.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/abstract/__init__.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/abstract/base_cmd.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/abstract/parent_cmd.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/builtin/__init__.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/builtin/diskops.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/builtin/fs.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/builtin/system.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/builtin/utils.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/__init__.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/auth.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/console.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/data.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/core/directory.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell/main.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell.egg-info/SOURCES.txt +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell.egg-info/dependency_links.txt +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell.egg-info/entry_points.txt +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell.egg-info/requires.txt +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/src/flyshell.egg-info/top_level.txt +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_auth.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_data.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_directory.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_diskops.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_fs.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_loader.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_security.py +0 -0
- {flyshell-1.1.11 → flyshell-1.2.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flyshell
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: A modular, zero-dependency command-line environment in Python.
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -23,7 +23,7 @@ Dynamic: license-file
|
|
|
23
23
|

|
|
24
24
|

|
|
25
25
|
|
|
26
|
-
> Documentation last updated: v1.
|
|
26
|
+
> Documentation last updated: v1.2.0
|
|
27
27
|
|
|
28
28
|
A modular, zero-dependency command-line environment and extensible runtime interface built in Python.
|
|
29
29
|
|
|
@@ -78,8 +78,12 @@ flyshell/
|
|
|
78
78
|
│ ├── test_auth.py
|
|
79
79
|
│ ├── test_data.py
|
|
80
80
|
│ ├── test_directory.py
|
|
81
|
+
│ ├── test_diskops.py
|
|
82
|
+
│ ├── test_fs.py
|
|
81
83
|
│ ├── test_loader.py
|
|
82
|
-
│
|
|
84
|
+
│ ├── test_security.py
|
|
85
|
+
│ └── test_utils.py
|
|
86
|
+
├── .flake8
|
|
83
87
|
├── .gitignore
|
|
84
88
|
├── LICENSE
|
|
85
89
|
├── pyproject.toml
|
|
@@ -115,6 +119,11 @@ cd flyshell
|
|
|
115
119
|
pip install -e .
|
|
116
120
|
```
|
|
117
121
|
|
|
122
|
+
After this, you can simply run Flyshell:
|
|
123
|
+
```bash
|
|
124
|
+
flyshell
|
|
125
|
+
```
|
|
126
|
+
|
|
118
127
|
### Adding optional dependencies
|
|
119
128
|
|
|
120
129
|
To install Readline (on Windows):
|
|
@@ -140,7 +149,7 @@ Flyshell also supports command chaining out of the box. Use `;` to chain command
|
|
|
140
149
|
|
|
141
150
|
Use `-h` or `--help` after any command to return that command's specific help list.
|
|
142
151
|
|
|
143
|
-
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D to close the session immediately.
|
|
152
|
+
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D / Ctrl + Z (different keybinds depending on your host configuration) to close the session immediately.
|
|
144
153
|
|
|
145
154
|
## Creating Custom Plugins
|
|
146
155
|
|
|
@@ -180,7 +189,6 @@ class MyPlugin(BasePlugin):
|
|
|
180
189
|
def on_unload(self): # (OPTIONAL) Enables your program to handle specialist shut-down tasks
|
|
181
190
|
super().on_unload() # If you use a custom on_unload(), end it with this
|
|
182
191
|
|
|
183
|
-
|
|
184
192
|
def execute(self, args): # This is what Flyshell calls to execute
|
|
185
193
|
print(f"Hello! Arguments: {args}")
|
|
186
194
|
return
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
> Documentation last updated: v1.
|
|
9
|
+
> Documentation last updated: v1.2.0
|
|
10
10
|
|
|
11
11
|
A modular, zero-dependency command-line environment and extensible runtime interface built in Python.
|
|
12
12
|
|
|
@@ -61,8 +61,12 @@ flyshell/
|
|
|
61
61
|
│ ├── test_auth.py
|
|
62
62
|
│ ├── test_data.py
|
|
63
63
|
│ ├── test_directory.py
|
|
64
|
+
│ ├── test_diskops.py
|
|
65
|
+
│ ├── test_fs.py
|
|
64
66
|
│ ├── test_loader.py
|
|
65
|
-
│
|
|
67
|
+
│ ├── test_security.py
|
|
68
|
+
│ └── test_utils.py
|
|
69
|
+
├── .flake8
|
|
66
70
|
├── .gitignore
|
|
67
71
|
├── LICENSE
|
|
68
72
|
├── pyproject.toml
|
|
@@ -98,6 +102,11 @@ cd flyshell
|
|
|
98
102
|
pip install -e .
|
|
99
103
|
```
|
|
100
104
|
|
|
105
|
+
After this, you can simply run Flyshell:
|
|
106
|
+
```bash
|
|
107
|
+
flyshell
|
|
108
|
+
```
|
|
109
|
+
|
|
101
110
|
### Adding optional dependencies
|
|
102
111
|
|
|
103
112
|
To install Readline (on Windows):
|
|
@@ -123,7 +132,7 @@ Flyshell also supports command chaining out of the box. Use `;` to chain command
|
|
|
123
132
|
|
|
124
133
|
Use `-h` or `--help` after any command to return that command's specific help list.
|
|
125
134
|
|
|
126
|
-
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D to close the session immediately.
|
|
135
|
+
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D / Ctrl + Z (different keybinds depending on your host configuration) to close the session immediately.
|
|
127
136
|
|
|
128
137
|
## Creating Custom Plugins
|
|
129
138
|
|
|
@@ -163,7 +172,6 @@ class MyPlugin(BasePlugin):
|
|
|
163
172
|
def on_unload(self): # (OPTIONAL) Enables your program to handle specialist shut-down tasks
|
|
164
173
|
super().on_unload() # If you use a custom on_unload(), end it with this
|
|
165
174
|
|
|
166
|
-
|
|
167
175
|
def execute(self, args): # This is what Flyshell calls to execute
|
|
168
176
|
print(f"Hello! Arguments: {args}")
|
|
169
177
|
return
|
|
@@ -24,36 +24,48 @@ def scan_plugins(plugin_folder=None):
|
|
|
24
24
|
candidates = {}
|
|
25
25
|
for item in folder.iterdir():
|
|
26
26
|
file_path = None
|
|
27
|
-
|
|
27
|
+
default_name = None
|
|
28
28
|
if item.is_file() and item.suffix == ".py" and not item.name.startswith("_"):
|
|
29
29
|
file_path = item
|
|
30
|
-
|
|
30
|
+
default_name = item.stem
|
|
31
31
|
elif item.is_dir() and not item.name.startswith((".", "_")):
|
|
32
32
|
entry = item / "plugin.py"
|
|
33
33
|
if entry.exists():
|
|
34
34
|
file_path = entry
|
|
35
|
-
|
|
36
|
-
if not file_path or not
|
|
35
|
+
default_name = item.name
|
|
36
|
+
if not file_path or not default_name:
|
|
37
37
|
continue
|
|
38
|
-
if
|
|
38
|
+
if default_name in RESERVED_NAMES:
|
|
39
39
|
print(
|
|
40
|
-
f"\n⚠️ Collision Error - Plugin '{
|
|
40
|
+
f"\n⚠️ Collision Error - Plugin '{default_name}' conflicts with a built-in Flyshell command and will not be loaded."
|
|
41
41
|
)
|
|
42
42
|
continue
|
|
43
43
|
try:
|
|
44
|
-
|
|
44
|
+
module_name = f"plugin_{default_name}"
|
|
45
|
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
|
45
46
|
if spec is None or spec.loader is None:
|
|
46
47
|
continue
|
|
47
48
|
module = importlib.util.module_from_spec(spec)
|
|
48
49
|
spec.loader.exec_module(module)
|
|
49
50
|
for _, obj in inspect.getmembers(module, inspect.isclass):
|
|
50
51
|
if issubclass(obj, BasePlugin) and obj is not BasePlugin:
|
|
51
|
-
|
|
52
|
+
resolved_name = getattr(obj, "identifier", None) or default_name
|
|
53
|
+
|
|
54
|
+
# Also verify the resolved identifier doesn't conflict with a reserved name
|
|
55
|
+
if resolved_name in RESERVED_NAMES:
|
|
56
|
+
print(
|
|
57
|
+
f"\n⚠️ Collision Error - Plugin '{resolved_name}' conflicts with a built-in Flyshell command and will not be loaded."
|
|
58
|
+
)
|
|
59
|
+
break
|
|
60
|
+
|
|
61
|
+
ctx = build_context(resolved_name, file_path)
|
|
52
62
|
instance = obj(ctx)
|
|
53
|
-
candidates.setdefault(
|
|
63
|
+
candidates.setdefault(resolved_name, []).append(
|
|
64
|
+
(instance, file_path)
|
|
65
|
+
)
|
|
54
66
|
break
|
|
55
67
|
except Exception as e:
|
|
56
|
-
print(f"\n⚠️ Plugin Failure - Failed to inspect '{
|
|
68
|
+
print(f"\n⚠️ Plugin Failure - Failed to inspect '{default_name}'")
|
|
57
69
|
print(f"Exception code: {e}, Flyshell will still launch.")
|
|
58
70
|
loaded_count = 0
|
|
59
71
|
first_print = True
|
|
@@ -72,7 +84,7 @@ def scan_plugins(plugin_folder=None):
|
|
|
72
84
|
if first_print:
|
|
73
85
|
print("\nInstalled Plugins:")
|
|
74
86
|
first_print = False
|
|
75
|
-
print(f"✅ - {name}")
|
|
87
|
+
print(f"✅ - {instance.name} ({name})")
|
|
76
88
|
loaded_count += 1
|
|
77
89
|
if loaded_count > 0:
|
|
78
90
|
print(f"\nTotal of {loaded_count} plugin(s) found.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flyshell
|
|
3
|
-
Version: 1.1
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: A modular, zero-dependency command-line environment in Python.
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -23,7 +23,7 @@ Dynamic: license-file
|
|
|
23
23
|

|
|
24
24
|

|
|
25
25
|
|
|
26
|
-
> Documentation last updated: v1.
|
|
26
|
+
> Documentation last updated: v1.2.0
|
|
27
27
|
|
|
28
28
|
A modular, zero-dependency command-line environment and extensible runtime interface built in Python.
|
|
29
29
|
|
|
@@ -78,8 +78,12 @@ flyshell/
|
|
|
78
78
|
│ ├── test_auth.py
|
|
79
79
|
│ ├── test_data.py
|
|
80
80
|
│ ├── test_directory.py
|
|
81
|
+
│ ├── test_diskops.py
|
|
82
|
+
│ ├── test_fs.py
|
|
81
83
|
│ ├── test_loader.py
|
|
82
|
-
│
|
|
84
|
+
│ ├── test_security.py
|
|
85
|
+
│ └── test_utils.py
|
|
86
|
+
├── .flake8
|
|
83
87
|
├── .gitignore
|
|
84
88
|
├── LICENSE
|
|
85
89
|
├── pyproject.toml
|
|
@@ -115,6 +119,11 @@ cd flyshell
|
|
|
115
119
|
pip install -e .
|
|
116
120
|
```
|
|
117
121
|
|
|
122
|
+
After this, you can simply run Flyshell:
|
|
123
|
+
```bash
|
|
124
|
+
flyshell
|
|
125
|
+
```
|
|
126
|
+
|
|
118
127
|
### Adding optional dependencies
|
|
119
128
|
|
|
120
129
|
To install Readline (on Windows):
|
|
@@ -140,7 +149,7 @@ Flyshell also supports command chaining out of the box. Use `;` to chain command
|
|
|
140
149
|
|
|
141
150
|
Use `-h` or `--help` after any command to return that command's specific help list.
|
|
142
151
|
|
|
143
|
-
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D to close the session immediately.
|
|
152
|
+
To close Flyshell once you are done, enter `kill` onto the command line then confirm, or press Ctrl + D / Ctrl + Z (different keybinds depending on your host configuration) to close the session immediately.
|
|
144
153
|
|
|
145
154
|
## Creating Custom Plugins
|
|
146
155
|
|
|
@@ -180,7 +189,6 @@ class MyPlugin(BasePlugin):
|
|
|
180
189
|
def on_unload(self): # (OPTIONAL) Enables your program to handle specialist shut-down tasks
|
|
181
190
|
super().on_unload() # If you use a custom on_unload(), end it with this
|
|
182
191
|
|
|
183
|
-
|
|
184
192
|
def execute(self, args): # This is what Flyshell calls to execute
|
|
185
193
|
print(f"Hello! Arguments: {args}")
|
|
186
194
|
return
|
|
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
|