@qodalis/cli 2.0.0-beta.6 → 2.0.0-beta.8
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/package.json +2 -2
- package/public-api.d.mts +100 -136
- package/public-api.d.ts +100 -136
- package/public-api.js +2904 -1354
- package/public-api.js.map +1 -1
- package/public-api.mjs +2904 -1350
- package/public-api.mjs.map +1 -1
- package/wasm/qodalis_cli_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qodalis/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.8",
|
|
4
4
|
"description": "Framework-agnostic CLI engine for @qodalis terminal applications.",
|
|
5
5
|
"author": "Nicolae Lupei, Qodalis Solutions",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./assets/*": "./assets/*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@qodalis/cli-core": "2.0.0-beta.
|
|
33
|
+
"@qodalis/cli-core": "2.0.0-beta.8",
|
|
34
34
|
"@xterm/xterm": "^5.5.0",
|
|
35
35
|
"@xterm/addon-fit": "^0.10.0",
|
|
36
36
|
"@xterm/addon-web-links": "^0.11.0",
|
package/public-api.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _qodalis_cli_core from '@qodalis/cli-core';
|
|
2
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore,
|
|
2
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, ICliGlobalParameterHandler, CliProvider, CliForegroundColor, CliBackgroundColor, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegistry, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliIcon } from '@qodalis/cli-core';
|
|
3
3
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
4
4
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
5
5
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
@@ -140,7 +140,7 @@ declare const CliBackgroundServiceRegistry_TOKEN = "cli-background-service-regis
|
|
|
140
140
|
*/
|
|
141
141
|
declare const CliPackageManagerService_TOKEN = "cli-package-manager-service";
|
|
142
142
|
|
|
143
|
-
declare const LIBRARY_VERSION = "2.0.0-beta.
|
|
143
|
+
declare const LIBRARY_VERSION = "2.0.0-beta.8";
|
|
144
144
|
declare const API_VERSION = 2;
|
|
145
145
|
|
|
146
146
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -158,18 +158,6 @@ declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
|
158
158
|
initialize(context: ICliExecutionContext): Promise<void>;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
declare class CliBase64CommandProcessor implements ICliCommandProcessor {
|
|
162
|
-
command: string;
|
|
163
|
-
aliases: string[];
|
|
164
|
-
description: string;
|
|
165
|
-
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
166
|
-
processors?: ICliCommandProcessor[];
|
|
167
|
-
metadata?: CliProcessorMetadata;
|
|
168
|
-
constructor();
|
|
169
|
-
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
170
|
-
writeDescription(context: ICliExecutionContext): void;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
161
|
declare class CliCalCommandProcessor implements ICliCommandProcessor {
|
|
174
162
|
command: string;
|
|
175
163
|
aliases: string[];
|
|
@@ -268,28 +256,6 @@ declare class CliEvalCommandProcessor implements ICliCommandProcessor {
|
|
|
268
256
|
writeDescription(context: ICliExecutionContext): void;
|
|
269
257
|
}
|
|
270
258
|
|
|
271
|
-
declare class CliHashCommandProcessor implements ICliCommandProcessor {
|
|
272
|
-
command: string;
|
|
273
|
-
description: string;
|
|
274
|
-
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
275
|
-
processors?: ICliCommandProcessor[];
|
|
276
|
-
metadata?: CliProcessorMetadata;
|
|
277
|
-
constructor();
|
|
278
|
-
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
279
|
-
writeDescription(context: ICliExecutionContext): void;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
declare class CliHexCommandProcessor implements ICliCommandProcessor {
|
|
283
|
-
command: string;
|
|
284
|
-
description: string;
|
|
285
|
-
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
286
|
-
processors?: ICliCommandProcessor[];
|
|
287
|
-
metadata?: CliProcessorMetadata;
|
|
288
|
-
constructor();
|
|
289
|
-
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
290
|
-
writeDescription(context: ICliExecutionContext): void;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
259
|
declare class CliJsonCommandProcessor implements ICliCommandProcessor {
|
|
294
260
|
command: string;
|
|
295
261
|
description: string;
|
|
@@ -301,18 +267,6 @@ declare class CliJsonCommandProcessor implements ICliCommandProcessor {
|
|
|
301
267
|
writeDescription(context: ICliExecutionContext): void;
|
|
302
268
|
}
|
|
303
269
|
|
|
304
|
-
declare class CliJwtCommandProcessor implements ICliCommandProcessor {
|
|
305
|
-
command: string;
|
|
306
|
-
description: string;
|
|
307
|
-
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
308
|
-
processors?: ICliCommandProcessor[];
|
|
309
|
-
metadata?: CliProcessorMetadata;
|
|
310
|
-
constructor();
|
|
311
|
-
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
312
|
-
writeDescription(context: ICliExecutionContext): void;
|
|
313
|
-
private base64UrlDecode;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
270
|
declare class CliLoremCommandProcessor implements ICliCommandProcessor {
|
|
317
271
|
command: string;
|
|
318
272
|
aliases: string[];
|
|
@@ -452,23 +406,11 @@ declare class CliUptimeCommandProcessor implements ICliCommandProcessor {
|
|
|
452
406
|
description: string;
|
|
453
407
|
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
454
408
|
metadata?: CliProcessorMetadata;
|
|
455
|
-
private sessionStartTimes;
|
|
456
409
|
initialize(context: ICliExecutionContext): Promise<void>;
|
|
457
410
|
processCommand(_: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
458
411
|
writeDescription(context: ICliExecutionContext): void;
|
|
459
412
|
}
|
|
460
413
|
|
|
461
|
-
declare class CliUrlCommandProcessor implements ICliCommandProcessor {
|
|
462
|
-
command: string;
|
|
463
|
-
description: string;
|
|
464
|
-
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
465
|
-
processors?: ICliCommandProcessor[];
|
|
466
|
-
metadata?: CliProcessorMetadata;
|
|
467
|
-
constructor();
|
|
468
|
-
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
469
|
-
writeDescription(context: ICliExecutionContext): void;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
414
|
declare class CliYesCommandProcessor implements ICliCommandProcessor {
|
|
473
415
|
command: string;
|
|
474
416
|
description: string;
|
|
@@ -657,6 +599,7 @@ declare class CliNanoCommandProcessor implements ICliCommandProcessor {
|
|
|
657
599
|
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
658
600
|
onData(data: string, context: ICliExecutionContext): Promise<void>;
|
|
659
601
|
writeDescription(context: ICliExecutionContext): void;
|
|
602
|
+
private setupHighlighting;
|
|
660
603
|
private render;
|
|
661
604
|
private renderPrompt;
|
|
662
605
|
private showStatus;
|
|
@@ -706,6 +649,43 @@ declare class CliKillCommandProcessor implements ICliCommandProcessor {
|
|
|
706
649
|
processCommand(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
707
650
|
}
|
|
708
651
|
|
|
652
|
+
declare class CliHtopCommandProcessor implements ICliCommandProcessor {
|
|
653
|
+
command: string;
|
|
654
|
+
description: string;
|
|
655
|
+
author: _qodalis_cli_core.ICliCommandAuthor;
|
|
656
|
+
metadata?: CliProcessorMetadata;
|
|
657
|
+
private context;
|
|
658
|
+
private registry;
|
|
659
|
+
private refreshTimer;
|
|
660
|
+
private rows;
|
|
661
|
+
private selectedIndex;
|
|
662
|
+
private scrollOffset;
|
|
663
|
+
private termCols;
|
|
664
|
+
private termRows;
|
|
665
|
+
private showingLogs;
|
|
666
|
+
private errorMessage;
|
|
667
|
+
private errorTimeout;
|
|
668
|
+
processCommand(_command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
669
|
+
onData(data: string, context: ICliExecutionContext): Promise<void>;
|
|
670
|
+
onResize(cols: number, rows: number, _context: ICliExecutionContext): void;
|
|
671
|
+
onDispose(_context: ICliExecutionContext): void;
|
|
672
|
+
writeDescription(context: ICliExecutionContext): void;
|
|
673
|
+
private refreshData;
|
|
674
|
+
private actionKill;
|
|
675
|
+
private actionStart;
|
|
676
|
+
private actionStop;
|
|
677
|
+
private actionRestart;
|
|
678
|
+
private actionLogs;
|
|
679
|
+
private moveSelection;
|
|
680
|
+
private get visibleRows();
|
|
681
|
+
private clampScroll;
|
|
682
|
+
private render;
|
|
683
|
+
private buildFooter;
|
|
684
|
+
private renderLogsOverlay;
|
|
685
|
+
private showError;
|
|
686
|
+
private exit;
|
|
687
|
+
}
|
|
688
|
+
|
|
709
689
|
declare const systemProcessors: ICliCommandProcessor[];
|
|
710
690
|
|
|
711
691
|
declare class CliThemeCommandProcessor implements ICliCommandProcessor {
|
|
@@ -884,7 +864,7 @@ declare class CliFontSizeCommandProcessor implements ICliCommandProcessor {
|
|
|
884
864
|
private setFontSize;
|
|
885
865
|
}
|
|
886
866
|
|
|
887
|
-
declare const miscProcessors: (CliAliasCommandProcessor |
|
|
867
|
+
declare const miscProcessors: (CliAliasCommandProcessor | CliCalCommandProcessor | CliClearCommandProcessor | CliClipboardCommandProcessor | CliColorCommandProcessor | CliConvertCommandProcessor | CliEchoCommandProcessor | CliEvalCommandProcessor | CliJsonCommandProcessor | CliLoremCommandProcessor | CliOpenCommandProcessor | CliRandomCommandProcessor | CliScreenCommandProcessor | CliSeqCommandProcessor | CliSleepCommandProcessor | CliTimeCommandProcessor | CliTimestampCommandProcessor | CliUnAliasCommandProcessor | CliUnameCommandProcessor | CliUptimeCommandProcessor | CliYesCommandProcessor)[];
|
|
888
868
|
declare const builtinProcessors: ICliCommandProcessor[];
|
|
889
869
|
|
|
890
870
|
declare class CliExecutionProcess implements ICliExecutionProcess {
|
|
@@ -1006,53 +986,6 @@ declare class CliStateStoreManager implements ICliStateStoreManager {
|
|
|
1006
986
|
}[];
|
|
1007
987
|
}
|
|
1008
988
|
|
|
1009
|
-
type ActiveInputRequestType = 'line' | 'password' | 'confirm' | 'select' | 'select-inline' | 'multi-select' | 'number';
|
|
1010
|
-
interface ActiveInputRequest {
|
|
1011
|
-
type: ActiveInputRequestType;
|
|
1012
|
-
promptText: string;
|
|
1013
|
-
resolve: (value: any) => void;
|
|
1014
|
-
buffer: string;
|
|
1015
|
-
cursorPosition: number;
|
|
1016
|
-
defaultValue?: boolean;
|
|
1017
|
-
options?: CliSelectOption[];
|
|
1018
|
-
selectedIndex?: number;
|
|
1019
|
-
onChange?: (value: string) => void;
|
|
1020
|
-
checkedIndices?: Set<number>;
|
|
1021
|
-
numberOptions?: {
|
|
1022
|
-
min?: number;
|
|
1023
|
-
max?: number;
|
|
1024
|
-
default?: number;
|
|
1025
|
-
};
|
|
1026
|
-
scrollOffset?: number;
|
|
1027
|
-
maxVisible?: number;
|
|
1028
|
-
displayLines?: number;
|
|
1029
|
-
}
|
|
1030
|
-
interface CliInputReaderHost {
|
|
1031
|
-
readonly activeInputRequest: ActiveInputRequest | null;
|
|
1032
|
-
setActiveInputRequest(request: ActiveInputRequest | null): void;
|
|
1033
|
-
writeToTerminal(text: string): void;
|
|
1034
|
-
getTerminalRows?(): number;
|
|
1035
|
-
}
|
|
1036
|
-
declare class CliInputReader implements ICliInputReader {
|
|
1037
|
-
private readonly host;
|
|
1038
|
-
constructor(host: CliInputReaderHost);
|
|
1039
|
-
readLine(prompt: string): Promise<string | null>;
|
|
1040
|
-
readPassword(prompt: string): Promise<string | null>;
|
|
1041
|
-
readConfirm(prompt: string, defaultValue?: boolean): Promise<boolean | null>;
|
|
1042
|
-
readSelect(prompt: string, options: CliSelectOption[], onChange?: (value: string) => void): Promise<string | null>;
|
|
1043
|
-
readSelectInline(prompt: string, options: CliSelectOption[], onChange?: (value: string) => void): Promise<string | null>;
|
|
1044
|
-
readMultiSelect(prompt: string, options: CliMultiSelectOption[]): Promise<string[] | null>;
|
|
1045
|
-
readNumber(prompt: string, options?: {
|
|
1046
|
-
min?: number;
|
|
1047
|
-
max?: number;
|
|
1048
|
-
default?: number;
|
|
1049
|
-
}): Promise<number | null>;
|
|
1050
|
-
renderSelectOptions(options: CliSelectOption[], selectedIndex: number, scrollOffset?: number, maxVisible?: number): number;
|
|
1051
|
-
renderInlineSelectOptions(options: CliSelectOption[], selectedIndex: number): string;
|
|
1052
|
-
renderMultiSelectOptions(options: CliSelectOption[], selectedIndex: number, checkedIndices: Set<number>, scrollOffset?: number, maxVisible?: number): number;
|
|
1053
|
-
private createInputRequest;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
989
|
/**
|
|
1057
990
|
* Manages tab-completion by querying registered providers in priority order.
|
|
1058
991
|
* Implements bash-style behavior:
|
|
@@ -1099,7 +1032,7 @@ declare class CliCompletionEngine {
|
|
|
1099
1032
|
/**
|
|
1100
1033
|
* Reusable text buffer with cursor management.
|
|
1101
1034
|
* Eliminates duplicated line-editing logic across CommandLineMode,
|
|
1102
|
-
*
|
|
1035
|
+
* LineInputMode, and any future input mode.
|
|
1103
1036
|
*/
|
|
1104
1037
|
declare class CliLineBuffer {
|
|
1105
1038
|
private _text;
|
|
@@ -1143,6 +1076,28 @@ interface IInputMode {
|
|
|
1143
1076
|
* Called when this mode is no longer the active input mode.
|
|
1144
1077
|
*/
|
|
1145
1078
|
deactivate?(): void;
|
|
1079
|
+
/** Called when the terminal is resized while this mode is active. */
|
|
1080
|
+
onResize?(cols: number, rows: number): void;
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Host interface for input modes. Provides access to terminal I/O,
|
|
1084
|
+
* dimensions, and mode stack management.
|
|
1085
|
+
*/
|
|
1086
|
+
interface InputModeHost {
|
|
1087
|
+
/** Write raw text/ANSI to the terminal */
|
|
1088
|
+
writeToTerminal(text: string): void;
|
|
1089
|
+
/** Get terminal row count for scroll window sizing */
|
|
1090
|
+
getTerminalRows(): number;
|
|
1091
|
+
/** Get terminal column count for overflow calculations */
|
|
1092
|
+
getTerminalCols(): number;
|
|
1093
|
+
/** Push a mode onto the input mode stack */
|
|
1094
|
+
pushMode(mode: IInputMode): void;
|
|
1095
|
+
/** Pop the current mode from the input mode stack */
|
|
1096
|
+
popMode(): void;
|
|
1097
|
+
/** The xterm.js Terminal instance (for direct write when needed) */
|
|
1098
|
+
readonly terminal: Terminal;
|
|
1099
|
+
/** File picker provider for the current environment */
|
|
1100
|
+
readonly filePickerProvider: ICliFilePickerProvider;
|
|
1146
1101
|
}
|
|
1147
1102
|
|
|
1148
1103
|
interface PromptOptions {
|
|
@@ -1202,16 +1157,6 @@ interface CommandLineModeHost {
|
|
|
1202
1157
|
}): void;
|
|
1203
1158
|
}
|
|
1204
1159
|
|
|
1205
|
-
/**
|
|
1206
|
-
* Host interface for ReaderMode — provides access to the active input request.
|
|
1207
|
-
*/
|
|
1208
|
-
interface ReaderModeHost {
|
|
1209
|
-
readonly terminal: Terminal;
|
|
1210
|
-
getActiveInputRequest(): ActiveInputRequest | null;
|
|
1211
|
-
setActiveInputRequest(request: ActiveInputRequest | null): void;
|
|
1212
|
-
popMode(): void;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
1160
|
interface CliExecutionContextDeps {
|
|
1216
1161
|
services: ICliServiceProvider;
|
|
1217
1162
|
logger: ICliLogger;
|
|
@@ -1219,7 +1164,7 @@ interface CliExecutionContextDeps {
|
|
|
1219
1164
|
stateStoreManager: CliStateStoreManager;
|
|
1220
1165
|
translator: ICliTranslationService;
|
|
1221
1166
|
}
|
|
1222
|
-
declare class CliExecutionContext implements ICliExecutionContext,
|
|
1167
|
+
declare class CliExecutionContext implements ICliExecutionContext, InputModeHost, CommandLineModeHost {
|
|
1223
1168
|
terminal: Terminal;
|
|
1224
1169
|
executor: ICliCommandExecutorService;
|
|
1225
1170
|
userSession?: ICliUserSession;
|
|
@@ -1244,20 +1189,14 @@ declare class CliExecutionContext implements ICliExecutionContext, CliInputReade
|
|
|
1244
1189
|
readonly lineBuffer: CliLineBuffer;
|
|
1245
1190
|
readonly lineRenderer: CliTerminalLineRenderer;
|
|
1246
1191
|
readonly commandHistory: CliCommandHistory;
|
|
1247
|
-
|
|
1192
|
+
readonly filePickerProvider: ICliFilePickerProvider;
|
|
1248
1193
|
private readonly modeStack;
|
|
1249
1194
|
private readonly managedTimers;
|
|
1250
1195
|
private resizeDisposable;
|
|
1251
1196
|
constructor(deps: CliExecutionContextDeps, terminal: Terminal, executor: ICliCommandExecutorService, cliOptions?: CliOptions);
|
|
1252
|
-
get activeInputRequest(): ActiveInputRequest | null;
|
|
1253
|
-
/**
|
|
1254
|
-
* Sets the active input request. When a non-null request is provided,
|
|
1255
|
-
* pushes ReaderMode onto the mode stack. ReaderMode pops itself on
|
|
1256
|
-
* completion, so passing null here does NOT pop the mode.
|
|
1257
|
-
*/
|
|
1258
|
-
setActiveInputRequest(request: ActiveInputRequest | null): void;
|
|
1259
1197
|
writeToTerminal(text: string): void;
|
|
1260
1198
|
getTerminalRows(): number;
|
|
1199
|
+
getTerminalCols(): number;
|
|
1261
1200
|
get currentLine(): string;
|
|
1262
1201
|
get cursorPosition(): number;
|
|
1263
1202
|
set cursorPosition(value: number);
|
|
@@ -1296,7 +1235,6 @@ declare class CliExecutionContext implements ICliExecutionContext, CliInputReade
|
|
|
1296
1235
|
getPromptLength(): number;
|
|
1297
1236
|
setPromptLength(value: number): void;
|
|
1298
1237
|
getExecutionContext(): ICliExecutionContext;
|
|
1299
|
-
getActiveInputRequest(): ActiveInputRequest | null;
|
|
1300
1238
|
private clearAllManagedTimers;
|
|
1301
1239
|
/**
|
|
1302
1240
|
* Dispose all resources. Called by CliEngine.destroy() when the
|
|
@@ -1328,6 +1266,8 @@ declare class CliCommandExecutor implements ICliCommandExecutorService {
|
|
|
1328
1266
|
private appendOutputToFile;
|
|
1329
1267
|
private writeOutputToFile;
|
|
1330
1268
|
private executeSingleCommand;
|
|
1269
|
+
private completeProcess;
|
|
1270
|
+
private failProcess;
|
|
1331
1271
|
private writeStderrToFile;
|
|
1332
1272
|
private appendStderrToFile;
|
|
1333
1273
|
showHelp(command: CliProcessCommand, context: ICliExecutionContext): Promise<void>;
|
|
@@ -1528,11 +1468,6 @@ declare class CliTerminalProgressBar implements ICliPercentageProgressBar {
|
|
|
1528
1468
|
complete(): void;
|
|
1529
1469
|
setText(text: string): void;
|
|
1530
1470
|
private updateProgressBar;
|
|
1531
|
-
/**
|
|
1532
|
-
* Returns an ANSI 256-color escape for a position in the progress bar.
|
|
1533
|
-
* Gradient: red (0%) -> yellow (50%) -> green (100%).
|
|
1534
|
-
*/
|
|
1535
|
-
private progressGradientColor;
|
|
1536
1471
|
private clearCurrentLine;
|
|
1537
1472
|
private calcLineCount;
|
|
1538
1473
|
}
|
|
@@ -1708,6 +1643,28 @@ declare class CliDefaultPingServerService implements ICliPingServerService {
|
|
|
1708
1643
|
ping(): Promise<void>;
|
|
1709
1644
|
}
|
|
1710
1645
|
|
|
1646
|
+
/**
|
|
1647
|
+
* Factory-based input reader. Creates the appropriate input mode
|
|
1648
|
+
* and pushes it onto the mode stack for each request.
|
|
1649
|
+
*/
|
|
1650
|
+
declare class CliInputReader implements ICliInputReader {
|
|
1651
|
+
private readonly host;
|
|
1652
|
+
constructor(host: InputModeHost);
|
|
1653
|
+
readLine(prompt: string, options?: CliLineOptions): Promise<string | null>;
|
|
1654
|
+
readPassword(prompt: string): Promise<string | null>;
|
|
1655
|
+
readConfirm(prompt: string, defaultValue?: boolean): Promise<boolean | null>;
|
|
1656
|
+
readSelect(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1657
|
+
readSelectInline(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1658
|
+
readMultiSelect(prompt: string, options: CliMultiSelectOption[], selectOptions?: CliMultiSelectOptions): Promise<string[] | null>;
|
|
1659
|
+
readNumber(prompt: string, options?: {
|
|
1660
|
+
min?: number;
|
|
1661
|
+
max?: number;
|
|
1662
|
+
default?: number;
|
|
1663
|
+
}): Promise<number | null>;
|
|
1664
|
+
readDate(prompt: string, options?: CliDateOptions): Promise<string | null>;
|
|
1665
|
+
readFile(prompt: string, options?: CliFilePickerOptions): Promise<CliFileResult[] | null>;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1711
1668
|
/**
|
|
1712
1669
|
* A terminal writer wrapper that captures "stdout-equivalent" output
|
|
1713
1670
|
* (`write`, `writeln`, `writeJson`, `writeObjectsAsTable`, `writeTable`)
|
|
@@ -1792,7 +1749,7 @@ declare class CliProcessRegistry implements ICliProcessRegistry {
|
|
|
1792
1749
|
private _currentPid;
|
|
1793
1750
|
private maxHistory;
|
|
1794
1751
|
get currentPid(): number | undefined;
|
|
1795
|
-
register(command: string): {
|
|
1752
|
+
register(command: string, options?: ICliProcessRegisterOptions): {
|
|
1796
1753
|
pid: number;
|
|
1797
1754
|
abortController: AbortController;
|
|
1798
1755
|
};
|
|
@@ -2262,6 +2219,10 @@ interface ICliWasmAccelerator {
|
|
|
2262
2219
|
prefixMatch(candidates: string[], prefix: string): string[];
|
|
2263
2220
|
/** Longest common prefix of the given strings. */
|
|
2264
2221
|
commonPrefix(strings: string[]): string;
|
|
2222
|
+
/** Register a named rule set for syntax highlighting tokenization. */
|
|
2223
|
+
registerRuleSet(ruleSetId: string, rules: string): void;
|
|
2224
|
+
/** Tokenize a line using a previously registered rule set. Returns newline-separated "start,end,tokenType" entries. */
|
|
2225
|
+
tokenizeLine(line: string, ruleSetId: string): string;
|
|
2265
2226
|
}
|
|
2266
2227
|
|
|
2267
2228
|
/**
|
|
@@ -2275,6 +2236,9 @@ declare class JsFallbackAccelerator implements ICliWasmAccelerator {
|
|
|
2275
2236
|
text: string;
|
|
2276
2237
|
};
|
|
2277
2238
|
prefixMatch(candidates: string[], prefix: string): string[];
|
|
2239
|
+
private ruleSets;
|
|
2240
|
+
registerRuleSet(ruleSetId: string, rules: string): void;
|
|
2241
|
+
tokenizeLine(line: string, ruleSetId: string): string;
|
|
2278
2242
|
commonPrefix(strings: string[]): string;
|
|
2279
2243
|
}
|
|
2280
2244
|
|
|
@@ -2299,4 +2263,4 @@ declare function getAccelerator(): ICliWasmAccelerator;
|
|
|
2299
2263
|
*/
|
|
2300
2264
|
declare function isWasmAccelerated(): boolean;
|
|
2301
2265
|
|
|
2302
|
-
export { API_VERSION,
|
|
2266
|
+
export { API_VERSION, CLi_Name_Art, CapturingTerminalWriter, type CdnSourceName, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, type CliEngineOptions, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliExecutionContext, type CliExecutionContextDeps, CliExecutionProcess, CliExportCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestHarness, type CliTestResult, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimestampCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, type CliWelcomeMessageConfig, CliYesCommandProcessor, CommandParser, type CommandParserOutput, type CommandPart, type ConfigureState, type DefaultServerProvider, type DiffLine, type DiffType, type ICliEnvironment, ICliEnvironment_TOKEN, type ICliExecutionHost, ICliPingServerService_TOKEN, type ICliStateStoreManager, type ICliWasmAccelerator, JsFallbackAccelerator, LIBRARY_VERSION, type MultiProxyEntry, OverlayAddon, type ParsedArg, type ParsedToken, ProcessExitedError, ScriptLoaderService, type ThemeState, builtinProcessors, computeDiff, contextGlobalParameter, createServerModule, executeOnServer, formatDiff, getAccelerator, getCliNameArt, getGreetingBasedOnTime, groupBy, helpGlobalParameter, hotkeysInfo, initWasmAccelerator, isWasmAccelerated, miscProcessors, openLink, reconcileArgs, renderServerResponse, systemProcessors, themeInfos, themes, versionGlobalParameter, welcomeModule };
|