pywebexec 1.9.7__tar.gz → 1.9.8__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 (58) hide show
  1. {pywebexec-1.9.7/pywebexec.egg-info → pywebexec-1.9.8}/PKG-INFO +10 -9
  2. {pywebexec-1.9.7 → pywebexec-1.9.8}/README.md +9 -8
  3. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/pywebexec.py +6 -4
  4. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/executables.js +2 -2
  5. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/swagger.yaml +6 -6
  6. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/version.py +2 -2
  7. {pywebexec-1.9.7 → pywebexec-1.9.8/pywebexec.egg-info}/PKG-INFO +10 -9
  8. {pywebexec-1.9.7 → pywebexec-1.9.8}/.github/workflows/python-publish.yml +0 -0
  9. {pywebexec-1.9.7 → pywebexec-1.9.8}/.gitignore +0 -0
  10. {pywebexec-1.9.7 → pywebexec-1.9.8}/LICENSE +0 -0
  11. {pywebexec-1.9.7 → pywebexec-1.9.8}/pyproject.toml +0 -0
  12. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/__init__.py +0 -0
  13. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/host_ip.py +0 -0
  14. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/css/style.css +0 -0
  15. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/css/xterm.css +0 -0
  16. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/fonts/CommitMonoNerdFontMono-Regular.ttf +0 -0
  17. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/fonts/LICENSE +0 -0
  18. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/aborted.svg +0 -0
  19. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/copy.svg +0 -0
  20. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/copy_ok.svg +0 -0
  21. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/down-arrow.svg +0 -0
  22. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/failed.svg +0 -0
  23. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/favicon.svg +0 -0
  24. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/fit-tty.svg +0 -0
  25. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/fit-win.svg +0 -0
  26. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/font-decrease.svg +0 -0
  27. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/font-increase.svg +0 -0
  28. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/norun.svg +0 -0
  29. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/pause.svg +0 -0
  30. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/popup.svg +0 -0
  31. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/resume.svg +0 -0
  32. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/running.svg +0 -0
  33. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/images/success.svg +0 -0
  34. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/marked/LICENSE.md +0 -0
  35. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/marked/marked.min.js +0 -0
  36. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/popup.js +0 -0
  37. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/script.js +0 -0
  38. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/LICENSE +0 -0
  39. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-canvas.js +0 -0
  40. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-canvas.js.map +0 -0
  41. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-fit.js +0 -0
  42. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-fit.js.map +0 -0
  43. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-unicode-graphemes.js +0 -0
  44. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-unicode-graphemes.js.map +0 -0
  45. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-unicode11.js +0 -0
  46. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/addon-unicode11.js.map +0 -0
  47. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/xterm.js +0 -0
  48. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/static/js/xterm/xterm.js.map +0 -0
  49. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/templates/__init__.py +0 -0
  50. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/templates/index.html +0 -0
  51. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec/templates/popup.html +0 -0
  52. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec.egg-info/SOURCES.txt +0 -0
  53. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec.egg-info/dependency_links.txt +0 -0
  54. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec.egg-info/entry_points.txt +0 -0
  55. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec.egg-info/requires.txt +0 -0
  56. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexec.egg-info/top_level.txt +0 -0
  57. {pywebexec-1.9.7 → pywebexec-1.9.8}/pywebexecdev +0 -0
  58. {pywebexec-1.9.7 → pywebexec-1.9.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.9.7
3
+ Version: 1.9.8
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -213,18 +213,19 @@ The help message is displayed:
213
213
 
214
214
  A swagger UI is available at `http[s]://<srv>/v0/documentation`
215
215
 
216
- <img src="https://github.com/user-attachments/assets/60649510-4edb-4275-9339-181b451c603b" width="400"/>
216
+ <img src="https://github.com/user-attachments/assets/c80a341e-c04c-4606-9510-a57b473a74e5" width="400"/>
217
217
 
218
218
  ## API reference
219
219
 
220
220
 
221
221
  | method | route | params/payload | returns
222
222
  |-----------|-----------------------------|--------------------|---------------------|
223
- | GET | /executables | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
223
+ | GET | /commands/exposed | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
224
224
  | GET | /commands | | commands: [<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;command_id: uuid<br>&nbsp;&nbsp;&nbsp;&nbsp;command: str<br>&nbsp;&nbsp;&nbsp;&nbsp;start_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;end_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;status: str<br>&nbsp;&nbsp;&nbsp;&nbsp;exit_code: int<br>&nbsp;&nbsp;&nbsp;&nbsp;last_output_line: str<br>&nbsp;&nbsp;},<br>] |
