@wonderwhy-er/desktop-commander 0.3.2-alpha.1 → 0.3.2-alpha.3
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/dist/bootstrap.js +7 -7
- package/dist/command-manager.d.ts +98 -1
- package/dist/command-manager.js +200 -16
- package/dist/remote-device/desktop-commander-integration.js +3 -1
- package/dist/remote-device/diagnostics/redact.js +30 -8
- package/dist/remote-device/diagnostics/report.js +30 -13
- package/dist/remote-device/mqtt/mqtt-enrollment.js +1 -1
- package/dist/remote-device/mqtt/mqtt-transport.js +2 -2
- package/dist/remote-device/remote-channel.d.ts +1 -1
- package/dist/remote-device/remote-channel.js +1 -1
- package/dist/remote-device/transport-telemetry.js +5 -4
- package/dist/server.js +2 -0
- package/dist/terminal-manager.js +4 -6
- package/dist/tools/improved-process-tools.d.ts +2 -0
- package/dist/tools/improved-process-tools.js +68 -40
- package/dist/tools/pdf/markdown.js +7 -3
- package/dist/tools/process.js +10 -2
- package/dist/track-installation.js +2 -2
- package/dist/ui/file-preview/preview-runtime.js +145 -138
- package/dist/utils/brace-expansion.d.ts +25 -0
- package/dist/utils/brace-expansion.js +171 -0
- package/dist/utils/capture.d.ts +8 -2
- package/dist/utils/capture.js +1 -1
- package/dist/utils/cmd-commands.d.ts +3 -0
- package/dist/utils/cmd-commands.js +322 -0
- package/dist/utils/command-reading.d.ts +78 -0
- package/dist/utils/command-reading.js +7 -0
- package/dist/utils/command-wrappers.d.ts +45 -0
- package/dist/utils/command-wrappers.js +941 -0
- package/dist/utils/inline-shells.d.ts +64 -0
- package/dist/utils/inline-shells.js +290 -0
- package/dist/utils/posix-commands.d.ts +3 -0
- package/dist/utils/posix-commands.js +201 -0
- package/dist/utils/powershell-commands.d.ts +60 -0
- package/dist/utils/powershell-commands.js +420 -0
- package/dist/utils/process-tree.js +4 -4
- package/dist/utils/shell-script-files.d.ts +4 -0
- package/dist/utils/shell-script-files.js +121 -0
- package/dist/utils/shell.d.ts +36 -0
- package/dist/utils/shell.js +69 -0
- package/dist/utils/system-info.d.ts +2 -0
- package/dist/utils/system-info.js +5 -1
- package/dist/utils/threadpool-size.d.ts +36 -0
- package/dist/utils/threadpool-size.js +143 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +11 -9
- package/node_modules/@desktop-commander/telemetry-contract/README.md +0 -56
- package/node_modules/@desktop-commander/telemetry-contract/package.json +0 -32
- package/node_modules/@desktop-commander/telemetry-contract/transport.d.ts +0 -39
- package/node_modules/@desktop-commander/telemetry-contract/transport.js +0 -167
- package/vendor/telemetry-contract/README.md +0 -56
- package/vendor/telemetry-contract/package.json +0 -32
- package/vendor/telemetry-contract/transport.d.ts +0 -38
- package/vendor/telemetry-contract/transport.js +0 -164
- package/vendor/telemetry-contract/transport.test.js +0 -39
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FoundCommand } from './command-reading.js';
|
|
2
|
+
/**
|
|
3
|
+
* The commands that run in `shell`: each of `commands`, followed by the
|
|
4
|
+
* programs that the wrappers among them start (for env sudo ls: env, then
|
|
5
|
+
* sudo). A started program has its wrapper's start.
|
|
6
|
+
*/
|
|
7
|
+
export declare function withStartedPrograms(commands: FoundCommand[], shell: string): FoundCommand[];
|
|
8
|
+
/** Where a program's options end, in each way they can be read, and the command texts and programs they give */
|
|
9
|
+
export interface OptionReadings {
|
|
10
|
+
/** The first word after the options, in each reading: a wrapper's program, or a shell's script file */
|
|
11
|
+
operands: number[];
|
|
12
|
+
/**
|
|
13
|
+
* Each command text an option gives, or for a shell the first word after its options (bash -c 'sudo ls'), with
|
|
14
|
+
* the first word after it. The text is null when it is known only at run time, in whole or in part; `at` is then
|
|
15
|
+
* the word that holds it. It has no `at` when it is in the option's own word (--command='sudo ls'), and `to`
|
|
16
|
+
* when it is the words from `at` up to that one, joined with spaces (watch -n 5 sudo ls)
|
|
17
|
+
*/
|
|
18
|
+
texts: {
|
|
19
|
+
text: string | null;
|
|
20
|
+
at?: number;
|
|
21
|
+
to?: number;
|
|
22
|
+
after: number;
|
|
23
|
+
}[];
|
|
24
|
+
/** Each program an option names (start-stop-daemon --exec), null when known only at run time; `at` is its word, unless it is in the option's own */
|
|
25
|
+
programs: {
|
|
26
|
+
program: string | null;
|
|
27
|
+
at?: number;
|
|
28
|
+
}[];
|
|
29
|
+
/** Whether it also runs command texts that aren't among its words, as parallel's from a :::: file (see commandFiles) */
|
|
30
|
+
hidden: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** How a POSIX shell, by its name in POSIX_SHELLS, reads its own options (see BASH_OPTIONS) */
|
|
33
|
+
export declare function shellOptionReadings(program: string, words: (string | null)[]): OptionReadings;
|
|
34
|
+
/**
|
|
35
|
+
* For a program that runs one command text in a shell (see TEXT_PROGRAMS): its
|
|
36
|
+
* options read in every way, and the shell that reads its texts. Undefined for
|
|
37
|
+
* any other program.
|
|
38
|
+
*/
|
|
39
|
+
export declare function textProgramReadings(program: string, words: (string | null)[]): {
|
|
40
|
+
readings: OptionReadings;
|
|
41
|
+
shell: string;
|
|
42
|
+
arguments?: number[];
|
|
43
|
+
} | undefined;
|
|
44
|
+
/** For a program that runs one command text in the shell it was started from (see SAME_SHELL_PROGRAMS): its options read in every way */
|
|
45
|
+
export declare function sameShellProgramReadings(program: string, words: (string | null)[]): OptionReadings | undefined;
|