@qodalis/cli-core 2.4.2 → 2.5.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/package.json +1 -1
- package/public-api.d.mts +67 -3
- package/public-api.d.ts +67 -3
- package/public-api.js +6 -2
- package/public-api.js.map +1 -1
- package/public-api.mjs +6 -3
- package/public-api.mjs.map +1 -1
package/package.json
CHANGED
package/public-api.d.mts
CHANGED
|
@@ -677,6 +677,27 @@ interface ICliStateStore {
|
|
|
677
677
|
reload?(): Promise<void>;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
|
+
/**
|
|
681
|
+
* Where the CLI keeps secrets such as the API tokens of servers linked with
|
|
682
|
+
* `server add`. The default encrypts them with a non-extractable Web Crypto key
|
|
683
|
+
* kept in IndexedDB; a host replaces it (Android Keystore, iOS Keychain,
|
|
684
|
+
* Electron `safeStorage`) by providing {@link ICliSecretStore_TOKEN}.
|
|
685
|
+
*/
|
|
686
|
+
interface ICliSecretStore {
|
|
687
|
+
/** Whether secrets can be kept (e.g. false without Web Crypto on an insecure page). */
|
|
688
|
+
isAvailable(): boolean | Promise<boolean>;
|
|
689
|
+
/** The secret saved under `key`, or undefined. */
|
|
690
|
+
get(key: string): Promise<string | undefined>;
|
|
691
|
+
/** Saves a secret under `key`, replacing any previous one. */
|
|
692
|
+
set(key: string, value: string): Promise<void>;
|
|
693
|
+
/** Deletes the secret saved under `key`. */
|
|
694
|
+
delete(key: string): Promise<void>;
|
|
695
|
+
/** Deletes every secret (and the key that encrypts them). */
|
|
696
|
+
clear(): Promise<void>;
|
|
697
|
+
}
|
|
698
|
+
/** Token for {@link ICliSecretStore} */
|
|
699
|
+
declare const ICliSecretStore_TOKEN: CliToken<ICliSecretStore>;
|
|
700
|
+
|
|
680
701
|
/** Ownership metadata attached to files, directories, or other resources */
|
|
681
702
|
interface ICliOwnership {
|
|
682
703
|
/** User ID of the owner */
|
|
@@ -2180,6 +2201,17 @@ type CliOptions = Record<string, any> & {
|
|
|
2180
2201
|
*/
|
|
2181
2202
|
sources?: CliPackageSource[];
|
|
2182
2203
|
};
|
|
2204
|
+
/**
|
|
2205
|
+
* Servers the user links from the terminal (`server add`): `true` (default),
|
|
2206
|
+
* `false` (no linking: `server add` is refused and linked servers are not
|
|
2207
|
+
* restored), or `{ allowedOrigins }` to accept only servers whose origin
|
|
2208
|
+
* matches one of them (`https://*.example.com`; `*` matches within the host
|
|
2209
|
+
* name). Host servers (`servers`) can never be removed or replaced from the
|
|
2210
|
+
* terminal.
|
|
2211
|
+
*/
|
|
2212
|
+
userServers?: boolean | {
|
|
2213
|
+
allowedOrigins: string[];
|
|
2214
|
+
};
|
|
2183
2215
|
/**
|
|
2184
2216
|
* Remote CLI servers to connect to.
|
|
2185
2217
|
* Commands from each server are discovered and registered as proxy processors.
|
|
@@ -2239,6 +2271,10 @@ type CliProcessorMetadata = Record<string, any> & {
|
|
|
2239
2271
|
* If true, the processor requires the server to be running
|
|
2240
2272
|
*/
|
|
2241
2273
|
requireServer?: boolean;
|
|
2274
|
+
/**
|
|
2275
|
+
* The connected server the command runs on (server commands); help names it.
|
|
2276
|
+
*/
|
|
2277
|
+
server?: string;
|
|
2242
2278
|
/**
|
|
2243
2279
|
* The module the processor belongs to
|
|
2244
2280
|
*/
|
|
@@ -2854,6 +2890,17 @@ interface ICliCommandParameterDescriptor {
|
|
|
2854
2890
|
* The default value of the parameter
|
|
2855
2891
|
*/
|
|
2856
2892
|
defaultValue?: any;
|
|
2893
|
+
/**
|
|
2894
|
+
* The only values the parameter takes. Help lists them and Tab completes
|
|
2895
|
+
* them after `--name ` and `--name=`. Add a `validator` to refuse other
|
|
2896
|
+
* values (server commands get one that ignores case).
|
|
2897
|
+
*/
|
|
2898
|
+
allowedValues?: string[];
|
|
2899
|
+
/**
|
|
2900
|
+
* Example values of the parameter (e.g. `Paris`, `New York`). Help lists
|
|
2901
|
+
* them after the description.
|
|
2902
|
+
*/
|
|
2903
|
+
examples?: string[];
|
|
2857
2904
|
/**
|
|
2858
2905
|
* A validator function that validates the value of the parameter
|
|
2859
2906
|
* @param value The value to validate
|
|
@@ -3516,6 +3563,19 @@ type CliServerCommandDescriptor = {
|
|
|
3516
3563
|
command: string;
|
|
3517
3564
|
description?: string;
|
|
3518
3565
|
version?: string;
|
|
3566
|
+
/** Other names of the command (servers with command metadata) */
|
|
3567
|
+
aliases?: string[];
|
|
3568
|
+
/** Example command lines for help */
|
|
3569
|
+
examples?: {
|
|
3570
|
+
command: string;
|
|
3571
|
+
description?: string;
|
|
3572
|
+
}[];
|
|
3573
|
+
/** Longer help text: paragraphs separated by a blank line */
|
|
3574
|
+
documentation?: string;
|
|
3575
|
+
/** The group the command is listed under in help */
|
|
3576
|
+
module?: string;
|
|
3577
|
+
/** One emoji for help */
|
|
3578
|
+
icon?: string;
|
|
3519
3579
|
parameters?: {
|
|
3520
3580
|
name: string;
|
|
3521
3581
|
aliases?: string[];
|
|
@@ -3523,6 +3583,10 @@ type CliServerCommandDescriptor = {
|
|
|
3523
3583
|
required: boolean;
|
|
3524
3584
|
type: string;
|
|
3525
3585
|
defaultValue?: any;
|
|
3586
|
+
/** The only values the parameter takes */
|
|
3587
|
+
allowedValues?: string[];
|
|
3588
|
+
/** Example values */
|
|
3589
|
+
examples?: string[];
|
|
3526
3590
|
}[];
|
|
3527
3591
|
processors?: CliServerCommandDescriptor[];
|
|
3528
3592
|
};
|
|
@@ -4266,7 +4330,7 @@ interface CliThemeInfo {
|
|
|
4266
4330
|
|
|
4267
4331
|
declare const DefaultThemeInfos: Record<string, CliThemeInfo>;
|
|
4268
4332
|
|
|
4269
|
-
declare const LIBRARY_VERSION = "2.
|
|
4333
|
+
declare const LIBRARY_VERSION = "2.5.1";
|
|
4270
4334
|
declare const API_VERSION = 2;
|
|
4271
4335
|
|
|
4272
4336
|
/**
|
|
@@ -4327,5 +4391,5 @@ declare class BrowserFileTransferService implements ICliFileTransferService {
|
|
|
4327
4391
|
private _pickFile;
|
|
4328
4392
|
}
|
|
4329
4393
|
|
|
4330
|
-
export { API_VERSION, BrowserFileTransferService, CANCELLATION_ERROR_MESSAGE, CLI_CONFIGURE_STORE_NAME, CLI_WS_TICKET_PATH, CancellablePromise, CliAccessDeniedError, CliBackgroundColor, CliForegroundColor, CliHttpError, CliIcon, CliKeyData, CliLogLevel, CliModuleRegistry, CliPanelPalettes, CliServerPermissions, CliUsersPermissions, DEFAULT_DIR_PERMISSIONS, DEFAULT_FILE_PERMISSIONS, DefaultLibraryAuthor, DefaultThemeInfos, DefaultThemes, ICliAuditService_TOKEN, ICliAuthService_TOKEN, ICliAuthorizationService_TOKEN, ICliCommandGuard_TOKEN, ICliCompletionProvider_TOKEN, ICliDragDropService_TOKEN, ICliEventBus_TOKEN, ICliFilePickerProvider_TOKEN, ICliFileTransferService_TOKEN, ICliGroupsStoreService_TOKEN, ICliHttpClient_TOKEN, ICliKeyValueStore_TOKEN, ICliPermissionRegistry_TOKEN, ICliPermissionService_TOKEN, ICliServerAuthService_TOKEN, ICliServerAuthTokenProvider_TOKEN, ICliServerManager_TOKEN, ICliSessionsService_TOKEN, ICliTranslationService_TOKEN, ICliUserEventService_TOKEN, ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN, LIBRARY_VERSION, ObjectDescriber, ServerVersionNegotiator, appendQueryParams, bootCliModule, buildAuthenticatedWebSocketUrl, buildServerWebSocketUrl, clearTerminalLine, cliAccessMetadataGuards, cliAuthorize, cliCanAccess, cliDefaultServer, cliEvaluateAccess, cliHasPermission, cliMergePermissions, cliMissingPermissions, cliPermissionMatches, cliRequireAuthGuard, cliRequiredGroupsGuard, cliRequiredPermissionsGuard, colorFirstWord, colorSchemeOf, colorizeJson, compareVersions, constants, createCliToken, createWorkerService, delay, derivePanelColors, derivePanelThemeStyles, enums, formatJson, getConfigValue, getParameterValue, getPluginConfigValue, getRightOfWord, highlightTextWithBg, initializeBrowserEnvironment, isCliAccessDeniedError, joinShellWords, loadPanelPosition, nextPanelPosition, panelColorStyles, prefersDarkScheme, quoteShellWord, resolveConfigurationCategories, resolveHeaders, resolvePanelTheme, resolveServerHeaders, resolveServerWebSocketUrl, satisfiesMinVersion, satisfiesVersionRange, savePanelPosition, splitShellWords, stripAnsi, toQueryString, truncateToWidth, unquoteRawArgument, utils, visibleLength, writeExamples, writeHint, writeUsage, writeWrapped };
|
|
4331
|
-
export type { CliAccessAction, CliAddUser, CliBackgroundServiceStatus, CliBackgroundServiceType, CliBootOptions, CliBranding, CliCommandGuardResult, CliDateOptions, CliEmitOptions, CliEngineSnapshot, CliEvent, CliEventData, CliEventHandler, CliEventMap, CliEventType, CliFactoryProvider, CliFilePickerOptions, CliFileResult, CliFullScreenOptions, CliHeadersProvider, CliHelpRow, CliHttpRequestOptions, CliLineOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNotification, CliNotificationLevel, CliNumberOptions, CliOptions, CliPackageSource, CliPanelColorScheme, CliPanelColors, CliPanelConfig, CliPanelHideAlignment, CliPanelPaneState, CliPanelPosition, CliPanelState, CliPanelTabState, CliPanelTheme, CliPanelThemeInput, CliPercentageProgressBarUpdateValueOptions, CliPermissionDefinition, CliProcessCommand, CliProcessorMetadata, CliProvider, CliResolvedPanelTheme, CliSelectOption, CliSelectOptions, CliServerCapabilities, CliServerCommandDescriptor, CliServerConfig, CliServerOutput, CliServerResponse, CliServerTablePage, CliServiceEventHandler, CliServiceExecutionMode, CliServiceLogLevel, CliState, CliStateConfiguration, CliStateScope, CliStateStoreOptions, CliTableOptions, CliTextAnimatorOptions, CliTheme, CliThemeCategory, CliThemeInfo, CliToken, CliTypeProvider, CliUpdateUser, CliValueProvider, CliWebSocketAuthOptions, CliWorkerInboundMessage, CliWorkerOutboundMessage, CustomEventType, DefaultThemesType, ICliAuditEntry, ICliAuditService, ICliAuthService, ICliAuthorizationService, ICliBackgroundService, ICliBackgroundServiceInfo, ICliBackgroundServiceRegistry, ICliClipboard, ICliCommandAuthor, ICliCommandChildProcessor, ICliCommandControls, ICliCommandExecutorService, ICliCommandGuard, ICliCommandKey, ICliCommandParameterDescriptor, ICliCommandProcessor, ICliCommandProcessorRegistry, ICliCompletionContext, ICliCompletionProvider, ICliConfigurableModule, ICliConfigurationOption, ICliDragDropService, ICliEventBus, ICliExecutionContext, ICliExecutionProcess, ICliFileEntry, ICliFilePickerProvider, ICliFileTransferService, ICliGlobalParameterHandler, ICliGroup, ICliGroupsStoreService, ICliHttpClient, ICliInputReader, ICliKeyValueStore, ICliLogger, ICliManagedInterval, ICliManagedTimer, ICliModule, ICliNotifier, ICliOwnership, ICliPanelRef, ICliPercentageProgressBar, ICliPermissionRegistry, ICliPermissionService, ICliPingServerService, ICliPrincipal, ICliProcessEntry, ICliProcessRegisterOptions, ICliProcessRegistry, ICliProcessorHook, ICliProgressBar, ICliProtectedResource, ICliServerAuthService, ICliServerAuthTokenProvider, ICliServerManager, ICliServiceContext, ICliServiceEvent, ICliServiceLogEntry, ICliServiceProvider, ICliSessionInfo, ICliSessionsService, ICliSpinner, ICliStateStore, ICliTerminalWriter, ICliTextAnimator, ICliTranslationService, ICliUser, ICliUserCredentials, ICliUserEvent, ICliUserEventService, ICliUserSession, ICliUserSessionService, ICliUsersStoreService, ISyntaxHighlightRule, ISyntaxHighlighter, ISyntaxTheme, LineState, Package, ServerVersionInfo, WorkerServiceContext };
|
|
4394
|
+
export { API_VERSION, BrowserFileTransferService, CANCELLATION_ERROR_MESSAGE, CLI_CONFIGURE_STORE_NAME, CLI_WS_TICKET_PATH, CancellablePromise, CliAccessDeniedError, CliBackgroundColor, CliForegroundColor, CliHttpError, CliIcon, CliKeyData, CliLogLevel, CliModuleRegistry, CliPanelPalettes, CliServerPermissions, CliUsersPermissions, DEFAULT_DIR_PERMISSIONS, DEFAULT_FILE_PERMISSIONS, DefaultLibraryAuthor, DefaultThemeInfos, DefaultThemes, ICliAuditService_TOKEN, ICliAuthService_TOKEN, ICliAuthorizationService_TOKEN, ICliCommandGuard_TOKEN, ICliCompletionProvider_TOKEN, ICliDragDropService_TOKEN, ICliEventBus_TOKEN, ICliFilePickerProvider_TOKEN, ICliFileTransferService_TOKEN, ICliGroupsStoreService_TOKEN, ICliHttpClient_TOKEN, ICliKeyValueStore_TOKEN, ICliPermissionRegistry_TOKEN, ICliPermissionService_TOKEN, ICliSecretStore_TOKEN, ICliServerAuthService_TOKEN, ICliServerAuthTokenProvider_TOKEN, ICliServerManager_TOKEN, ICliSessionsService_TOKEN, ICliTranslationService_TOKEN, ICliUserEventService_TOKEN, ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN, LIBRARY_VERSION, ObjectDescriber, ServerVersionNegotiator, appendQueryParams, bootCliModule, buildAuthenticatedWebSocketUrl, buildServerWebSocketUrl, clearTerminalLine, cliAccessMetadataGuards, cliAuthorize, cliCanAccess, cliDefaultServer, cliEvaluateAccess, cliHasPermission, cliMergePermissions, cliMissingPermissions, cliPermissionMatches, cliRequireAuthGuard, cliRequiredGroupsGuard, cliRequiredPermissionsGuard, colorFirstWord, colorSchemeOf, colorizeJson, compareVersions, constants, createCliToken, createWorkerService, delay, derivePanelColors, derivePanelThemeStyles, enums, formatJson, getConfigValue, getParameterValue, getPluginConfigValue, getRightOfWord, highlightTextWithBg, initializeBrowserEnvironment, isCliAccessDeniedError, joinShellWords, loadPanelPosition, nextPanelPosition, panelColorStyles, prefersDarkScheme, quoteShellWord, resolveConfigurationCategories, resolveHeaders, resolvePanelTheme, resolveServerHeaders, resolveServerWebSocketUrl, satisfiesMinVersion, satisfiesVersionRange, savePanelPosition, splitShellWords, stripAnsi, toQueryString, truncateToWidth, unquoteRawArgument, utils, visibleLength, writeExamples, writeHint, writeUsage, writeWrapped };
|
|
4395
|
+
export type { CliAccessAction, CliAddUser, CliBackgroundServiceStatus, CliBackgroundServiceType, CliBootOptions, CliBranding, CliCommandGuardResult, CliDateOptions, CliEmitOptions, CliEngineSnapshot, CliEvent, CliEventData, CliEventHandler, CliEventMap, CliEventType, CliFactoryProvider, CliFilePickerOptions, CliFileResult, CliFullScreenOptions, CliHeadersProvider, CliHelpRow, CliHttpRequestOptions, CliLineOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNotification, CliNotificationLevel, CliNumberOptions, CliOptions, CliPackageSource, CliPanelColorScheme, CliPanelColors, CliPanelConfig, CliPanelHideAlignment, CliPanelPaneState, CliPanelPosition, CliPanelState, CliPanelTabState, CliPanelTheme, CliPanelThemeInput, CliPercentageProgressBarUpdateValueOptions, CliPermissionDefinition, CliProcessCommand, CliProcessorMetadata, CliProvider, CliResolvedPanelTheme, CliSelectOption, CliSelectOptions, CliServerCapabilities, CliServerCommandDescriptor, CliServerConfig, CliServerOutput, CliServerResponse, CliServerTablePage, CliServiceEventHandler, CliServiceExecutionMode, CliServiceLogLevel, CliState, CliStateConfiguration, CliStateScope, CliStateStoreOptions, CliTableOptions, CliTextAnimatorOptions, CliTheme, CliThemeCategory, CliThemeInfo, CliToken, CliTypeProvider, CliUpdateUser, CliValueProvider, CliWebSocketAuthOptions, CliWorkerInboundMessage, CliWorkerOutboundMessage, CustomEventType, DefaultThemesType, ICliAuditEntry, ICliAuditService, ICliAuthService, ICliAuthorizationService, ICliBackgroundService, ICliBackgroundServiceInfo, ICliBackgroundServiceRegistry, ICliClipboard, ICliCommandAuthor, ICliCommandChildProcessor, ICliCommandControls, ICliCommandExecutorService, ICliCommandGuard, ICliCommandKey, ICliCommandParameterDescriptor, ICliCommandProcessor, ICliCommandProcessorRegistry, ICliCompletionContext, ICliCompletionProvider, ICliConfigurableModule, ICliConfigurationOption, ICliDragDropService, ICliEventBus, ICliExecutionContext, ICliExecutionProcess, ICliFileEntry, ICliFilePickerProvider, ICliFileTransferService, ICliGlobalParameterHandler, ICliGroup, ICliGroupsStoreService, ICliHttpClient, ICliInputReader, ICliKeyValueStore, ICliLogger, ICliManagedInterval, ICliManagedTimer, ICliModule, ICliNotifier, ICliOwnership, ICliPanelRef, ICliPercentageProgressBar, ICliPermissionRegistry, ICliPermissionService, ICliPingServerService, ICliPrincipal, ICliProcessEntry, ICliProcessRegisterOptions, ICliProcessRegistry, ICliProcessorHook, ICliProgressBar, ICliProtectedResource, ICliSecretStore, ICliServerAuthService, ICliServerAuthTokenProvider, ICliServerManager, ICliServiceContext, ICliServiceEvent, ICliServiceLogEntry, ICliServiceProvider, ICliSessionInfo, ICliSessionsService, ICliSpinner, ICliStateStore, ICliTerminalWriter, ICliTextAnimator, ICliTranslationService, ICliUser, ICliUserCredentials, ICliUserEvent, ICliUserEventService, ICliUserSession, ICliUserSessionService, ICliUsersStoreService, ISyntaxHighlightRule, ISyntaxHighlighter, ISyntaxTheme, LineState, Package, ServerVersionInfo, WorkerServiceContext };
|
package/public-api.d.ts
CHANGED
|
@@ -677,6 +677,27 @@ interface ICliStateStore {
|
|
|
677
677
|
reload?(): Promise<void>;
|
|
678
678
|
}
|
|
679
679
|
|
|
680
|
+
/**
|
|
681
|
+
* Where the CLI keeps secrets such as the API tokens of servers linked with
|
|
682
|
+
* `server add`. The default encrypts them with a non-extractable Web Crypto key
|
|
683
|
+
* kept in IndexedDB; a host replaces it (Android Keystore, iOS Keychain,
|
|
684
|
+
* Electron `safeStorage`) by providing {@link ICliSecretStore_TOKEN}.
|
|
685
|
+
*/
|
|
686
|
+
interface ICliSecretStore {
|
|
687
|
+
/** Whether secrets can be kept (e.g. false without Web Crypto on an insecure page). */
|
|
688
|
+
isAvailable(): boolean | Promise<boolean>;
|
|
689
|
+
/** The secret saved under `key`, or undefined. */
|
|
690
|
+
get(key: string): Promise<string | undefined>;
|
|
691
|
+
/** Saves a secret under `key`, replacing any previous one. */
|
|
692
|
+
set(key: string, value: string): Promise<void>;
|
|
693
|
+
/** Deletes the secret saved under `key`. */
|
|
694
|
+
delete(key: string): Promise<void>;
|
|
695
|
+
/** Deletes every secret (and the key that encrypts them). */
|
|
696
|
+
clear(): Promise<void>;
|
|
697
|
+
}
|
|
698
|
+
/** Token for {@link ICliSecretStore} */
|
|
699
|
+
declare const ICliSecretStore_TOKEN: CliToken<ICliSecretStore>;
|
|
700
|
+
|
|
680
701
|
/** Ownership metadata attached to files, directories, or other resources */
|
|
681
702
|
interface ICliOwnership {
|
|
682
703
|
/** User ID of the owner */
|
|
@@ -2180,6 +2201,17 @@ type CliOptions = Record<string, any> & {
|
|
|
2180
2201
|
*/
|
|
2181
2202
|
sources?: CliPackageSource[];
|
|
2182
2203
|
};
|
|
2204
|
+
/**
|
|
2205
|
+
* Servers the user links from the terminal (`server add`): `true` (default),
|
|
2206
|
+
* `false` (no linking: `server add` is refused and linked servers are not
|
|
2207
|
+
* restored), or `{ allowedOrigins }` to accept only servers whose origin
|
|
2208
|
+
* matches one of them (`https://*.example.com`; `*` matches within the host
|
|
2209
|
+
* name). Host servers (`servers`) can never be removed or replaced from the
|
|
2210
|
+
* terminal.
|
|
2211
|
+
*/
|
|
2212
|
+
userServers?: boolean | {
|
|
2213
|
+
allowedOrigins: string[];
|
|
2214
|
+
};
|
|
2183
2215
|
/**
|
|
2184
2216
|
* Remote CLI servers to connect to.
|
|
2185
2217
|
* Commands from each server are discovered and registered as proxy processors.
|
|
@@ -2239,6 +2271,10 @@ type CliProcessorMetadata = Record<string, any> & {
|
|
|
2239
2271
|
* If true, the processor requires the server to be running
|
|
2240
2272
|
*/
|
|
2241
2273
|
requireServer?: boolean;
|
|
2274
|
+
/**
|
|
2275
|
+
* The connected server the command runs on (server commands); help names it.
|
|
2276
|
+
*/
|
|
2277
|
+
server?: string;
|
|
2242
2278
|
/**
|
|
2243
2279
|
* The module the processor belongs to
|
|
2244
2280
|
*/
|
|
@@ -2854,6 +2890,17 @@ interface ICliCommandParameterDescriptor {
|
|
|
2854
2890
|
* The default value of the parameter
|
|
2855
2891
|
*/
|
|
2856
2892
|
defaultValue?: any;
|
|
2893
|
+
/**
|
|
2894
|
+
* The only values the parameter takes. Help lists them and Tab completes
|
|
2895
|
+
* them after `--name ` and `--name=`. Add a `validator` to refuse other
|
|
2896
|
+
* values (server commands get one that ignores case).
|
|
2897
|
+
*/
|
|
2898
|
+
allowedValues?: string[];
|
|
2899
|
+
/**
|
|
2900
|
+
* Example values of the parameter (e.g. `Paris`, `New York`). Help lists
|
|
2901
|
+
* them after the description.
|
|
2902
|
+
*/
|
|
2903
|
+
examples?: string[];
|
|
2857
2904
|
/**
|
|
2858
2905
|
* A validator function that validates the value of the parameter
|
|
2859
2906
|
* @param value The value to validate
|
|
@@ -3516,6 +3563,19 @@ type CliServerCommandDescriptor = {
|
|
|
3516
3563
|
command: string;
|
|
3517
3564
|
description?: string;
|
|
3518
3565
|
version?: string;
|
|
3566
|
+
/** Other names of the command (servers with command metadata) */
|
|
3567
|
+
aliases?: string[];
|
|
3568
|
+
/** Example command lines for help */
|
|
3569
|
+
examples?: {
|
|
3570
|
+
command: string;
|
|
3571
|
+
description?: string;
|
|
3572
|
+
}[];
|
|
3573
|
+
/** Longer help text: paragraphs separated by a blank line */
|
|
3574
|
+
documentation?: string;
|
|
3575
|
+
/** The group the command is listed under in help */
|
|
3576
|
+
module?: string;
|
|
3577
|
+
/** One emoji for help */
|
|
3578
|
+
icon?: string;
|
|
3519
3579
|
parameters?: {
|
|
3520
3580
|
name: string;
|
|
3521
3581
|
aliases?: string[];
|
|
@@ -3523,6 +3583,10 @@ type CliServerCommandDescriptor = {
|
|
|
3523
3583
|
required: boolean;
|
|
3524
3584
|
type: string;
|
|
3525
3585
|
defaultValue?: any;
|
|
3586
|
+
/** The only values the parameter takes */
|
|
3587
|
+
allowedValues?: string[];
|
|
3588
|
+
/** Example values */
|
|
3589
|
+
examples?: string[];
|
|
3526
3590
|
}[];
|
|
3527
3591
|
processors?: CliServerCommandDescriptor[];
|
|
3528
3592
|
};
|
|
@@ -4266,7 +4330,7 @@ interface CliThemeInfo {
|
|
|
4266
4330
|
|
|
4267
4331
|
declare const DefaultThemeInfos: Record<string, CliThemeInfo>;
|
|
4268
4332
|
|
|
4269
|
-
declare const LIBRARY_VERSION = "2.
|
|
4333
|
+
declare const LIBRARY_VERSION = "2.5.1";
|
|
4270
4334
|
declare const API_VERSION = 2;
|
|
4271
4335
|
|
|
4272
4336
|
/**
|
|
@@ -4327,5 +4391,5 @@ declare class BrowserFileTransferService implements ICliFileTransferService {
|
|
|
4327
4391
|
private _pickFile;
|
|
4328
4392
|
}
|
|
4329
4393
|
|
|
4330
|
-
export { API_VERSION, BrowserFileTransferService, CANCELLATION_ERROR_MESSAGE, CLI_CONFIGURE_STORE_NAME, CLI_WS_TICKET_PATH, CancellablePromise, CliAccessDeniedError, CliBackgroundColor, CliForegroundColor, CliHttpError, CliIcon, CliKeyData, CliLogLevel, CliModuleRegistry, CliPanelPalettes, CliServerPermissions, CliUsersPermissions, DEFAULT_DIR_PERMISSIONS, DEFAULT_FILE_PERMISSIONS, DefaultLibraryAuthor, DefaultThemeInfos, DefaultThemes, ICliAuditService_TOKEN, ICliAuthService_TOKEN, ICliAuthorizationService_TOKEN, ICliCommandGuard_TOKEN, ICliCompletionProvider_TOKEN, ICliDragDropService_TOKEN, ICliEventBus_TOKEN, ICliFilePickerProvider_TOKEN, ICliFileTransferService_TOKEN, ICliGroupsStoreService_TOKEN, ICliHttpClient_TOKEN, ICliKeyValueStore_TOKEN, ICliPermissionRegistry_TOKEN, ICliPermissionService_TOKEN, ICliServerAuthService_TOKEN, ICliServerAuthTokenProvider_TOKEN, ICliServerManager_TOKEN, ICliSessionsService_TOKEN, ICliTranslationService_TOKEN, ICliUserEventService_TOKEN, ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN, LIBRARY_VERSION, ObjectDescriber, ServerVersionNegotiator, appendQueryParams, bootCliModule, buildAuthenticatedWebSocketUrl, buildServerWebSocketUrl, clearTerminalLine, cliAccessMetadataGuards, cliAuthorize, cliCanAccess, cliDefaultServer, cliEvaluateAccess, cliHasPermission, cliMergePermissions, cliMissingPermissions, cliPermissionMatches, cliRequireAuthGuard, cliRequiredGroupsGuard, cliRequiredPermissionsGuard, colorFirstWord, colorSchemeOf, colorizeJson, compareVersions, constants, createCliToken, createWorkerService, delay, derivePanelColors, derivePanelThemeStyles, enums, formatJson, getConfigValue, getParameterValue, getPluginConfigValue, getRightOfWord, highlightTextWithBg, initializeBrowserEnvironment, isCliAccessDeniedError, joinShellWords, loadPanelPosition, nextPanelPosition, panelColorStyles, prefersDarkScheme, quoteShellWord, resolveConfigurationCategories, resolveHeaders, resolvePanelTheme, resolveServerHeaders, resolveServerWebSocketUrl, satisfiesMinVersion, satisfiesVersionRange, savePanelPosition, splitShellWords, stripAnsi, toQueryString, truncateToWidth, unquoteRawArgument, utils, visibleLength, writeExamples, writeHint, writeUsage, writeWrapped };
|
|
4331
|
-
export type { CliAccessAction, CliAddUser, CliBackgroundServiceStatus, CliBackgroundServiceType, CliBootOptions, CliBranding, CliCommandGuardResult, CliDateOptions, CliEmitOptions, CliEngineSnapshot, CliEvent, CliEventData, CliEventHandler, CliEventMap, CliEventType, CliFactoryProvider, CliFilePickerOptions, CliFileResult, CliFullScreenOptions, CliHeadersProvider, CliHelpRow, CliHttpRequestOptions, CliLineOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNotification, CliNotificationLevel, CliNumberOptions, CliOptions, CliPackageSource, CliPanelColorScheme, CliPanelColors, CliPanelConfig, CliPanelHideAlignment, CliPanelPaneState, CliPanelPosition, CliPanelState, CliPanelTabState, CliPanelTheme, CliPanelThemeInput, CliPercentageProgressBarUpdateValueOptions, CliPermissionDefinition, CliProcessCommand, CliProcessorMetadata, CliProvider, CliResolvedPanelTheme, CliSelectOption, CliSelectOptions, CliServerCapabilities, CliServerCommandDescriptor, CliServerConfig, CliServerOutput, CliServerResponse, CliServerTablePage, CliServiceEventHandler, CliServiceExecutionMode, CliServiceLogLevel, CliState, CliStateConfiguration, CliStateScope, CliStateStoreOptions, CliTableOptions, CliTextAnimatorOptions, CliTheme, CliThemeCategory, CliThemeInfo, CliToken, CliTypeProvider, CliUpdateUser, CliValueProvider, CliWebSocketAuthOptions, CliWorkerInboundMessage, CliWorkerOutboundMessage, CustomEventType, DefaultThemesType, ICliAuditEntry, ICliAuditService, ICliAuthService, ICliAuthorizationService, ICliBackgroundService, ICliBackgroundServiceInfo, ICliBackgroundServiceRegistry, ICliClipboard, ICliCommandAuthor, ICliCommandChildProcessor, ICliCommandControls, ICliCommandExecutorService, ICliCommandGuard, ICliCommandKey, ICliCommandParameterDescriptor, ICliCommandProcessor, ICliCommandProcessorRegistry, ICliCompletionContext, ICliCompletionProvider, ICliConfigurableModule, ICliConfigurationOption, ICliDragDropService, ICliEventBus, ICliExecutionContext, ICliExecutionProcess, ICliFileEntry, ICliFilePickerProvider, ICliFileTransferService, ICliGlobalParameterHandler, ICliGroup, ICliGroupsStoreService, ICliHttpClient, ICliInputReader, ICliKeyValueStore, ICliLogger, ICliManagedInterval, ICliManagedTimer, ICliModule, ICliNotifier, ICliOwnership, ICliPanelRef, ICliPercentageProgressBar, ICliPermissionRegistry, ICliPermissionService, ICliPingServerService, ICliPrincipal, ICliProcessEntry, ICliProcessRegisterOptions, ICliProcessRegistry, ICliProcessorHook, ICliProgressBar, ICliProtectedResource, ICliServerAuthService, ICliServerAuthTokenProvider, ICliServerManager, ICliServiceContext, ICliServiceEvent, ICliServiceLogEntry, ICliServiceProvider, ICliSessionInfo, ICliSessionsService, ICliSpinner, ICliStateStore, ICliTerminalWriter, ICliTextAnimator, ICliTranslationService, ICliUser, ICliUserCredentials, ICliUserEvent, ICliUserEventService, ICliUserSession, ICliUserSessionService, ICliUsersStoreService, ISyntaxHighlightRule, ISyntaxHighlighter, ISyntaxTheme, LineState, Package, ServerVersionInfo, WorkerServiceContext };
|
|
4394
|
+
export { API_VERSION, BrowserFileTransferService, CANCELLATION_ERROR_MESSAGE, CLI_CONFIGURE_STORE_NAME, CLI_WS_TICKET_PATH, CancellablePromise, CliAccessDeniedError, CliBackgroundColor, CliForegroundColor, CliHttpError, CliIcon, CliKeyData, CliLogLevel, CliModuleRegistry, CliPanelPalettes, CliServerPermissions, CliUsersPermissions, DEFAULT_DIR_PERMISSIONS, DEFAULT_FILE_PERMISSIONS, DefaultLibraryAuthor, DefaultThemeInfos, DefaultThemes, ICliAuditService_TOKEN, ICliAuthService_TOKEN, ICliAuthorizationService_TOKEN, ICliCommandGuard_TOKEN, ICliCompletionProvider_TOKEN, ICliDragDropService_TOKEN, ICliEventBus_TOKEN, ICliFilePickerProvider_TOKEN, ICliFileTransferService_TOKEN, ICliGroupsStoreService_TOKEN, ICliHttpClient_TOKEN, ICliKeyValueStore_TOKEN, ICliPermissionRegistry_TOKEN, ICliPermissionService_TOKEN, ICliSecretStore_TOKEN, ICliServerAuthService_TOKEN, ICliServerAuthTokenProvider_TOKEN, ICliServerManager_TOKEN, ICliSessionsService_TOKEN, ICliTranslationService_TOKEN, ICliUserEventService_TOKEN, ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN, LIBRARY_VERSION, ObjectDescriber, ServerVersionNegotiator, appendQueryParams, bootCliModule, buildAuthenticatedWebSocketUrl, buildServerWebSocketUrl, clearTerminalLine, cliAccessMetadataGuards, cliAuthorize, cliCanAccess, cliDefaultServer, cliEvaluateAccess, cliHasPermission, cliMergePermissions, cliMissingPermissions, cliPermissionMatches, cliRequireAuthGuard, cliRequiredGroupsGuard, cliRequiredPermissionsGuard, colorFirstWord, colorSchemeOf, colorizeJson, compareVersions, constants, createCliToken, createWorkerService, delay, derivePanelColors, derivePanelThemeStyles, enums, formatJson, getConfigValue, getParameterValue, getPluginConfigValue, getRightOfWord, highlightTextWithBg, initializeBrowserEnvironment, isCliAccessDeniedError, joinShellWords, loadPanelPosition, nextPanelPosition, panelColorStyles, prefersDarkScheme, quoteShellWord, resolveConfigurationCategories, resolveHeaders, resolvePanelTheme, resolveServerHeaders, resolveServerWebSocketUrl, satisfiesMinVersion, satisfiesVersionRange, savePanelPosition, splitShellWords, stripAnsi, toQueryString, truncateToWidth, unquoteRawArgument, utils, visibleLength, writeExamples, writeHint, writeUsage, writeWrapped };
|
|
4395
|
+
export type { CliAccessAction, CliAddUser, CliBackgroundServiceStatus, CliBackgroundServiceType, CliBootOptions, CliBranding, CliCommandGuardResult, CliDateOptions, CliEmitOptions, CliEngineSnapshot, CliEvent, CliEventData, CliEventHandler, CliEventMap, CliEventType, CliFactoryProvider, CliFilePickerOptions, CliFileResult, CliFullScreenOptions, CliHeadersProvider, CliHelpRow, CliHttpRequestOptions, CliLineOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNotification, CliNotificationLevel, CliNumberOptions, CliOptions, CliPackageSource, CliPanelColorScheme, CliPanelColors, CliPanelConfig, CliPanelHideAlignment, CliPanelPaneState, CliPanelPosition, CliPanelState, CliPanelTabState, CliPanelTheme, CliPanelThemeInput, CliPercentageProgressBarUpdateValueOptions, CliPermissionDefinition, CliProcessCommand, CliProcessorMetadata, CliProvider, CliResolvedPanelTheme, CliSelectOption, CliSelectOptions, CliServerCapabilities, CliServerCommandDescriptor, CliServerConfig, CliServerOutput, CliServerResponse, CliServerTablePage, CliServiceEventHandler, CliServiceExecutionMode, CliServiceLogLevel, CliState, CliStateConfiguration, CliStateScope, CliStateStoreOptions, CliTableOptions, CliTextAnimatorOptions, CliTheme, CliThemeCategory, CliThemeInfo, CliToken, CliTypeProvider, CliUpdateUser, CliValueProvider, CliWebSocketAuthOptions, CliWorkerInboundMessage, CliWorkerOutboundMessage, CustomEventType, DefaultThemesType, ICliAuditEntry, ICliAuditService, ICliAuthService, ICliAuthorizationService, ICliBackgroundService, ICliBackgroundServiceInfo, ICliBackgroundServiceRegistry, ICliClipboard, ICliCommandAuthor, ICliCommandChildProcessor, ICliCommandControls, ICliCommandExecutorService, ICliCommandGuard, ICliCommandKey, ICliCommandParameterDescriptor, ICliCommandProcessor, ICliCommandProcessorRegistry, ICliCompletionContext, ICliCompletionProvider, ICliConfigurableModule, ICliConfigurationOption, ICliDragDropService, ICliEventBus, ICliExecutionContext, ICliExecutionProcess, ICliFileEntry, ICliFilePickerProvider, ICliFileTransferService, ICliGlobalParameterHandler, ICliGroup, ICliGroupsStoreService, ICliHttpClient, ICliInputReader, ICliKeyValueStore, ICliLogger, ICliManagedInterval, ICliManagedTimer, ICliModule, ICliNotifier, ICliOwnership, ICliPanelRef, ICliPercentageProgressBar, ICliPermissionRegistry, ICliPermissionService, ICliPingServerService, ICliPrincipal, ICliProcessEntry, ICliProcessRegisterOptions, ICliProcessRegistry, ICliProcessorHook, ICliProgressBar, ICliProtectedResource, ICliSecretStore, ICliServerAuthService, ICliServerAuthTokenProvider, ICliServerManager, ICliServiceContext, ICliServiceEvent, ICliServiceLogEntry, ICliServiceProvider, ICliSessionInfo, ICliSessionsService, ICliSpinner, ICliStateStore, ICliTerminalWriter, ICliTextAnimator, ICliTranslationService, ICliUser, ICliUserCredentials, ICliUserEvent, ICliUserEventService, ICliUserSession, ICliUserSessionService, ICliUsersStoreService, ISyntaxHighlightRule, ISyntaxHighlighter, ISyntaxTheme, LineState, Package, ServerVersionInfo, WorkerServiceContext };
|
package/public-api.js
CHANGED
|
@@ -2191,6 +2191,9 @@ var enums = {
|
|
|
2191
2191
|
CliLogLevel
|
|
2192
2192
|
};
|
|
2193
2193
|
|
|
2194
|
+
// src/lib/interfaces/secret-store.ts
|
|
2195
|
+
var ICliSecretStore_TOKEN = createCliToken("cli-secret-store");
|
|
2196
|
+
|
|
2194
2197
|
// src/lib/interfaces/command-controls.ts
|
|
2195
2198
|
var CliKeyData = {
|
|
2196
2199
|
up: "\x1B[A",
|
|
@@ -2599,7 +2602,7 @@ function satisfiesVersionRange(installed, range) {
|
|
|
2599
2602
|
}
|
|
2600
2603
|
|
|
2601
2604
|
// src/lib/version.ts
|
|
2602
|
-
var LIBRARY_VERSION = "2.
|
|
2605
|
+
var LIBRARY_VERSION = "2.5.1";
|
|
2603
2606
|
var API_VERSION = 2;
|
|
2604
2607
|
|
|
2605
2608
|
// src/lib/utils/server-version-negotiator.ts
|
|
@@ -3708,7 +3711,7 @@ function writeExamples(context, rows) {
|
|
|
3708
3711
|
context,
|
|
3709
3712
|
rows,
|
|
3710
3713
|
(cmd) => cmd,
|
|
3711
|
-
(comment) => writer.wrapInColor(`# ${comment}`, "\x1B[32m" /* Green */)
|
|
3714
|
+
(comment) => comment ? writer.wrapInColor(`# ${comment}`, "\x1B[32m" /* Green */) : ""
|
|
3712
3715
|
);
|
|
3713
3716
|
}
|
|
3714
3717
|
function writeWrapped(context, text, indent = 0) {
|
|
@@ -4425,6 +4428,7 @@ exports.ICliHttpClient_TOKEN = ICliHttpClient_TOKEN;
|
|
|
4425
4428
|
exports.ICliKeyValueStore_TOKEN = ICliKeyValueStore_TOKEN;
|
|
4426
4429
|
exports.ICliPermissionRegistry_TOKEN = ICliPermissionRegistry_TOKEN;
|
|
4427
4430
|
exports.ICliPermissionService_TOKEN = ICliPermissionService_TOKEN;
|
|
4431
|
+
exports.ICliSecretStore_TOKEN = ICliSecretStore_TOKEN;
|
|
4428
4432
|
exports.ICliServerAuthService_TOKEN = ICliServerAuthService_TOKEN;
|
|
4429
4433
|
exports.ICliServerAuthTokenProvider_TOKEN = ICliServerAuthTokenProvider_TOKEN;
|
|
4430
4434
|
exports.ICliServerManager_TOKEN = ICliServerManager_TOKEN;
|