225
- | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
226
- | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
227
- | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
228
- | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
229
- | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
230
- | PATCH | /commands/{id}/stop | | message: str |
225
+ | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
226
+ | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
227
+ | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
228
+ | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
229
+ | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
230
+ | PATCH | /commands/{id}/stop | | message: str |
231
+
@@ -149,18 +149,19 @@ The help message is displayed:
149
149
 
150
150
  A swagger UI is available at `http[s]://<srv>/v0/documentation`
151
151
 
152
- <img src="https://github.com/user-attachments/assets/60649510-4edb-4275-9339-181b451c603b" width="400"/>
152
+ <img src="https://github.com/user-attachments/assets/c80a341e-c04c-4606-9510-a57b473a74e5" width="400"/>
153
153
 
154
154
  ## API reference
155
155
 
156
156
 
157
157
  | method | route | params/payload | returns
158
158
  |-----------|-----------------------------|--------------------|---------------------|
159
- | GET | /executables | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
159
+ | GET | /commands/exposed | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
160
160
  | GET | /commands | | commands: [<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;command_id: uuid<br>&nbsp;&nbsp;&nbsp;&nbsp;command: str<br>&nbsp;&nbsp;&nbsp;&nbsp;start_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;end_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;status: str<br>&nbsp;&nbsp;&nbsp;&nbsp;exit_code: int<br>&nbsp;&nbsp;&nbsp;&nbsp;last_output_line: str<br>&nbsp;&nbsp;},<br>] |
161
- | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
162
- | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
163
- | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
164
- | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
165
- | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
166
- | PATCH | /commands/{id}/stop | | message: str |
161
+ | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
162
+ | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
163
+ | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
164
+ | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
165
+ | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
166
+ | PATCH | /commands/{id}/stop | | message: str |
167
+
@@ -766,6 +766,12 @@ def run_command_endpoint():
766
766
 
767
767
  return jsonify({'message': 'Command is running', 'command_id': command_id})
768
768
 
769
+ @app.route('/commands/exposed', methods=['GET'])
770
+ def list_executables():
771
+ executables_list = get_executables()
772
+ return jsonify({"commands": executables_list})
773
+
774
+
769
775
  @app.route('/commands/<cmd>', methods=['POST'])
770
776
  def run_dynamic_command(cmd):
771
777
  # Validate that 'cmd' is an executable in the current directory
@@ -871,10 +877,6 @@ def get_command_output_raw(command_id):
871
877
  return
872
878
  return Response(generate(offset), content_type='text/plain')
873
879
 
874
- @app.route('/executables', methods=['GET'])
875
- def list_executables():
876
- executables_list = get_executables()
877
- return jsonify({"executables": executables_list})
878
880
 
879
881
  @app.route('/commands/<command_id>/popup')
880
882
  def popup(command_id):
