Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Jun 20, 2022
1 parent 5b14dd6 commit 6268e23
Show file tree
Hide file tree
Showing 13 changed files with 2,165 additions and 6,478 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [12, 14, 16]
node-version: [14, 16, 18]
python-version: [2.7, "3.10"]

steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -64,7 +64,7 @@ You can't pass handles to a remote child process like you can with local child p
- `cp-remote` calls [`child_process.spawn`](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) to [run](#runhost-module_path) a Bash script, [`cp-remote.sh`](cp-remote.sh). The IPC channel will be on `$NODE_CHANNEL_FD`.
- `cp-remote.sh` runs `socat`, telling it to relay data between `$NODE_CHANNEL_FD` and an SSH connection to the remote host.
- The SSH connection is told to start [`cp-remote.py`](cp-remote.py) on the remote host.
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/2.7/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/3/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` starts `socat`, telling it to relay data between standard input (i.e. the SSH connection) and one of the connected file descriptors.
- `cp-remote.py` sets `NODE_CHANNEL_FD` to the other connected file descriptor and starts `node`, telling it to [run](#runhost-module_path) the module you specified.

Expand Down
8 changes: 8 additions & 0 deletions coverage/lcov-report/block-navigation.js
Expand Up @@ -63,6 +63,14 @@ var jumpToCode = (function init() {
}

return function jump(event) {
if (
document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null
) {
// if we're currently focused on the search input, we don't want to navigate
return;
}

switch (event.which) {
case 78: // n
case 74: // j
Expand Down
11 changes: 8 additions & 3 deletions coverage/lcov-report/index.html
Expand Up @@ -54,6 +54,12 @@ <h1>All files</h1>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<div class="pad1">
Expand Down Expand Up @@ -109,10 +115,9 @@ <h1>All files</h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Nov 14 2021 07:37:57 GMT+0000 (Greenwich Mean Time)
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at Mon Jun 20 2022 08:47:22 GMT+0100 (British Summer Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
Expand Down
17 changes: 11 additions & 6 deletions coverage/lcov-report/index.js.html
Expand Up @@ -54,6 +54,12 @@ <h1><a href="index.html">All files</a> index.js</h1>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
Expand Down Expand Up @@ -328,7 +334,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/**
# cp-remote&amp;nbsp;&amp;nbsp;&amp;nbsp;[![Build Status](https://travis-ci.org/davedoesdev/cp-remote.png)](https://travis-ci.org/davedoesdev/cp-remote) [![Coverage Status](https://coveralls.io/repos/davedoesdev/cp-remote/badge.png?branch=master)](https://coveralls.io/r/davedoesdev/cp-remote?branch=master) [![NPM version](https://badge.fury.io/js/cp-remote.png)](http://badge.fury.io/js/cp-remote)
# cp-remote&amp;nbsp;&amp;nbsp;&amp;nbsp;[![Build Status](https://github.com/davedoesdev/cp-remote/actions/workflows/ci.yml/badge.svg)](https://github.com/davedoesdev/cp-remote/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/davedoesdev/cp-remote/badge.png?branch=master)](https://coveralls.io/r/davedoesdev/cp-remote?branch=master) [![NPM version](https://badge.fury.io/js/cp-remote.png)](http://badge.fury.io/js/cp-remote)
&nbsp;
Node.js [`child_process`](http://nodejs.org/api/child_process.html) done remotely, IPC channel intact!
&nbsp;
Expand Down Expand Up @@ -394,7 +400,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
- `cp-remote` calls [`child_process.spawn`](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) to run a Bash script, [`cp-remote.sh`](cp-remote.sh). The IPC channel will be on `$NODE_CHANNEL_FD`.
- `cp-remote.sh` runs `socat`, telling it to relay data between `$NODE_CHANNEL_FD` and an SSH connection to the remote host.
- The SSH connection is told to start [`cp-remote.py`](cp-remote.py) on the remote host.
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/2.7/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/3/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` starts `socat`, telling it to relay data between standard input (i.e. the SSH connection) and one of the connected file descriptors.
- `cp-remote.py` sets `NODE_CHANNEL_FD` to the other connected file descriptor and starts `node`, telling it to run the module you specified.
&nbsp;
Expand Down Expand Up @@ -426,7 +432,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
grunt coverage --remote=&lt;host1&gt; --remote=&lt;host2&gt; ...
```
&nbsp;
[Istanbul](http://gotwarlost.github.io/istanbul/) results are available [here](http://rawgit.davedoesdev.com/davedoesdev/cp-remote/master/coverage/lcov-report/index.html).
[c8](https://github.com/bcoe/c8) results are available [here](http://rawgit.davedoesdev.com/davedoesdev/cp-remote/master/coverage/lcov-report/index.html).
&nbsp;
Coveralls page is [here](https://coveralls.io/r/davedoesdev/cp-remote).
&nbsp;
Expand Down Expand Up @@ -468,10 +474,9 @@ <h1><a href="index.html">All files</a> index.js</h1>
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Nov 14 2021 07:37:57 GMT+0000 (Greenwich Mean Time)
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at Mon Jun 20 2022 08:47:22 GMT+0100 (British Summer Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
Expand Down
13 changes: 9 additions & 4 deletions coverage/lcov-report/packed.js.html
Expand Up @@ -54,22 +54,27 @@ <h1><a href="index.html">All files</a> packed.js</h1>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = "import binascii;exec(binascii.unhexlify('23212f7573722f62696e2f656e7620707974686f6e0a0a696d706f727420736f636b65740a696d706f72742073756270726f636573730a696d706f7274206f730a696d706f7274207379730a696d706f727420746872656164696e670a0a61726773203d2067657461747472285f5f6275696c74696e735f5f2c0a202020202020202020202020202020277261775f696e707574272c0a2020202020202020202020202020206c616d6264613a206f70656e28302c20277262272c20627566666572696e673d302c20636c6f736566643d46616c7365292e726561646c696e6528295b303a2d315d2928295b313a2d315d0a0a73312c7332203d20736f636b65742e736f636b65747061697228290a69662068617361747472286f732c20277365745f696e686572697461626c6527293a0a202020206f732e7365745f696e686572697461626c652873312e66696c656e6f28292c2054727565290a202020206f732e7365745f696e686572697461626c652873322e66696c656e6f28292c2054727565290a0a7031203d2073756270726f636573732e506f70656e285b27736f636174272c20272d272c202746443a27202b207374722873312e66696c656e6f2829295d2c20636c6f73655f6664733d46616c7365290a0a656e76203d2064696374286f732e656e7669726f6e290a656e765b274e4f44455f4348414e4e454c5f4644275d203d207374722873322e66696c656e6f2829290a0a7032203d2073756270726f636573732e506f70656e285b276e6f6465272c20272d65272c202770726f636573732e61726776203d205b70726f636573732e617267765b305d2c2070726f636573732e617267765b315d5d2e636f6e636174284a534f4e2e7061727365284275666665722e66726f6d2870726f636573732e617267765b325d2c2022686578222929293b20736574496d6d6564696174652866756e6374696f6e202829207b2072657175697265287265717569726528227061746822292e7265736f6c76652870726f636573732e617267765b315d29293b207d29272c207379732e617267765b315d2c20617267735d2c20656e763d656e762c20737464696e3d73756270726f636573732e504950452c207374646f75743d322c20636c6f73655f6664733d46616c7365290a70322e737464696e2e636c6f736528290a0a2373312e636c6f736528290a2373322e636c6f736528290a0a646f6e65203d2046616c73650a0a636c617373205761697454687265616428746872656164696e672e546872656164293a0a202020206465662072756e2873656c66293a0a202020202020202070312e7761697428290a20202020202020206966206e6f7420646f6e653a2070322e6b696c6c28290a0a746872656164203d205761697454687265616428290a7468726561642e737461727428290a0a70322e7761697428290a646f6e65203d20547275650a70312e6b696c6c28290a'))"
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">module.exports = "import binascii;exec(binascii.unhexlify('23212f7573722f62696e2f656e7620707974686f6e330a0a696d706f727420736f636b65740a696d706f72742073756270726f636573730a696d706f7274206f730a696d706f7274207379730a696d706f727420746872656164696e670a0a61726773203d2067657461747472285f5f6275696c74696e735f5f2c0a202020202020202020202020202020277261775f696e707574272c0a2020202020202020202020202020206c616d6264613a206f70656e28302c20277262272c20627566666572696e673d302c20636c6f736566643d46616c7365292e726561646c696e6528295b303a2d315d2928295b313a2d315d0a0a73312c7332203d20736f636b65742e736f636b65747061697228290a69662068617361747472286f732c20277365745f696e686572697461626c6527293a0a202020206f732e7365745f696e686572697461626c652873312e66696c656e6f28292c2054727565290a202020206f732e7365745f696e686572697461626c652873322e66696c656e6f28292c2054727565290a0a7031203d2073756270726f636573732e506f70656e285b27736f636174272c20272d272c202746443a27202b207374722873312e66696c656e6f2829295d2c20636c6f73655f6664733d46616c7365290a0a656e76203d2064696374286f732e656e7669726f6e290a656e765b274e4f44455f4348414e4e454c5f4644275d203d207374722873322e66696c656e6f2829290a0a7032203d2073756270726f636573732e506f70656e285b276e6f6465272c20272d65272c202770726f636573732e61726776203d205b70726f636573732e617267765b305d2c2070726f636573732e617267765b315d5d2e636f6e636174284a534f4e2e7061727365284275666665722e66726f6d2870726f636573732e617267765b325d2c2022686578222929293b20736574496d6d6564696174652866756e6374696f6e202829207b2072657175697265287265717569726528227061746822292e7265736f6c76652870726f636573732e617267765b315d29293b207d29272c207379732e617267765b315d2c20617267735d2c20656e763d656e762c20737464696e3d73756270726f636573732e504950452c207374646f75743d322c20636c6f73655f6664733d46616c7365290a70322e737464696e2e636c6f736528290a0a2373312e636c6f736528290a2373322e636c6f736528290a0a646f6e65203d2046616c73650a0a636c617373205761697454687265616428746872656164696e672e546872656164293a0a202020206465662072756e2873656c66293a0a202020202020202070312e7761697428290a20202020202020206966206e6f7420646f6e653a2070322e6b696c6c28290a0a746872656164203d205761697454687265616428290a7468726561642e737461727428290a0a70322e7761697428290a646f6e65203d20547275650a70312e6b696c6c28290a'))"
&nbsp;</pre></td></tr></table></pre>

<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
at Sun Nov 14 2021 07:37:57 GMT+0000 (Greenwich Mean Time)
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at Mon Jun 20 2022 08:47:22 GMT+0100 (British Summer Time)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
Expand Down
26 changes: 26 additions & 0 deletions coverage/lcov-report/sorter.js
Expand Up @@ -24,6 +24,31 @@ var addSorting = (function() {
return getTableHeader().querySelectorAll('th')[n];
}

function onFilterInput() {
const searchValue = document.getElementById('fileSearch').value;
const rows = document.getElementsByTagName('tbody')[0].children;
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (
row.textContent
.toLowerCase()
.includes(searchValue.toLowerCase())
) {
row.style.display = '';
} else {
row.style.display = 'none';
}
}
}

// loads the search box
function addSearchBox() {
var template = document.getElementById('filterTemplate');
var templateClone = template.content.cloneNode(true);
templateClone.getElementById('fileSearch').oninput = onFilterInput;
template.parentElement.appendChild(templateClone);
}

// loads all columns
function loadColumns() {
var colNodes = getTableHeader().querySelectorAll('th'),
Expand Down Expand Up @@ -162,6 +187,7 @@ var addSorting = (function() {
}
cols = loadColumns();
loadData();
addSearchBox();
addSortIndicators();
enableUI();
};
Expand Down
2 changes: 1 addition & 1 deletion cp-remote.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import socket
import subprocess
Expand Down
2 changes: 1 addition & 1 deletion cp-remote.sh
@@ -1,2 +1,2 @@
#!/bin/bash
exec socat FD:$NODE_CHANNEL_FD "EXEC:ssh $1 python -u -c exec\\\\\\\(getattr\\\\\\\(__builtins__,\\\\\\\'raw_input\\\\\\\',lambda:open\\\\\\\(0,\\\\\\\'rb\\\\\\\',buffering=0,closefd=False\\\\\\\).readline\\\\\\\(\\\\\\\)[0:-1]\\\\\\\)\\\\\\\(\\\\\\\)[1:-1]\\\\\\\) $2"
exec socat FD:$NODE_CHANNEL_FD "EXEC:ssh $1 python3 -u -c exec\\\\\\\(getattr\\\\\\\(__builtins__,\\\\\\\'raw_input\\\\\\\',lambda:open\\\\\\\(0,\\\\\\\'rb\\\\\\\',buffering=0,closefd=False\\\\\\\).readline\\\\\\\(\\\\\\\)[0:-1]\\\\\\\)\\\\\\\(\\\\\\\)[1:-1]\\\\\\\) $2"
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -65,7 +65,7 @@ You can't pass handles to a remote child process like you can with local child p
- `cp-remote` calls [`child_process.spawn`](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) to run a Bash script, [`cp-remote.sh`](cp-remote.sh). The IPC channel will be on `$NODE_CHANNEL_FD`.
- `cp-remote.sh` runs `socat`, telling it to relay data between `$NODE_CHANNEL_FD` and an SSH connection to the remote host.
- The SSH connection is told to start [`cp-remote.py`](cp-remote.py) on the remote host.
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/2.7/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` calls [`socket.socketpair`](http://docs.python.org/3/library/socket.html#socket.socketpair) to create a pair of connected file descriptors (Unix domain sockets).
- `cp-remote.py` starts `socat`, telling it to relay data between standard input (i.e. the SSH connection) and one of the connected file descriptors.
- `cp-remote.py` sets `NODE_CHANNEL_FD` to the other connected file descriptor and starts `node`, telling it to run the module you specified.
Expand Down

0 comments on commit 6268e23

Please sign in to comment.