pywebexec 1.4.0__py3-none-any.whl → 1.4.2__py3-none-any.whl

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.
@@ -253,11 +253,6 @@ body.dimmed * {
253
253
  left: 50%;
254
254
  transform: translate(-50%, -50%);
255
255
  }
256
- .xterm-cursor {
257
- display: none;
258
- visibility: hidden;
259
- height: 0px;
260
- }
261
256
  /* allow wide chars in terminal */
262
257
  span {
263
258
  letter-spacing: -0.03px !important;
@@ -2,13 +2,13 @@ let currentCommandId = null;
2
2
  let outputInterval = null;
3
3
  let nextOutputLink = null;
4
4
  let fullOutput = '';
5
-
5
+ let outputLength = 0;
6
6
 
7
7
  function initTerminal()
8
8
  {
9
9
  return new Terminal({
10
10
  cursorBlink: false,
11
- cursorHidden: true,
11
+ cursorInactiveStyle: 'none',
12
12
  disableStdin: true,
13
13
  convertEol: true,
14
14
  fontFamily: 'Consolas NF, monospace, courier-new, courier',
@@ -25,6 +25,7 @@ function initTerminal()
25
25
  brightBlack: "#243C4F",
26
26
  brightBlue: "#5584b1",
27
27
  },
28
+ customGlyphs: false,
28
29
  rescaleOverlappingGlyphs: true,
29
30
  });
30
31
  }