@@ -225,7 +225,7 @@ window.addEventListener('load', () => {
225
225
 
226
226
  async function fetchExecutables() {
227
227
  try {
228
- const response = await fetch(`/executables`);
228
+ const response = await fetch(`/commands/exposed`);
229
229
  if (!response.ok) {
230
230
  throw new Error('Failed to fetch executables');
231
231
  }
@@ -233,7 +233,7 @@ async function fetchExecutables() {
233
233
  // Build mapping from executable name to its object
234
234
  gExecutables = {};
235
235
  commandListDiv.innerHTML = '';
236
- data.executables.forEach(exeObj => {
236
+ data.commands.forEach(exeObj => {
237
237
  gExecutables[exeObj.command] = exeObj;
238
238
  const div = document.createElement('div');
239
239
  div.className = 'command-item';
@@ -190,7 +190,7 @@ paths:
190
190
  properties:
191
191
  message:
192
192
  type: string
193
- /executables:
193
+ /commands/exposed:
194
194
  get:
195
195
  summary: "List available executable commands"
196
196
  tags:
@@ -199,11 +199,11 @@ paths:
199
199
  - application/json
200
200
  responses:
201
201
  "200":
202
- description: "List of executables returned as an array of executable objects"
202
+ description: "List of commands with markdown help"
203
203
  schema:
204
204
  type: object
205
205
  properties:
206
- executables:
206
+ commands:
207
207
  type: array
208
208
  items:
209
209
  type: object
@@ -214,8 +214,8 @@ paths:
214
214
  type: string
215
215
  examples:
216
216
  application/json:
217
- executables:
217
+ commands:
218
218
  - command: ls
219
- help: "List directory contents\nparams:\n <ls_params>"
219
+ help: "List directory contents \n**params**:\n* `<ls_params>`"
220
220
  - command: cat
221
- help: "Concatenate and display files\nparams:\n <cat_params>"
221
+ help: "Concatenate and display files \n**params**:\n* `<cat_params>`"
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.9.7'
21
- __version_tuple__ = version_tuple = (1, 9, 7)
20
+ __version__ = version = '1.9.8'
21
+ __version_tuple__ = version_tuple = (1, 9, 8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.9.7
3
+ Version: 1.9.8
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -213,18 +213,19 @@ The help message is displayed:
213
213
 
214
214
  A swagger UI is available at `http[s]://<srv>/v0/documentation`
215
215
 
216
- <img src="https://github.com/user-attachments/assets/60649510-4edb-4275-9339-181b451c603b" width="400"/>
216
+ <img src="https://github.com/user-attachments/assets/c80a341e-c04c-4606-9510-a57b473a74e5" width="400"/>
217
217
 
218
218
  ## API reference
219
219
 
220
220
 
221
221
  | method | route | params/payload | returns
222
222
  |-----------|-----------------------------|--------------------|---------------------|
223
- | GET | /executables | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
223
+ | GET | /commands/exposed | | executables: [<br>&nbsp;&nbsp;{command: str,help: str},<br>] |
224
224
  | GET | /commands | | commands: [<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;command_id: uuid<br>&nbsp;&nbsp;&nbsp;&nbsp;command: str<br>&nbsp;&nbsp;&nbsp;&nbsp;start_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;end_time: isotime<br>&nbsp;&nbsp;&nbsp;&nbsp;status: str<br>&nbsp;&nbsp;&nbsp;&nbsp;exit_code: int<br>&nbsp;&nbsp;&nbsp;&nbsp;last_output_line: str<br>&nbsp;&nbsp;},<br>] |
225
- | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
226
- | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
227
- | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
228
- | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
229
- | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
230
- | PATCH | /commands/{id}/stop | | message: str |
225
+ | GET | /commands/{id} | | command_id: uuid<br>command: str<br>params: array[str]<br>start_time: isotime<br>end_time: isotime<br>status: str<br>exit_code: int<br>last_output_line: str |
226
+ | GET | /commands/{id}/output | offset: int | output: str<br>status: str<br>links: { next: str } |
227
+ | GET | /commands/{id}/output_raw | offset: int | output: stream raw output until end of command<br>curl -Ns http://srv/commands/{id}/output_raw|
228
+ | POST | /commands | command: str<br>params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
229
+ | POST | /commands/{cmd} | params: array[str]<br>rows: int<br>cols: int | command_id: uuid<br>message: str |
230
+ | PATCH | /commands/{id}/stop | | message: str |
231
+
File without changes
File without changes
File without changes
File without changes
File without changes