@qodalis/cli 2.0.1 → 2.1.1
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/assets/cli-panel.css +36 -0
- package/package.json +2 -2
- package/public-api.d.mts +32 -4
- package/public-api.d.ts +32 -4
- package/public-api.js +94 -9
- package/public-api.js.map +1 -1
- package/public-api.mjs +92 -10
- package/public-api.mjs.map +1 -1
package/assets/cli-panel.css
CHANGED
|
@@ -90,6 +90,8 @@
|
|
|
90
90
|
|
|
91
91
|
.cli-panel-title {
|
|
92
92
|
font-size: 0.95rem;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
min-width: 0;
|
|
93
95
|
display: flex;
|
|
94
96
|
gap: 0.5rem;
|
|
95
97
|
justify-content: center;
|
|
@@ -105,6 +107,14 @@
|
|
|
105
107
|
align-items: center;
|
|
106
108
|
}
|
|
107
109
|
|
|
110
|
+
/* An application's own icon (options.branding.icon) instead of the terminal glyph */
|
|
111
|
+
.cli-panel-brand-icon {
|
|
112
|
+
width: 18px;
|
|
113
|
+
height: 18px;
|
|
114
|
+
object-fit: contain;
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
108
118
|
.cli-panel-action-buttons {
|
|
109
119
|
display: flex;
|
|
110
120
|
flex-direction: row;
|
|
@@ -660,6 +670,32 @@
|
|
|
660
670
|
|
|
661
671
|
/* Phones: icon only, so the tab covers as little of the page as possible */
|
|
662
672
|
@media (max-width: 600px) {
|
|
673
|
+
/* The header keeps the title on one line; moving the panel to another
|
|
674
|
+
edge makes no sense on a phone */
|
|
675
|
+
.cli-panel-header-content {
|
|
676
|
+
gap: 0.5rem;
|
|
677
|
+
padding: 0 0.5rem 0 0.75rem;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.cli-panel-title {
|
|
681
|
+
overflow: hidden;
|
|
682
|
+
text-overflow: ellipsis;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.cli-panel-action-buttons {
|
|
686
|
+
gap: 0.15rem;
|
|
687
|
+
flex-shrink: 0;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.cli-panel-action-buttons .cli-panel-btn {
|
|
691
|
+
width: 34px;
|
|
692
|
+
height: 34px;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.cli-panel-btn-position-wrapper {
|
|
696
|
+
display: none;
|
|
697
|
+
}
|
|
698
|
+
|
|
663
699
|
.cli-panel-hide-tab {
|
|
664
700
|
padding: 6px 8px;
|
|
665
701
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qodalis/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
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.
|
|
33
|
+
"@qodalis/cli-core": "2.1.1",
|
|
34
34
|
"@xterm/xterm": "^6.0.0",
|
|
35
35
|
"@xterm/addon-fit": "^0.11.0",
|
|
36
36
|
"@xterm/addon-web-links": "^0.12.0",
|
package/public-api.d.mts
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, CliState, CliEngineSnapshot, CliEvent, CliEventType, CliEventMap, CliEmitOptions, CustomEventType, CliEventHandler, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, 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, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, 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.1.1";
|
|
169
169
|
declare const API_VERSION = 2;
|
|
170
170
|
|
|
171
171
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -2696,6 +2696,20 @@ declare class OverlayAddon implements ITerminalAddon {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
|
|
2698
2698
|
declare const getCliNameArt: (cols: number) => string;
|
|
2699
|
+
/** The branding with every default filled in (see `CliOptions.branding`). */
|
|
2700
|
+
interface ResolvedCliBranding {
|
|
2701
|
+
/** The product name ('Web CLI' by default). */
|
|
2702
|
+
name: string;
|
|
2703
|
+
/** True when the host set its own name. */
|
|
2704
|
+
custom: boolean;
|
|
2705
|
+
/** The panel's icon URL, if the host set one. */
|
|
2706
|
+
icon?: string;
|
|
2707
|
+
/** The welcome banner's art: Qodalis CLI's, or the host's name. */
|
|
2708
|
+
art(cols: number): string;
|
|
2709
|
+
}
|
|
2710
|
+
declare const DEFAULT_CLI_NAME = "Web CLI";
|
|
2711
|
+
/** The CLI's name and icon: the host's `CliOptions.branding`, or Qodalis CLI's. */
|
|
2712
|
+
declare const resolveCliBranding: (branding?: CliBranding) => ResolvedCliBranding;
|
|
2699
2713
|
declare const hotkeysInfo: {
|
|
2700
2714
|
key: string;
|
|
2701
2715
|
description: string;
|
|
@@ -3168,6 +3182,12 @@ declare class CliServerConnection {
|
|
|
3168
3182
|
onReconnected?: () => void;
|
|
3169
3183
|
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry, _logger?: ICliLogger, _authService?: ICliServerAuthService);
|
|
3170
3184
|
get config(): CliServerConfig;
|
|
3185
|
+
/**
|
|
3186
|
+
* The last connect was refused for want of a sign-in (401 or 403 on the
|
|
3187
|
+
* command list): the server is up, and a sign-in reconnects it.
|
|
3188
|
+
*/
|
|
3189
|
+
get needsSignIn(): boolean;
|
|
3190
|
+
private _needsSignIn;
|
|
3171
3191
|
get connected(): boolean;
|
|
3172
3192
|
get commands(): CliServerCommandDescriptor[];
|
|
3173
3193
|
get capabilities(): CliServerCapabilities | null;
|
|
@@ -3970,6 +3990,14 @@ declare const PANEL_LABELS: {
|
|
|
3970
3990
|
readonly serversHeader: "Server Connections";
|
|
3971
3991
|
readonly serversEmpty: "No servers configured";
|
|
3972
3992
|
};
|
|
3993
|
+
/**
|
|
3994
|
+
* The panel's title and icon: the host's branding (`options.branding`), or
|
|
3995
|
+
* "CLI" with the terminal glyph (`iconUrl` unset).
|
|
3996
|
+
*/
|
|
3997
|
+
declare function panelBranding(options?: CliOptions): {
|
|
3998
|
+
title: string;
|
|
3999
|
+
iconUrl?: string;
|
|
4000
|
+
};
|
|
3973
4001
|
declare const SERVICES_ICON = "\u2699";
|
|
3974
4002
|
declare const UPTIME_ICON = "\u2191";
|
|
3975
4003
|
declare const SUCCESS_ICON = "\u2713";
|
|
@@ -4052,5 +4080,5 @@ interface PanelStatusDropdown {
|
|
|
4052
4080
|
/** The open services or servers dropdown, or null when neither is open. */
|
|
4053
4081
|
declare function openStatusDropdown(s: CliPanelSnapshot): PanelStatusDropdown | null;
|
|
4054
4082
|
|
|
4055
|
-
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_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, matchGlob, mergeCliOptions, miscProcessors, nextRowsCommand, normalizePaneWidths, openLink, openStatusDropdown, paneClass, paneStyle, panelTabClass, panelTabDotClass, panelWrapperClass, panelWrapperStyle, panesContainerClass, panesContainerWidth, parseAssignments, parseScript, positionDropdownItemClass, positionIcon, positionOptions, reconcileArgs, renderServerResponse, renderSingleOutput, resizePaneWidths, resizedPanelSize, resolveCliHostConfig, runContextMenuAction, runScript, splitWords, statusIndicators, substituteCommands, substituteVars, svgAttrs, systemProcessors, tabDotClass, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
4056
|
-
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, SvgIcon, SvgShape, TerminalSetupResult, ThemeState };
|
|
4083
|
+
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, 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 };
|
|
4084
|
+
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 };
|
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, CliState, CliEngineSnapshot, CliEvent, CliEventType, CliEventMap, CliEmitOptions, CustomEventType, CliEventHandler, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, 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, CliPanelPosition, CliPanelConfig, CliPanelHideAlignment, ICliPanelRef, 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.1.1";
|
|
169
169
|
declare const API_VERSION = 2;
|
|
170
170
|
|
|
171
171
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -2696,6 +2696,20 @@ declare class OverlayAddon implements ITerminalAddon {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
|
|
2698
2698
|
declare const getCliNameArt: (cols: number) => string;
|
|
2699
|
+
/** The branding with every default filled in (see `CliOptions.branding`). */
|
|
2700
|
+
interface ResolvedCliBranding {
|
|
2701
|
+
/** The product name ('Web CLI' by default). */
|
|
2702
|
+
name: string;
|
|
2703
|
+
/** True when the host set its own name. */
|
|
2704
|
+
custom: boolean;
|
|
2705
|
+
/** The panel's icon URL, if the host set one. */
|
|
2706
|
+
icon?: string;
|
|
2707
|
+
/** The welcome banner's art: Qodalis CLI's, or the host's name. */
|
|
2708
|
+
art(cols: number): string;
|
|
2709
|
+
}
|
|
2710
|
+
declare const DEFAULT_CLI_NAME = "Web CLI";
|
|
2711
|
+
/** The CLI's name and icon: the host's `CliOptions.branding`, or Qodalis CLI's. */
|
|
2712
|
+
declare const resolveCliBranding: (branding?: CliBranding) => ResolvedCliBranding;
|
|
2699
2713
|
declare const hotkeysInfo: {
|
|
2700
2714
|
key: string;
|
|
2701
2715
|
description: string;
|
|
@@ -3168,6 +3182,12 @@ declare class CliServerConnection {
|
|
|
3168
3182
|
onReconnected?: () => void;
|
|
3169
3183
|
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry, _logger?: ICliLogger, _authService?: ICliServerAuthService);
|
|
3170
3184
|
get config(): CliServerConfig;
|
|
3185
|
+
/**
|
|
3186
|
+
* The last connect was refused for want of a sign-in (401 or 403 on the
|
|
3187
|
+
* command list): the server is up, and a sign-in reconnects it.
|
|
3188
|
+
*/
|
|
3189
|
+
get needsSignIn(): boolean;
|
|
3190
|
+
private _needsSignIn;
|
|
3171
3191
|
get connected(): boolean;
|
|
3172
3192
|
get commands(): CliServerCommandDescriptor[];
|
|
3173
3193
|
get capabilities(): CliServerCapabilities | null;
|
|
@@ -3970,6 +3990,14 @@ declare const PANEL_LABELS: {
|
|
|
3970
3990
|
readonly serversHeader: "Server Connections";
|
|
3971
3991
|
readonly serversEmpty: "No servers configured";
|
|
3972
3992
|
};
|
|
3993
|
+
/**
|
|
3994
|
+
* The panel's title and icon: the host's branding (`options.branding`), or
|
|
3995
|
+
* "CLI" with the terminal glyph (`iconUrl` unset).
|
|
3996
|
+
*/
|
|
3997
|
+
declare function panelBranding(options?: CliOptions): {
|
|
3998
|
+
title: string;
|
|
3999
|
+
iconUrl?: string;
|
|
4000
|
+
};
|
|
3973
4001
|
declare const SERVICES_ICON = "\u2699";
|
|
3974
4002
|
declare const UPTIME_ICON = "\u2191";
|
|
3975
4003
|
declare const SUCCESS_ICON = "\u2713";
|
|
@@ -4052,5 +4080,5 @@ interface PanelStatusDropdown {
|
|
|
4052
4080
|
/** The open services or servers dropdown, or null when neither is open. */
|
|
4053
4081
|
declare function openStatusDropdown(s: CliPanelSnapshot): PanelStatusDropdown | null;
|
|
4054
4082
|
|
|
4055
|
-
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_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, matchGlob, mergeCliOptions, miscProcessors, nextRowsCommand, normalizePaneWidths, openLink, openStatusDropdown, paneClass, paneStyle, panelTabClass, panelTabDotClass, panelWrapperClass, panelWrapperStyle, panesContainerClass, panesContainerWidth, parseAssignments, parseScript, positionDropdownItemClass, positionIcon, positionOptions, reconcileArgs, renderServerResponse, renderSingleOutput, resizePaneWidths, resizedPanelSize, resolveCliHostConfig, runContextMenuAction, runScript, splitWords, statusIndicators, substituteCommands, substituteVars, svgAttrs, systemProcessors, tabDotClass, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
4056
|
-
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, SvgIcon, SvgShape, TerminalSetupResult, ThemeState };
|
|
4083
|
+
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, 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 };
|
|
4084
|
+
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 };
|
package/public-api.js
CHANGED
|
@@ -519,7 +519,7 @@ var CliKeyValueStore_TOKEN = cliCore.createCliToken("cli-key-value-store");
|
|
|
519
519
|
var SyntaxHighlighterRegistry_TOKEN = cliCore.createCliToken("syntax-highlighter-registry");
|
|
520
520
|
|
|
521
521
|
// src/lib/version.ts
|
|
522
|
-
var LIBRARY_VERSION = "2.
|
|
522
|
+
var LIBRARY_VERSION = "2.1.1";
|
|
523
523
|
var API_VERSION = 2;
|
|
524
524
|
var ANONYMOUS = "\0anonymous";
|
|
525
525
|
function aliasOwner(context2) {
|
|
@@ -5398,6 +5398,7 @@ var CliServerConnection = class _CliServerConnection {
|
|
|
5398
5398
|
this._eventServiceRegistered = false;
|
|
5399
5399
|
this._healthCheckTimer = null;
|
|
5400
5400
|
this._healthCheckAttempts = 0;
|
|
5401
|
+
this._needsSignIn = false;
|
|
5401
5402
|
}
|
|
5402
5403
|
static {
|
|
5403
5404
|
this.WS_MAX_RECONNECT_ATTEMPTS = 5;
|
|
@@ -5414,6 +5415,13 @@ var CliServerConnection = class _CliServerConnection {
|
|
|
5414
5415
|
get config() {
|
|
5415
5416
|
return this._config;
|
|
5416
5417
|
}
|
|
5418
|
+
/**
|
|
5419
|
+
* The last connect was refused for want of a sign-in (401 or 403 on the
|
|
5420
|
+
* command list): the server is up, and a sign-in reconnects it.
|
|
5421
|
+
*/
|
|
5422
|
+
get needsSignIn() {
|
|
5423
|
+
return this._needsSignIn;
|
|
5424
|
+
}
|
|
5417
5425
|
get connected() {
|
|
5418
5426
|
return this._connected;
|
|
5419
5427
|
}
|
|
@@ -5453,6 +5461,7 @@ var CliServerConnection = class _CliServerConnection {
|
|
|
5453
5461
|
});
|
|
5454
5462
|
}
|
|
5455
5463
|
async connect() {
|
|
5464
|
+
this._needsSignIn = false;
|
|
5456
5465
|
try {
|
|
5457
5466
|
const baseUrl = this.normalizeUrl(this._config.url);
|
|
5458
5467
|
const negotiated = await cliCore.ServerVersionNegotiator.discover(
|
|
@@ -5535,6 +5544,7 @@ var CliServerConnection = class _CliServerConnection {
|
|
|
5535
5544
|
const url = `${this._basePath}/commands`;
|
|
5536
5545
|
const response = await this.httpFetch(url);
|
|
5537
5546
|
if (!response.ok) {
|
|
5547
|
+
if (response.status === 401 || response.status === 403) this._needsSignIn = true;
|
|
5538
5548
|
throw new Error(
|
|
5539
5549
|
`Server ${this._config.name} returned ${response.status}`
|
|
5540
5550
|
);
|
|
@@ -6225,6 +6235,10 @@ var CliServerManager = class {
|
|
|
6225
6235
|
);
|
|
6226
6236
|
this.registerProxyProcessors(connection, config.name);
|
|
6227
6237
|
this.emitConnected(connection, false);
|
|
6238
|
+
} else if (connection.needsSignIn) {
|
|
6239
|
+
logger?.info(
|
|
6240
|
+
`Server '${config.name}' needs a sign-in; its commands load once you are signed in.`
|
|
6241
|
+
);
|
|
6228
6242
|
} else {
|
|
6229
6243
|
logger?.warn(
|
|
6230
6244
|
`Could not connect to server '${config.name}' at ${config.url}. Commands from this server will not be available.`
|
|
@@ -6707,6 +6721,20 @@ var getCliNameArt = (cols) => {
|
|
|
6707
6721
|
}
|
|
6708
6722
|
return "\n Qodalis CLI\n";
|
|
6709
6723
|
};
|
|
6724
|
+
var DEFAULT_CLI_NAME = "Web CLI";
|
|
6725
|
+
var resolveCliBranding = (branding) => {
|
|
6726
|
+
const custom = branding?.name?.trim() || void 0;
|
|
6727
|
+
const name = custom ?? DEFAULT_CLI_NAME;
|
|
6728
|
+
const icon = branding?.icon?.trim() || void 0;
|
|
6729
|
+
return {
|
|
6730
|
+
name,
|
|
6731
|
+
custom: !!custom,
|
|
6732
|
+
icon,
|
|
6733
|
+
art: (cols) => custom ? `
|
|
6734
|
+
${custom}
|
|
6735
|
+
` : getCliNameArt(cols)
|
|
6736
|
+
};
|
|
6737
|
+
};
|
|
6710
6738
|
var hotkeysInfo = [
|
|
6711
6739
|
{
|
|
6712
6740
|
key: "Ctrl + C",
|
|
@@ -6784,7 +6812,9 @@ var CliVersionCommandProcessor = class {
|
|
|
6784
6812
|
writer.wrapInColor(getCliNameArt(context2.terminal.cols), cliCore.CliForegroundColor.Cyan)
|
|
6785
6813
|
);
|
|
6786
6814
|
const framework = context2.services.get("cli-framework") ?? "vanilla";
|
|
6815
|
+
const branding = resolveCliBranding(context2.options?.branding);
|
|
6787
6816
|
writer.writeBox([
|
|
6817
|
+
...branding.custom ? [`${DIM2}App${RESET2} ${writer.wrapInColor(branding.name, cliCore.CliForegroundColor.Cyan)}`] : [],
|
|
6788
6818
|
`${DIM2}CLI${RESET2} ${writer.wrapInColor(`v${LIBRARY_VERSION}`, cliCore.CliForegroundColor.Green)}`,
|
|
6789
6819
|
`${DIM2}Core${RESET2} ${writer.wrapInColor(`v${cliCore.LIBRARY_VERSION}`, cliCore.CliForegroundColor.Green)}`,
|
|
6790
6820
|
`${DIM2}Framework${RESET2} ${writer.wrapInColor(framework, cliCore.CliForegroundColor.Cyan)}`,
|
|
@@ -19278,8 +19308,9 @@ var welcomeModule = {
|
|
|
19278
19308
|
);
|
|
19279
19309
|
await configureStore.initialize();
|
|
19280
19310
|
const state = configureStore.getState();
|
|
19281
|
-
|
|
19282
|
-
|
|
19311
|
+
const stored = state?.["system"]?.["welcomeMessage"];
|
|
19312
|
+
if (stored && stored !== "always") {
|
|
19313
|
+
showOption = stored;
|
|
19283
19314
|
}
|
|
19284
19315
|
}
|
|
19285
19316
|
if (showOption) {
|
|
@@ -19291,10 +19322,12 @@ var welcomeModule = {
|
|
|
19291
19322
|
if (config.message) {
|
|
19292
19323
|
context2.terminal.writeln(config.message);
|
|
19293
19324
|
} else {
|
|
19325
|
+
const branding = resolveCliBranding(context2.options?.branding);
|
|
19326
|
+
const art = branding.art(context2.terminal.cols);
|
|
19294
19327
|
const lines = [
|
|
19295
|
-
`\u{1F680} Welcome to
|
|
19328
|
+
`\u{1F680} Welcome to ${branding.name} [Version ${context2.writer.wrapInColor(LIBRARY_VERSION, cliCore.CliForegroundColor.Green)}]`,
|
|
19296
19329
|
`(c) ${(/* @__PURE__ */ new Date()).getFullYear()} Qodalis Solutions. All rights reserved.`,
|
|
19297
|
-
|
|
19330
|
+
art,
|
|
19298
19331
|
"",
|
|
19299
19332
|
`\u{1F4D6} ${context2.writer.wrapInColor("Documentation:", cliCore.CliForegroundColor.Green)} https://cli.qodalis.com/docs/`,
|
|
19300
19333
|
"",
|
|
@@ -19302,7 +19335,10 @@ var welcomeModule = {
|
|
|
19302
19335
|
""
|
|
19303
19336
|
];
|
|
19304
19337
|
lines.forEach((line2) => {
|
|
19305
|
-
context2.terminal.
|
|
19338
|
+
const wrapped = line2 === art ? [line2] : wrapWelcomeLine(line2, context2.terminal.cols);
|
|
19339
|
+
wrapped.forEach(
|
|
19340
|
+
(part) => context2.terminal.write(part + "\r\n")
|
|
19341
|
+
);
|
|
19306
19342
|
});
|
|
19307
19343
|
}
|
|
19308
19344
|
recordWelcomeMessageDisplay();
|
|
@@ -19334,12 +19370,51 @@ var greetingModule = {
|
|
|
19334
19370
|
if (host.typedDuringBoot || host.isReadingInput || context2.currentLine) {
|
|
19335
19371
|
return;
|
|
19336
19372
|
}
|
|
19337
|
-
|
|
19373
|
+
const buffer = context2.terminal.buffer?.active;
|
|
19374
|
+
const room = context2.terminal.cols - (buffer?.cursorX ?? 0) - 1;
|
|
19375
|
+
const greeting = fitGreeting(getGreetingBasedOnTime(), room);
|
|
19376
|
+
if (!greeting) return;
|
|
19377
|
+
await context2.textAnimator?.showText(greeting, {
|
|
19338
19378
|
speed: 60,
|
|
19339
19379
|
removeAfterTyping: true
|
|
19340
19380
|
});
|
|
19341
19381
|
}
|
|
19342
19382
|
};
|
|
19383
|
+
function fitGreeting(text, room) {
|
|
19384
|
+
const width = (value) => Array.from(value).reduce(
|
|
19385
|
+
(sum, ch) => sum + (ch.codePointAt(0) > 65535 || /\p{Extended_Pictographic}/u.test(ch) ? 2 : ch === "\uFE0F" ? 0 : 1),
|
|
19386
|
+
0
|
|
19387
|
+
);
|
|
19388
|
+
if (width(text) <= room) return text;
|
|
19389
|
+
const words = text.split(" ");
|
|
19390
|
+
let fitted = "";
|
|
19391
|
+
for (const word of words) {
|
|
19392
|
+
const next = fitted ? `${fitted} ${word}` : word;
|
|
19393
|
+
if (width(next) > room) break;
|
|
19394
|
+
fitted = next;
|
|
19395
|
+
}
|
|
19396
|
+
return fitted.split(" ").length >= 3 ? fitted.replace(/[,;:]$/, "") : null;
|
|
19397
|
+
}
|
|
19398
|
+
function wrapWelcomeLine(line2, cols) {
|
|
19399
|
+
const width = Math.max(20, cols - 1);
|
|
19400
|
+
const visible = (value) => Array.from(value.replace(/\x1b\[[0-9;]*m/g, "")).reduce(
|
|
19401
|
+
(sum, ch) => sum + (ch.codePointAt(0) > 65535 ? 2 : ch === "\uFE0F" ? 0 : 1),
|
|
19402
|
+
0
|
|
19403
|
+
);
|
|
19404
|
+
if (visible(line2) <= width) return [line2];
|
|
19405
|
+
const lines = [];
|
|
19406
|
+
let current = "";
|
|
19407
|
+
for (const word of line2.split(" ")) {
|
|
19408
|
+
if (current && visible(current) + 1 + visible(word) > width) {
|
|
19409
|
+
lines.push(current);
|
|
19410
|
+
current = word;
|
|
19411
|
+
} else {
|
|
19412
|
+
current = current ? `${current} ${word}` : word;
|
|
19413
|
+
}
|
|
19414
|
+
}
|
|
19415
|
+
if (current) lines.push(current);
|
|
19416
|
+
return lines;
|
|
19417
|
+
}
|
|
19343
19418
|
function shouldDisplayWelcomeMessage(showOption) {
|
|
19344
19419
|
const lastDisplayed = localStorage.getItem(
|
|
19345
19420
|
"cliWelcomeMessageLastDisplayed"
|
|
@@ -22859,7 +22934,7 @@ var CliEngine = class {
|
|
|
22859
22934
|
(s) => s.enabled !== false
|
|
22860
22935
|
).length;
|
|
22861
22936
|
bootLog.addSteps(1 + serverCount);
|
|
22862
|
-
bootLog.info(`Starting
|
|
22937
|
+
bootLog.info(`Starting ${resolveCliBranding(this.options?.branding).name} ${LIBRARY_VERSION}`);
|
|
22863
22938
|
bootLog.ok(
|
|
22864
22939
|
`Terminal and services ready \xB7 ${this.terminal.cols}\xD7${this.terminal.rows}`,
|
|
22865
22940
|
bootLog.elapsedMs
|
|
@@ -24071,7 +24146,9 @@ var CliPanelController = class {
|
|
|
24071
24146
|
unhide() {
|
|
24072
24147
|
if (!this.snapshot.hidden) return;
|
|
24073
24148
|
this.updateHidden(false);
|
|
24074
|
-
|
|
24149
|
+
const collapsed = this.snapshot.initialized ? this.preHideCollapsed : false;
|
|
24150
|
+
if (this.snapshot.collapsed !== collapsed) this.updateCollapsed(collapsed);
|
|
24151
|
+
if (!collapsed) this.ensureInitialized();
|
|
24075
24152
|
}
|
|
24076
24153
|
toggleHide() {
|
|
24077
24154
|
if (this.snapshot.hidden) this.unhide();
|
|
@@ -24682,6 +24759,11 @@ var PANEL_LABELS = {
|
|
|
24682
24759
|
serversHeader: "Server Connections",
|
|
24683
24760
|
serversEmpty: "No servers configured"
|
|
24684
24761
|
};
|
|
24762
|
+
function panelBranding(options) {
|
|
24763
|
+
const name = options?.branding?.name?.trim();
|
|
24764
|
+
const icon = options?.branding?.icon?.trim();
|
|
24765
|
+
return { title: name || PANEL_LABELS.title, iconUrl: icon || void 0 };
|
|
24766
|
+
}
|
|
24685
24767
|
var SERVICES_ICON = "\u2699";
|
|
24686
24768
|
var UPTIME_ICON = "\u2191";
|
|
24687
24769
|
var SUCCESS_ICON = "\u2713";
|
|
@@ -24988,6 +25070,7 @@ exports.CliUptimeCommandProcessor = CliUptimeCommandProcessor;
|
|
|
24988
25070
|
exports.CliVersionCommandProcessor = CliVersionCommandProcessor;
|
|
24989
25071
|
exports.CliYesCommandProcessor = CliYesCommandProcessor;
|
|
24990
25072
|
exports.CommandParser = CommandParser;
|
|
25073
|
+
exports.DEFAULT_CLI_NAME = DEFAULT_CLI_NAME;
|
|
24991
25074
|
exports.DEFAULT_GLOBAL_STATUS = DEFAULT_GLOBAL_STATUS;
|
|
24992
25075
|
exports.DEFAULT_PANEL_HEIGHT = DEFAULT_PANEL_HEIGHT;
|
|
24993
25076
|
exports.DEFAULT_PANEL_WIDTH = DEFAULT_PANEL_WIDTH;
|
|
@@ -25070,6 +25153,7 @@ exports.openLink = openLink;
|
|
|
25070
25153
|
exports.openStatusDropdown = openStatusDropdown;
|
|
25071
25154
|
exports.paneClass = paneClass;
|
|
25072
25155
|
exports.paneStyle = paneStyle;
|
|
25156
|
+
exports.panelBranding = panelBranding;
|
|
25073
25157
|
exports.panelTabClass = panelTabClass;
|
|
25074
25158
|
exports.panelTabDotClass = panelTabDotClass;
|
|
25075
25159
|
exports.panelWrapperClass = panelWrapperClass;
|
|
@@ -25086,6 +25170,7 @@ exports.renderServerResponse = renderServerResponse;
|
|
|
25086
25170
|
exports.renderSingleOutput = renderSingleOutput;
|
|
25087
25171
|
exports.resizePaneWidths = resizePaneWidths;
|
|
25088
25172
|
exports.resizedPanelSize = resizedPanelSize;
|
|
25173
|
+
exports.resolveCliBranding = resolveCliBranding;
|
|
25089
25174
|
exports.resolveCliHostConfig = resolveCliHostConfig;
|
|
25090
25175
|
exports.runContextMenuAction = runContextMenuAction;
|
|
25091
25176
|
exports.runScript = runScript;
|