@@ -130,16 +131,14 @@ async function fetchOutput(url) {
130
131
  } else {
131
132
  slider = document.getElementById('outputSlider')
132
133
  percentage = slider.value;
134
+ fullOutput += data.output;
133
135
  if (percentage == 100)
134
- terminal.write(data.output);
136
+ terminal.write(data.output); //.replace(/ \r/g, "\r\n")); tty size mismatch
135
137
  else {
136
- length = Math.floor((fullOutput.length * percentage) / 100);
137
- newlength = fullOutput.length + data.output.length;
138
- percentage = Math.floor(length/newlength * 100);
138
+ percentage = Math.round((outputLength * 100)/fullOutput.length);
139
139
  slider.value = percentage;
140
140
  document.getElementById('outputPercentage').innerText = `${percentage}%`;
141
141
  }
142
- fullOutput += data.output;
143
142
  nextOutputLink = data.links.next;
144
143
  if (data.status != 'running') {
145
144
  clearInterval(outputInterval);
@@ -165,6 +164,10 @@ async function viewOutput(command_id) {
165
164
  return;
166
165
  }
167
166
  const data = await response.json();
167
+ if (data.command == 'term')
168
+ terminal.options.cursorInactiveStyle = 'outline';
169
+ else
170
+ terminal.options.cursorInactiveStyle = 'none';
168
171
  if (data.status === 'running') {
169
172
  fetchOutput(nextOutputLink);
170
173
  outputInterval = setInterval(() => fetchOutput(nextOutputLink), 1000);
@@ -298,7 +301,7 @@ function sliderUpdateOutput()
298
301
  {
299
302
  const slider = document.getElementById('outputSlider');
300
303
  const percentage = slider.value;
301
- const outputLength = Math.floor((fullOutput.length * percentage) / 100);
304
+ outputLength = Math.floor((fullOutput.length * percentage) / 100);
302
305
  const limitedOutput = fullOutput.slice(0, outputLength);
303
306
  terminal.clear();
304
307
  terminal.reset();
pywebexec/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.4.0'
16
- __version_tuple__ = version_tuple = (1, 4, 0)
15
+ __version__ = version = '1.4.2'
16
+ __version_tuple__ = version_tuple = (1, 4, 2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pywebexec
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: Simple Python HTTP Exec Server
5
5
  Home-page: https://github.com/joknarf/pywebexec
6
6
  Author: Franck Jouvanceau
@@ -36,7 +36,6 @@ Classifier: Intended Audience :: System Administrators
36
36
  Classifier: License :: OSI Approved :: MIT License
37
37
  Classifier: Operating System :: POSIX
38
38
  Classifier: Operating System :: Unix
39
- Classifier: Operating System :: Microsoft :: Windows
40
39
  Classifier: Operating System :: MacOS
41
40
  Classifier: Programming Language :: Python
42
41
  Classifier: Programming Language :: Python :: 3
@@ -57,6 +56,7 @@ Requires-Dist: python-daemon>=2.3.2
57
56
  Requires-Dist: cryptography>=40.0.2
58
57
  Requires-Dist: Flask>=2.0.3
59
58
  Requires-Dist: Flask-HTTPAuth>=4.8.0
59
+ Requires-Dist: pexpect>=4.9.0
60
60
  Requires-Dist: gunicorn>=21.2.0
61
61
  Requires-Dist: ldap3>=2.9.1
62
62
 
@@ -95,6 +95,7 @@ all commands output / statuses are available in the executables directory in sub
95
95
  * Launch commands with params from web browser or API call
96
96
  * multiple share terminal output
97
97
  * Follow live output
98
+ * Replay terminal history
98
99
  * Stop command
99
100
  * Relaunch command
100
101
  * HTTPS support
@@ -1,8 +1,8 @@
1
1
  pywebexec/__init__.py,sha256=4spIsVaF8RJt8S58AG_wWoORRNkws9Iwqprj27C3ljM,99
2
2
  pywebexec/pywebexec.py,sha256=O3_iTeNw6ekF-f7-xO_wL0MDMm72v_onrcrB4repxk4,26124
3
- pywebexec/version.py,sha256=R8-T9fmURjcuoxYpHTAjyNAhgJPDtI2jogCjqYYkfCU,411
3
+ pywebexec/version.py,sha256=tX44urJsC0QN5SJ51xsM0HeojA_8Xx7NXFEGAkYlNE4,411
4
4
  pywebexec/static/css/Consolas NF.ttf,sha256=DJEOzF0eqZ-kxu3Gs_VE8X0NJqiobBzmxWDGpdgGRxI,1313900
5
- pywebexec/static/css/style.css,sha256=iLX6k1hoWLinZWyqtbH50U-0hND2M-5_Zr1U1UC_gos,5578
5
+ pywebexec/static/css/style.css,sha256=b02WQoXwVm00JpedEslvCHjr35txo2Bfjz3Iboco9U8,5500
6
6
  pywebexec/static/css/xterm.css,sha256=gy8_LGA7Q61DUf8ElwFQzHqHMBQnbbEmpgZcbdgeSHI,5383
7
7
  pywebexec/static/images/aborted.svg,sha256=_mP43hU5QdRLFZIknBgjx-dIXrHgQG23-QV27ApXK2A,381
8
8
  pywebexec/static/images/copy.svg,sha256=d9OwtGh5GzzZHzYcDrLfNxZYLth1Q64x7bRyYxu4Px0,622
@@ -13,16 +13,16 @@ pywebexec/static/images/favicon.svg,sha256=ti80IfuDZwIvQcmJxkOeUaB1iMsiyOPmQmVO-
13
13
  pywebexec/static/images/running.gif,sha256=iYuzQGkMxrakSIwt6gPieKCImGZoSAHmU5MUNZa7cpw,25696
14
14
  pywebexec/static/images/success.svg,sha256=PJDcCSTevJh7rkfSFLtc7P0pbeh8PVQBS8DaOLQemmc,489
15
15
  pywebexec/static/js/commands.js,sha256=VdMeCop9V5KwsR2v1J_OY1xFE7tJUYgcMg_lh2VGNjs,7476
16
- pywebexec/static/js/script.js,sha256=C7n41Isu3HNi2NTaXFYeztFMGOx-R6TCK24N0dZ_Azw,11429
16
+ pywebexec/static/js/script.js,sha256=_Z1P65x-s_heHMwXbVpPHJHqfQKcIZavVhRej6i3DIs,11570
17
17
  pywebexec/static/js/xterm/LICENSE,sha256=EU1P4eXTull-_T9I80VuwnJXubB-zLzUl3xpEYj2T1M,1083
18
18
  pywebexec/static/js/xterm/ansi_up.min.js,sha256=KNGV0vEr30hNqKQimTAvGVy-icD5A1JqMQTtvYtKR2Y,13203
19
19
  pywebexec/static/js/xterm/xterm-addon-fit.js,sha256=Pprm9pZe4SadVXS5Bc8b9VnC9Ex4QlWwA0pxOH53Gck,1460
20
20
  pywebexec/static/js/xterm/xterm.js,sha256=Bzka76jZwEhVt_LlS0e0qMw7ryGa1p5qfxFyeohphBo,283371
21
21
  pywebexec/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  pywebexec/templates/index.html,sha256=DYtT555wSNhnFtzzHhPMWJireynCJNnAuTytpoORQeE,2321
23
- pywebexec-1.4.0.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
- pywebexec-1.4.0.dist-info/METADATA,sha256=DPx9rM-cTxia4_yYTq0oB-lVtZONKe-f2gWn329n2oc,7397
25
- pywebexec-1.4.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
- pywebexec-1.4.0.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
- pywebexec-1.4.0.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
- pywebexec-1.4.0.dist-info/RECORD,,
23
+ pywebexec-1.4.2.dist-info/LICENSE,sha256=gRJf0JPT_wsZJsUGlWPTS8Vypfl9vQ1qjp6sNbKykuA,1064
24
+ pywebexec-1.4.2.dist-info/METADATA,sha256=JUAk1R0g1qODAIcV0baR36FNZTJNI4fNCQVGEbSzmBA,7399
25
+ pywebexec-1.4.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
26
+ pywebexec-1.4.2.dist-info/entry_points.txt,sha256=l52GBkPCXRkmlHfEyoVauyfBdg8o-CAtC8qQpOIjJK0,55
27
+ pywebexec-1.4.2.dist-info/top_level.txt,sha256=vHoHyzngrfGdm_nM7Xn_5iLmaCrf10XO1EhldgNLEQ8,10
28
+ pywebexec-1.4.2.dist-info/RECORD,,