dsh-remote 0.8.92 → 0.8.94
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.
- package/LICENSE +21 -21
- package/README.en.md +369 -369
- package/README.md +354 -354
- package/cordis.patch.yml +9 -9
- package/lib/audit.js +45 -45
- package/lib/binding.js +172 -172
- package/lib/boot.js +42 -0
- package/lib/client.js +4661 -4647
- package/lib/credential.js +270 -270
- package/lib/errors.js +141 -141
- package/lib/exec-job.js +242 -242
- package/lib/file-reference.js +457 -457
- package/lib/forwards.js +258 -258
- package/lib/host-api.js +822 -822
- package/lib/hostkey.js +108 -108
- package/lib/http-transport.js +201 -201
- package/lib/ignore.js +202 -202
- package/lib/index.js +4488 -4488
- package/lib/instructions-dynamic.js +415 -415
- package/lib/instructions.js +288 -288
- package/lib/open-folder.js +56 -56
- package/lib/openssh.js +940 -940
- package/lib/paths.js +292 -292
- package/lib/pool.js +1029 -1029
- package/lib/posix-shell.cjs +34 -34
- package/lib/registry.js +296 -296
- package/lib/remote-fs.js +173 -173
- package/lib/remote-sandbox.js +183 -183
- package/lib/remote-shell-child.cjs +397 -397
- package/lib/remote-shell.js +697 -697
- package/lib/remote-skills.js +312 -312
- package/lib/routes-audit.js +58 -58
- package/lib/routes-forwards.js +72 -72
- package/lib/routes-fs.js +251 -251
- package/lib/routes-machines.js +186 -186
- package/lib/routes-misc.js +187 -187
- package/lib/routes-term.js +169 -169
- package/lib/routes-update.js +143 -143
- package/lib/routes-web-attach.js +112 -112
- package/lib/routes-workspace.js +312 -312
- package/lib/search.js +235 -235
- package/lib/self-heal.js +130 -0
- package/lib/sftp-surface.js +119 -119
- package/lib/sshconfig.js +779 -779
- package/lib/sync.js +350 -350
- package/lib/tasks.js +95 -95
- package/lib/telemetry.js +247 -247
- package/lib/terminal.js +205 -205
- package/lib/tui/flow.js +130 -130
- package/lib/tui/format.js +380 -380
- package/lib/tui/i18n.js +350 -350
- package/lib/tui/index.js +531 -531
- package/lib/tui/provider.js +344 -344
- package/lib/tui/scene.js +986 -986
- package/lib/update.js +490 -472
- package/lib/web-attach.js +860 -860
- package/lib/workspace-cleanup.js +337 -337
- package/package.json +103 -103
package/lib/posix-shell.cjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Quote one string for a POSIX shell using single quotes only.
|
|
5
|
-
*
|
|
6
|
-
* A single quote inside the value is emitted as the three-step sequence
|
|
7
|
-
* close-quote, escaped-quote, reopen-quote. The result preserves the value
|
|
8
|
-
* literally, including newlines, dollar signs, backticks and double quotes.
|
|
9
|
-
*
|
|
10
|
-
* @param {unknown} value
|
|
11
|
-
* @returns {string}
|
|
12
|
-
*/
|
|
13
|
-
function quotePosix(value) {
|
|
14
|
-
return "'" + String(value).replace(/'/g, "'\\''") + "'"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Run a generated POSIX script through `sh` instead of the remote login shell.
|
|
19
|
-
*
|
|
20
|
-
* sshd gives an exec request to the user's login shell. That shell may be fish,
|
|
21
|
-
* csh or another non-POSIX implementation, while this package's internal launch
|
|
22
|
-
* and probe scripts are deliberately POSIX. The outer shell only has to parse
|
|
23
|
-
* the simple `sh -c '<quoted script>'` invocation; `sh` then parses the actual
|
|
24
|
-
* script. Generic rw_exec commands are NOT routed through this helper, so users
|
|
25
|
-
* retain their login-shell semantics.
|
|
26
|
-
*
|
|
27
|
-
* @param {string} command
|
|
28
|
-
* @returns {string}
|
|
29
|
-
*/
|
|
30
|
-
function posixViaSh(command) {
|
|
31
|
-
return `sh -c ${quotePosix(command)}`
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
module.exports = { posixViaSh, quotePosix }
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Quote one string for a POSIX shell using single quotes only.
|
|
5
|
+
*
|
|
6
|
+
* A single quote inside the value is emitted as the three-step sequence
|
|
7
|
+
* close-quote, escaped-quote, reopen-quote. The result preserves the value
|
|
8
|
+
* literally, including newlines, dollar signs, backticks and double quotes.
|
|
9
|
+
*
|
|
10
|
+
* @param {unknown} value
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
function quotePosix(value) {
|
|
14
|
+
return "'" + String(value).replace(/'/g, "'\\''") + "'"
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Run a generated POSIX script through `sh` instead of the remote login shell.
|
|
19
|
+
*
|
|
20
|
+
* sshd gives an exec request to the user's login shell. That shell may be fish,
|
|
21
|
+
* csh or another non-POSIX implementation, while this package's internal launch
|
|
22
|
+
* and probe scripts are deliberately POSIX. The outer shell only has to parse
|
|
23
|
+
* the simple `sh -c '<quoted script>'` invocation; `sh` then parses the actual
|
|
24
|
+
* script. Generic rw_exec commands are NOT routed through this helper, so users
|
|
25
|
+
* retain their login-shell semantics.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} command
|
|
28
|
+
* @returns {string}
|
|
29
|
+
*/
|
|
30
|
+
function posixViaSh(command) {
|
|
31
|
+
return `sh -c ${quotePosix(command)}`
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = { posixViaSh, quotePosix }
|