@qodalis/cli 2.4.1 → 2.5.0
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/README.md +4 -3
- package/assets/cli-panel.css +35 -0
- package/package.json +2 -2
- package/public-api.d.mts +212 -5
- package/public-api.d.ts +212 -5
- package/public-api.js +1132 -103
- package/public-api.js.map +1 -1
- package/public-api.mjs +1112 -105
- package/public-api.mjs.map +1 -1
- package/wasm/qodalis_cli_wasm_bg.wasm +0 -0
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor as ICliCommandParameterDescriptor$1, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, ICliCommandControls, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliHttpClient, ICliNotifier, ICliManagedInterval, ICliManagedTimer, ICliEventBus, ICliKeyValueStore, CliStateStoreOptions, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliToken, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliHttpRequestOptions, CliNotification, ICliPermissionRegistry, CliPermissionDefinition, CliBranding, CliState, CliEngineSnapshot, CliEvent, CliEventType, CliEventMap, CliEmitOptions, CustomEventType, CliEventHandler, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, CliPanelThemeInput, CliPanelState } from '@qodalis/cli-core';
|
|
1
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor as ICliCommandParameterDescriptor$1, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, ICliCommandControls, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliHttpClient, ICliNotifier, ICliManagedInterval, ICliManagedTimer, ICliEventBus, ICliKeyValueStore, CliStateStoreOptions, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliToken, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliHttpRequestOptions, CliNotification, ICliPermissionRegistry, CliPermissionDefinition, CliBranding, CliState, CliEngineSnapshot, CliEvent, CliEventType, CliEventMap, CliEmitOptions, CustomEventType, CliEventHandler, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, ICliSecretStore, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, CliPanelThemeInput, CliPanelState } from '@qodalis/cli-core';
|
|
2
2
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
3
3
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
@@ -165,7 +165,7 @@ declare const CliKeyValueStore_TOKEN: any;
|
|
|
165
165
|
*/
|
|
166
166
|
declare const SyntaxHighlighterRegistry_TOKEN: any;
|
|
167
167
|
|
|
168
|
-
declare const LIBRARY_VERSION = "2.
|
|
168
|
+
declare const LIBRARY_VERSION = "2.5.0";
|
|
169
169
|
declare const API_VERSION = 2;
|
|
170
170
|
|
|
171
171
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -1431,6 +1431,12 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1431
1431
|
createInterval(callback: () => void, ms: number): ICliManagedInterval;
|
|
1432
1432
|
createTimeout(callback: () => void, ms: number): ICliManagedTimer;
|
|
1433
1433
|
isProgressRunning(): boolean;
|
|
1434
|
+
/**
|
|
1435
|
+
* What pressing Ctrl+C does: the current input mode handles the key, so a
|
|
1436
|
+
* running command is aborted, a prompt cancelled or a context left exactly
|
|
1437
|
+
* as with the keyboard.
|
|
1438
|
+
*/
|
|
1439
|
+
interrupt(): void;
|
|
1434
1440
|
abort(): void;
|
|
1435
1441
|
setSession(session: ICliUserSession): void;
|
|
1436
1442
|
getPromptOptions(): PromptOptions;
|
|
@@ -2947,7 +2953,10 @@ declare class CliEngine {
|
|
|
2947
2953
|
private beginBootReport;
|
|
2948
2954
|
/** 4. Environment variables, background services, server auth and manager. */
|
|
2949
2955
|
private registerRuntimeServices;
|
|
2950
|
-
/**
|
|
2956
|
+
/**
|
|
2957
|
+
* 4. Connect to the configured servers, one boot step each, then to the
|
|
2958
|
+
* servers the user linked (`server add`).
|
|
2959
|
+
*/
|
|
2951
2960
|
private connectServers;
|
|
2952
2961
|
/**
|
|
2953
2962
|
* 5. Built-in welcome and server modules, the app's modules, and the
|
|
@@ -3269,6 +3278,7 @@ declare class CliServerProxyProcessor implements ICliCommandProcessor {
|
|
|
3269
3278
|
parameters?: ICliCommandParameterDescriptor$1[];
|
|
3270
3279
|
processors?: ICliCommandProcessor[];
|
|
3271
3280
|
acceptsRawInput?: boolean;
|
|
3281
|
+
writeDescription?: (context: ICliExecutionContext) => void;
|
|
3272
3282
|
/** Full command path from root to this processor (e.g. ["aws", "lambda", "list"]) */
|
|
3273
3283
|
private readonly commandPath;
|
|
3274
3284
|
constructor(connection: CliServerConnection, descriptor: CliServerCommandDescriptor, serverName: string, isNested?: boolean, parentPath?: string[]);
|
|
@@ -3293,7 +3303,9 @@ declare class CliServerMultiProxyProcessor implements ICliCommandProcessor {
|
|
|
3293
3303
|
private readonly entries;
|
|
3294
3304
|
private readonly provider;
|
|
3295
3305
|
command: string;
|
|
3306
|
+
aliases?: string[];
|
|
3296
3307
|
description?: string;
|
|
3308
|
+
writeDescription?: (context: ICliExecutionContext) => void;
|
|
3297
3309
|
metadata?: CliProcessorMetadata;
|
|
3298
3310
|
parameters?: ICliCommandParameterDescriptor$1[];
|
|
3299
3311
|
processors?: ICliCommandProcessor[];
|
|
@@ -3326,16 +3338,42 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
3326
3338
|
private readonly _bareAliases;
|
|
3327
3339
|
private _backgroundServices?;
|
|
3328
3340
|
private _hidden;
|
|
3341
|
+
/** Servers the user linked (`server add`), as opposed to the host's */
|
|
3342
|
+
private readonly _linked;
|
|
3329
3343
|
/** `server:command` pairs already warned about, so each warns once */
|
|
3330
3344
|
private readonly _warnedHidden;
|
|
3331
3345
|
constructor(registry: ICliCommandProcessorRegistry, authService?: ICliServerAuthService, events?: ICliEventBus);
|
|
3346
|
+
/** Whether the user linked this server (`server add`): only those can be removed or edited. */
|
|
3347
|
+
isLinked(name: string): boolean;
|
|
3332
3348
|
get defaultServer(): string | null;
|
|
3333
3349
|
preferredServer(): string | null;
|
|
3334
3350
|
setDefaultServer(name: string | null): void;
|
|
3351
|
+
/** Where connections report and run (set once at boot, before any server connects). */
|
|
3352
|
+
configure(logger?: {
|
|
3353
|
+
warn(msg: string): void;
|
|
3354
|
+
info(msg: string): void;
|
|
3355
|
+
}, backgroundServices?: ICliBackgroundServiceRegistry, cliLogger?: ICliLogger): void;
|
|
3335
3356
|
connectAll(servers: CliServerConfig[], logger?: {
|
|
3336
3357
|
warn(msg: string): void;
|
|
3337
3358
|
info(msg: string): void;
|
|
3338
3359
|
}, backgroundServices?: ICliBackgroundServiceRegistry, cliLogger?: ICliLogger): Promise<void>;
|
|
3360
|
+
/**
|
|
3361
|
+
* Connects one server and registers its commands (without the bare
|
|
3362
|
+
* aliases: callers refresh them once every server is connected).
|
|
3363
|
+
*/
|
|
3364
|
+
private connectServer;
|
|
3365
|
+
/**
|
|
3366
|
+
* Connects a server added while the terminal runs (`server add`): its
|
|
3367
|
+
* commands are available at once. Throws when the name is taken.
|
|
3368
|
+
*/
|
|
3369
|
+
addServer(config: CliServerConfig, options?: {
|
|
3370
|
+
linked?: boolean;
|
|
3371
|
+
}): Promise<CliServerConnection>;
|
|
3372
|
+
/**
|
|
3373
|
+
* Disconnects a server and forgets it (`server remove`): its commands go
|
|
3374
|
+
* away. False when there is no such server.
|
|
3375
|
+
*/
|
|
3376
|
+
removeServer(name: string): boolean;
|
|
3339
3377
|
reconnect(name: string): Promise<{
|
|
3340
3378
|
success: boolean;
|
|
3341
3379
|
commandCount: number;
|
|
@@ -3352,6 +3390,11 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
3352
3390
|
private unregisterBareAliases;
|
|
3353
3391
|
private registerProxyProcessors;
|
|
3354
3392
|
private registerBareAliases;
|
|
3393
|
+
/**
|
|
3394
|
+
* The server's aliases of a command that no registered command answers
|
|
3395
|
+
* to yet: a local command (or an earlier server alias) keeps its name.
|
|
3396
|
+
*/
|
|
3397
|
+
private freeAliases;
|
|
3355
3398
|
private recordHidden;
|
|
3356
3399
|
}
|
|
3357
3400
|
|
|
@@ -3413,6 +3456,151 @@ declare function describeShellClose(event: {
|
|
|
3413
3456
|
reason?: string;
|
|
3414
3457
|
}, serverName: string): string | null;
|
|
3415
3458
|
|
|
3459
|
+
/** A server linked with `server add` (its token is kept apart, in the secret store). */
|
|
3460
|
+
interface CliLinkedServer {
|
|
3461
|
+
name: string;
|
|
3462
|
+
url: string;
|
|
3463
|
+
/** Epoch milliseconds. */
|
|
3464
|
+
addedAt: number;
|
|
3465
|
+
}
|
|
3466
|
+
/** Server names: a letter or digit, then letters, digits, `-` and `_` (at most 32). */
|
|
3467
|
+
declare const SERVER_NAME_PATTERN: RegExp;
|
|
3468
|
+
/** `https://` added when no scheme is given; trailing slashes dropped. Null for anything but http(s). */
|
|
3469
|
+
declare function normalizeServerUrl(input: string): string | null;
|
|
3470
|
+
/** Loopback, private (RFC 1918, link-local, ULA) or `.local` host names: http is allowed for them. */
|
|
3471
|
+
declare function isPrivateHost(hostname: string): boolean;
|
|
3472
|
+
/** What `server add` must check about a URL before using it. */
|
|
3473
|
+
interface CliServerUrlCheck {
|
|
3474
|
+
url: string;
|
|
3475
|
+
/** http to a private host: allowed after a confirmation. */
|
|
3476
|
+
insecure: boolean;
|
|
3477
|
+
/** An http server from an https page: the browser blocks the requests. */
|
|
3478
|
+
mixedContent: boolean;
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3481
|
+
* Normalises and checks a server URL: https anywhere, http only to private
|
|
3482
|
+
* hosts. Returns the reason as a string when refused.
|
|
3483
|
+
*/
|
|
3484
|
+
declare function checkServerUrl(input: string, pageProtocol?: string): CliServerUrlCheck | string;
|
|
3485
|
+
/** Whether host options allow linking this URL (`userServers`). */
|
|
3486
|
+
declare function userServersAllow(options: CliOptions | undefined, url: string): boolean;
|
|
3487
|
+
/** Whether linking is switched on at all. */
|
|
3488
|
+
declare function userServersEnabled(options: CliOptions | undefined): boolean;
|
|
3489
|
+
/** A name from the URL's host: `api.example.com` → `api`, `localhost:8047` → `localhost-8047`. */
|
|
3490
|
+
declare function suggestServerName(url: string, taken: (name: string) => boolean): string;
|
|
3491
|
+
/** `qcli_pat_…abcd` → `••••abcd`. */
|
|
3492
|
+
declare function maskToken(token: string | undefined): string;
|
|
3493
|
+
/**
|
|
3494
|
+
* The command as kept in the history: values of `--token` and `--password`
|
|
3495
|
+
* replaced by `***`.
|
|
3496
|
+
*/
|
|
3497
|
+
declare function redactSecrets(command: string): string;
|
|
3498
|
+
/**
|
|
3499
|
+
* The linked servers and their tokens: the list in the key-value store, each
|
|
3500
|
+
* token in the secret store.
|
|
3501
|
+
*/
|
|
3502
|
+
declare class CliLinkedServers {
|
|
3503
|
+
private readonly kv;
|
|
3504
|
+
private readonly secrets;
|
|
3505
|
+
constructor(kv: ICliKeyValueStore, secrets: ICliSecretStore);
|
|
3506
|
+
list(): Promise<CliLinkedServer[]>;
|
|
3507
|
+
get(name: string): Promise<CliLinkedServer | undefined>;
|
|
3508
|
+
/** Saves a server (replacing one with the same name) and its token (none: deleted). */
|
|
3509
|
+
save(server: CliLinkedServer, token: string | undefined): Promise<void>;
|
|
3510
|
+
setToken(name: string, token: string): Promise<void>;
|
|
3511
|
+
token(name: string): Promise<string | undefined>;
|
|
3512
|
+
remove(name: string): Promise<boolean>;
|
|
3513
|
+
/** Removes every linked server and every secret. */
|
|
3514
|
+
clear(): Promise<void>;
|
|
3515
|
+
}
|
|
3516
|
+
/**
|
|
3517
|
+
* The connection config of a linked server: the token (kept in memory once
|
|
3518
|
+
* read) sent as a bearer header; sockets use the users plugin's tickets.
|
|
3519
|
+
*/
|
|
3520
|
+
declare function linkedServerConfig(server: CliLinkedServer, token: string | undefined): CliServerConfig;
|
|
3521
|
+
|
|
3522
|
+
/**
|
|
3523
|
+
* The default {@link ICliSecretStore}: each secret encrypted with AES-GCM (own
|
|
3524
|
+
* random IV) by a 256-bit key that Web Crypto never exports, both kept in the
|
|
3525
|
+
* key-value store (IndexedDB). Reading the database gives ciphertext only; the
|
|
3526
|
+
* key cannot be read out, only used by this origin.
|
|
3527
|
+
*/
|
|
3528
|
+
declare class CliWebCryptoSecretStore implements ICliSecretStore {
|
|
3529
|
+
private readonly kv;
|
|
3530
|
+
/** Null: no Web Crypto (an insecure page). */
|
|
3531
|
+
private readonly crypto;
|
|
3532
|
+
private keyPromise;
|
|
3533
|
+
constructor(kv: ICliKeyValueStore,
|
|
3534
|
+
/** Null: no Web Crypto (an insecure page). */
|
|
3535
|
+
crypto?: Crypto | null);
|
|
3536
|
+
isAvailable(): boolean;
|
|
3537
|
+
get(key: string): Promise<string | undefined>;
|
|
3538
|
+
set(key: string, value: string): Promise<void>;
|
|
3539
|
+
delete(key: string): Promise<void>;
|
|
3540
|
+
clear(): Promise<void>;
|
|
3541
|
+
/** The saved key, or a new one (created once, even for parallel calls). */
|
|
3542
|
+
private key;
|
|
3543
|
+
}
|
|
3544
|
+
|
|
3545
|
+
type CliFetch = (input: string, init?: RequestInit) => Promise<Response>;
|
|
3546
|
+
/** What `server add` shows about a server before linking it. */
|
|
3547
|
+
interface CliServerProbe {
|
|
3548
|
+
/** The server's version (capabilities), when it says. */
|
|
3549
|
+
version?: string;
|
|
3550
|
+
capabilities: CliServerCapabilities | null;
|
|
3551
|
+
/** Whether the commands need a sign-in (401/403 without a token). */
|
|
3552
|
+
needsSignIn: boolean;
|
|
3553
|
+
}
|
|
3554
|
+
/** A link request: the code to compare and the page where the user approves it. */
|
|
3555
|
+
interface CliLinkRequest {
|
|
3556
|
+
linkId: string;
|
|
3557
|
+
userCode: string;
|
|
3558
|
+
/** Absolute (resolved against the server URL). */
|
|
3559
|
+
verificationUrl: string;
|
|
3560
|
+
expiresIn: number;
|
|
3561
|
+
interval: number;
|
|
3562
|
+
}
|
|
3563
|
+
type CliLinkPoll = {
|
|
3564
|
+
status: 'pending';
|
|
3565
|
+
} | {
|
|
3566
|
+
status: 'denied';
|
|
3567
|
+
} | {
|
|
3568
|
+
status: 'expired';
|
|
3569
|
+
} | {
|
|
3570
|
+
status: 'approved';
|
|
3571
|
+
token: string;
|
|
3572
|
+
userName?: string;
|
|
3573
|
+
};
|
|
3574
|
+
/** Text from a server, safe to print: control characters (terminal escapes) dropped. */
|
|
3575
|
+
declare function plainText(value: unknown): string;
|
|
3576
|
+
/**
|
|
3577
|
+
* Whether `url` is a Qodalis CLI server: `GET /api/qcli/versions` answers with
|
|
3578
|
+
* its supported versions. Throws with the reason when not.
|
|
3579
|
+
*/
|
|
3580
|
+
declare function probeServer(fetchFn: CliFetch, url: string): Promise<CliServerProbe>;
|
|
3581
|
+
/** Starts a link request; null when the server has no link endpoint (older servers, no users plugin). */
|
|
3582
|
+
declare function requestLink(fetchFn: CliFetch, url: string, client: string): Promise<CliLinkRequest | null>;
|
|
3583
|
+
/** One poll of a link request. */
|
|
3584
|
+
declare function pollLink(fetchFn: CliFetch, url: string, linkId: string): Promise<CliLinkPoll>;
|
|
3585
|
+
/**
|
|
3586
|
+
* Signs in with a password, creates an API token named `tokenName` with that
|
|
3587
|
+
* session, then ends the session: only the token is kept.
|
|
3588
|
+
*/
|
|
3589
|
+
declare function createTokenWithPassword(fetchFn: CliFetch, url: string, username: string, password: string, tokenName: string): Promise<string>;
|
|
3590
|
+
/** "Qodalis CLI on <platform>" for link requests and token names (`[A-Za-z0-9._ -]` only). */
|
|
3591
|
+
declare function deviceName(appName?: string): string;
|
|
3592
|
+
|
|
3593
|
+
/** The secret store: the host's ({@link ICliSecretStore_TOKEN}) or the Web Crypto one. */
|
|
3594
|
+
declare function secretStoreOf(context: Pick<ICliExecutionContext, 'services'>): ICliSecretStore;
|
|
3595
|
+
/** The linked servers of this terminal. */
|
|
3596
|
+
declare function linkedServersOf(context: Pick<ICliExecutionContext, 'services'>): CliLinkedServers;
|
|
3597
|
+
/**
|
|
3598
|
+
* Connects the servers linked with `server add` (boot, after the host's
|
|
3599
|
+
* servers). Host servers win a name clash; servers the host options no longer
|
|
3600
|
+
* allow are skipped.
|
|
3601
|
+
*/
|
|
3602
|
+
declare function restoreLinkedServers(context: Pick<ICliExecutionContext, 'services' | 'options'>, manager: CliServerManager, warn: (message: string) => void): Promise<void>;
|
|
3603
|
+
|
|
3416
3604
|
/**
|
|
3417
3605
|
* Result of executing a command through the test harness.
|
|
3418
3606
|
*/
|
|
@@ -3790,6 +3978,11 @@ declare function computeGlobalStatus(engine: CliEngine | undefined, now?: number
|
|
|
3790
3978
|
* has no process registry or no running process with that pid.
|
|
3791
3979
|
*/
|
|
3792
3980
|
declare function killProcess(engine: CliEngine | undefined, pid: number): boolean;
|
|
3981
|
+
/**
|
|
3982
|
+
* Interrupt the command running in any of the engines, as Ctrl+C does (the
|
|
3983
|
+
* prompt comes back once the command has stopped). False when none runs.
|
|
3984
|
+
*/
|
|
3985
|
+
declare function interruptCommand(engines: Iterable<CliEngine>): boolean;
|
|
3793
3986
|
interface CliPanelStatusTrackerListener {
|
|
3794
3987
|
onTabStatus(tabId: number, status: CliPanelTabStatus): void;
|
|
3795
3988
|
onGlobalStatus(status: CliPanelGlobalStatus): void;
|
|
@@ -3813,6 +4006,8 @@ declare class CliPanelStatusTracker {
|
|
|
3813
4006
|
setActiveTab(tabId: number): void;
|
|
3814
4007
|
/** The engine the global status (services, servers) is computed from: the first pane of the active tab. */
|
|
3815
4008
|
get globalEngine(): CliEngine | undefined;
|
|
4009
|
+
/** The engines of the active tab, one per pane. */
|
|
4010
|
+
get activeTabEngines(): CliEngine[];
|
|
3816
4011
|
/** Recompute everything now. */
|
|
3817
4012
|
refresh(): void;
|
|
3818
4013
|
destroy(): void;
|
|
@@ -3926,6 +4121,11 @@ declare class CliPanelController implements ICliPanelRef<CliEngine> {
|
|
|
3926
4121
|
openContextMenu(tabId: number, x: number, y: number): void;
|
|
3927
4122
|
closeContextMenu(): void;
|
|
3928
4123
|
togglePositionDropdown(): void;
|
|
4124
|
+
/**
|
|
4125
|
+
* Stop the command running in the active tab, as Ctrl+C does. False when
|
|
4126
|
+
* no command runs there.
|
|
4127
|
+
*/
|
|
4128
|
+
stopCommand(): boolean;
|
|
3929
4129
|
/**
|
|
3930
4130
|
* Stop a running background service listed in the services dropdown, as
|
|
3931
4131
|
* `kill <pid>` does; the list refreshes. False when nothing was running
|
|
@@ -4046,6 +4246,8 @@ declare const PANEL_LABELS: {
|
|
|
4046
4246
|
readonly servicesHeader: "Background Services";
|
|
4047
4247
|
readonly servicesEmpty: "No services registered";
|
|
4048
4248
|
readonly stopService: "Stop";
|
|
4249
|
+
readonly stopCommand: "Stop";
|
|
4250
|
+
readonly stopCommandTitle: "Stop the running command (Ctrl+C)";
|
|
4049
4251
|
readonly serversHeader: "Server Connections";
|
|
4050
4252
|
readonly serversEmpty: "No servers configured";
|
|
4051
4253
|
};
|
|
@@ -4096,6 +4298,11 @@ interface PanelStatusIndicator {
|
|
|
4096
4298
|
compactDotClass?: string;
|
|
4097
4299
|
/** Which dropdown a click opens. */
|
|
4098
4300
|
dropdown?: 'services' | 'servers';
|
|
4301
|
+
/** Stop button of the running command (`controller.stopCommand()`); the compact item stops it on click. */
|
|
4302
|
+
stop?: {
|
|
4303
|
+
label: string;
|
|
4304
|
+
title: string;
|
|
4305
|
+
};
|
|
4099
4306
|
}
|
|
4100
4307
|
/** Items of the header status bar, in display order. */
|
|
4101
4308
|
declare function statusIndicators(s: CliPanelSnapshot): PanelStatusIndicator[];
|
|
@@ -4146,5 +4353,5 @@ interface PanelStatusDropdown {
|
|
|
4146
4353
|
/** The open services or servers dropdown, or null when neither is open. */
|
|
4147
4354
|
declare function openStatusDropdown(s: CliPanelSnapshot): PanelStatusDropdown | null;
|
|
4148
4355
|
|
|
4149
|
-
export { API_VERSION, CLI_ENV_GLOBAL_PERMISSION, CLI_FRAMEWORK_SERVICE, CLOSE_GLYPH, CLOSE_ICON, CapturingTerminalWriter, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliBootLog, CliBootLog_TOKEN, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliEventsCommandProcessor, CliExecutionContext, CliExecutionProcess, CliExportCommandProcessor, CliFalseCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliHttpClient, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKeyValueStore_TOKEN, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliNotifier, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPanelController, CliPanelStatusTracker, CliPermissionRegistry, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliScriptSyntaxError, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestCommandProcessor, CliTestHarness, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliTrueCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, CliYesCommandProcessor, CommandParser, DEFAULT_CLI_NAME, DEFAULT_GLOBAL_STATUS, DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH, DEFAULT_TAB_STATUS, ERROR_ICON, EXEC_POLL_MS, GLOBAL_POLL_MS, HIDE_ICON, HIDE_TAB_TERMINAL_ICON, ICliEnvironment_TOKEN, ICliPingServerService_TOKEN, ICliScriptRunner_TOKEN, JsFallbackAccelerator, LIBRARY_VERSION, MAXIMIZE_ICON, MIN_PANEL_SIZE, MIN_PANE_WIDTH_PERCENT, OverlayAddon, PANEL_LABELS, PANEL_POSITIONS, ProcessExitedError, RESTORE_ICON, SERVICES_ICON, SUCCESS_ICON, SVG_COMMON_ATTRS, SVG_VIEW_BOX, ScriptLoaderService, SyntaxHighlighterRegistry_TOKEN, TERMINAL_ICON, UPTIME_ICON, appendOutputToFile, appendStderrToFile, applyEnvironmentChange, builtinProcessors, capitalize, clampPanelSize, cliScriptRunner, collapseChevronIcon, computeDiff, computeGlobalStatus, computeTabStatus, contextGlobalParameter, contextMenuItems, contextMenuStyle, createCliEngine, createServerModule, defaultFontSize, describeShellClose, distributePaneWidths, dropdownAnchorStyle, executeOnServer, expandBraces, expandEnvironmentVars, expandGlobs, formatDiff, formatUptime, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, glowLineClass, greetingModule, groupBy, handleRenameKey, helpGlobalParameter, hideTabChevronIcon, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, isHorizontalPosition, isWasmAccelerated, joinClasses, killProcess, matchGlob, mergeCliOptions, miscProcessors, nextRowsCommand, normalizePaneWidths, openLink, openStatusDropdown, paneClass, paneStyle, panelBranding, panelTabClass, panelTabDotClass, panelWrapperClass, panelWrapperStyle, panesContainerClass, panesContainerWidth, parseAssignments, parseScript, positionDropdownItemClass, positionIcon, positionOptions, reconcileArgs, renderServerResponse, renderSingleOutput, resizePaneWidths, resizedPanelSize, resolveCliBranding, resolveCliHostConfig, runContextMenuAction, runScript, splitWords, statusIndicators, substituteCommands, substituteVars, svgAttrs, systemProcessors, tabDotClass, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
4150
|
-
export type { AnchorRect, CdnSourceName, CliBootLogOptions, CliEngineOptions, CliEnvironmentChange, CliEnvironmentProfile, CliEnvironmentScope, CliEnvironmentSnapshot, CliEnvironmentSource, CliExecutionContextDeps, CliHiddenServerCommand, CliHostConfig, CliPanelCallbacks, CliPanelContextMenu, CliPanelControlledState, CliPanelControllerOptions, CliPanelExecutionState, CliPanelGlobalStatus, CliPanelPane, CliPanelServerDetail, CliPanelServerState, CliPanelServiceDetail, CliPanelSnapshot, CliPanelStatusTrackerListener, CliPanelTab, CliPanelTabStatus, CliPanelViewport, CliTestResult, CliWelcomeMessageConfig, CommandParserOutput, CommandPart, ConfigureState, CreateCliEngineConfig, DefaultServerProvider, DiffLine, DiffType, ICliEnvironment, ICliExecutionHost, ICliScriptRunOptions, ICliScriptRunner, ICliStateStoreManager, ICliWasmAccelerator, InitializeServicesOptions, InitializeServicesResult, MultiProxyEntry, PanelContextMenuAction, PanelContextMenuItem, PanelDropdownRow, PanelPositionOption, PanelStatusDropdown, PanelStatusIndicator, ParsedArg, ParsedToken, ResolvedCliBranding, SvgIcon, SvgShape, TerminalSetupResult, ThemeState };
|
|
4356
|
+
export { API_VERSION, CLI_ENV_GLOBAL_PERMISSION, CLI_FRAMEWORK_SERVICE, CLOSE_GLYPH, CLOSE_ICON, CapturingTerminalWriter, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliBootLog, CliBootLog_TOKEN, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliEventsCommandProcessor, CliExecutionContext, CliExecutionProcess, CliExportCommandProcessor, CliFalseCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliHttpClient, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKeyValueStore_TOKEN, CliKillCommandProcessor, CliLinkedServers, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliNotifier, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPanelController, CliPanelStatusTracker, CliPermissionRegistry, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliScriptSyntaxError, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestCommandProcessor, CliTestHarness, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliTrueCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, CliWebCryptoSecretStore, CliYesCommandProcessor, CommandParser, DEFAULT_CLI_NAME, DEFAULT_GLOBAL_STATUS, DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH, DEFAULT_TAB_STATUS, ERROR_ICON, EXEC_POLL_MS, GLOBAL_POLL_MS, HIDE_ICON, HIDE_TAB_TERMINAL_ICON, ICliEnvironment_TOKEN, ICliPingServerService_TOKEN, ICliScriptRunner_TOKEN, JsFallbackAccelerator, LIBRARY_VERSION, MAXIMIZE_ICON, MIN_PANEL_SIZE, MIN_PANE_WIDTH_PERCENT, OverlayAddon, PANEL_LABELS, PANEL_POSITIONS, ProcessExitedError, RESTORE_ICON, SERVER_NAME_PATTERN, SERVICES_ICON, SUCCESS_ICON, SVG_COMMON_ATTRS, SVG_VIEW_BOX, ScriptLoaderService, SyntaxHighlighterRegistry_TOKEN, TERMINAL_ICON, UPTIME_ICON, appendOutputToFile, appendStderrToFile, applyEnvironmentChange, builtinProcessors, capitalize, checkServerUrl, clampPanelSize, cliScriptRunner, collapseChevronIcon, computeDiff, computeGlobalStatus, computeTabStatus, contextGlobalParameter, contextMenuItems, contextMenuStyle, createCliEngine, createServerModule, createTokenWithPassword, defaultFontSize, describeShellClose, deviceName, distributePaneWidths, dropdownAnchorStyle, executeOnServer, expandBraces, expandEnvironmentVars, expandGlobs, formatDiff, formatUptime, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, glowLineClass, greetingModule, groupBy, handleRenameKey, helpGlobalParameter, hideTabChevronIcon, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, interruptCommand, isHorizontalPosition, isPrivateHost, isWasmAccelerated, joinClasses, killProcess, linkedServerConfig, linkedServersOf, maskToken, matchGlob, mergeCliOptions, miscProcessors, nextRowsCommand, normalizePaneWidths, normalizeServerUrl, openLink, openStatusDropdown, paneClass, paneStyle, panelBranding, panelTabClass, panelTabDotClass, panelWrapperClass, panelWrapperStyle, panesContainerClass, panesContainerWidth, parseAssignments, parseScript, plainText, pollLink, positionDropdownItemClass, positionIcon, positionOptions, probeServer, reconcileArgs, redactSecrets, renderServerResponse, renderSingleOutput, requestLink, resizePaneWidths, resizedPanelSize, resolveCliBranding, resolveCliHostConfig, restoreLinkedServers, runContextMenuAction, runScript, secretStoreOf, splitWords, statusIndicators, substituteCommands, substituteVars, suggestServerName, svgAttrs, systemProcessors, tabDotClass, themeInfos, themes, tryExecuteScript, userServersAllow, userServersEnabled, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
4357
|
+
export type { AnchorRect, CdnSourceName, CliBootLogOptions, CliEngineOptions, CliEnvironmentChange, CliEnvironmentProfile, CliEnvironmentScope, CliEnvironmentSnapshot, CliEnvironmentSource, CliExecutionContextDeps, CliFetch, CliHiddenServerCommand, CliHostConfig, CliLinkPoll, CliLinkRequest, CliLinkedServer, CliPanelCallbacks, CliPanelContextMenu, CliPanelControlledState, CliPanelControllerOptions, CliPanelExecutionState, CliPanelGlobalStatus, CliPanelPane, CliPanelServerDetail, CliPanelServerState, CliPanelServiceDetail, CliPanelSnapshot, CliPanelStatusTrackerListener, CliPanelTab, CliPanelTabStatus, CliPanelViewport, CliServerProbe, CliServerUrlCheck, CliTestResult, CliWelcomeMessageConfig, CommandParserOutput, CommandPart, ConfigureState, CreateCliEngineConfig, DefaultServerProvider, DiffLine, DiffType, ICliEnvironment, ICliExecutionHost, ICliScriptRunOptions, ICliScriptRunner, ICliStateStoreManager, ICliWasmAccelerator, InitializeServicesOptions, InitializeServicesResult, MultiProxyEntry, PanelContextMenuAction, PanelContextMenuItem, PanelDropdownRow, PanelPositionOption, PanelStatusDropdown, PanelStatusIndicator, ParsedArg, ParsedToken, ResolvedCliBranding, SvgIcon, SvgShape, TerminalSetupResult, ThemeState };
|