@qodalis/cli 2.0.0-beta.8 → 2.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/public-api.d.mts +50 -12
- package/public-api.d.ts +50 -12
- package/public-api.js +365 -103
- package/public-api.js.map +1 -1
- package/public-api.mjs +359 -97
- package/public-api.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qodalis/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.9",
|
|
4
4
|
"description": "Framework-agnostic CLI engine for @qodalis terminal applications.",
|
|
5
5
|
"author": "Nicolae Lupei, Qodalis Solutions",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./assets/*": "./assets/*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@qodalis/cli-core": "2.0.0-beta.
|
|
33
|
+
"@qodalis/cli-core": "2.0.0-beta.9",
|
|
34
34
|
"@xterm/xterm": "^5.5.0",
|
|
35
35
|
"@xterm/addon-fit": "^0.10.0",
|
|
36
36
|
"@xterm/addon-web-links": "^0.11.0",
|
package/public-api.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _qodalis_cli_core from '@qodalis/cli-core';
|
|
2
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, ICliGlobalParameterHandler, CliProvider, CliForegroundColor, CliBackgroundColor, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegistry, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliIcon } from '@qodalis/cli-core';
|
|
2
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, ICliGlobalParameterHandler, CliProvider, CliForegroundColor, CliBackgroundColor, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegistry, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliIcon } from '@qodalis/cli-core';
|
|
3
3
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
4
4
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
5
5
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
@@ -140,7 +140,7 @@ declare const CliBackgroundServiceRegistry_TOKEN = "cli-background-service-regis
|
|
|
140
140
|
*/
|
|
141
141
|
declare const CliPackageManagerService_TOKEN = "cli-package-manager-service";
|
|
142
142
|
|
|
143
|
-
declare const LIBRARY_VERSION = "2.0.0-beta.
|
|
143
|
+
declare const LIBRARY_VERSION = "2.0.0-beta.9";
|
|
144
144
|
declare const API_VERSION = 2;
|
|
145
145
|
|
|
146
146
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -984,6 +984,11 @@ declare class CliStateStoreManager implements ICliStateStoreManager {
|
|
|
984
984
|
name: string;
|
|
985
985
|
state: Record<string, any>;
|
|
986
986
|
}[];
|
|
987
|
+
/**
|
|
988
|
+
* Dispose all stores (completes their BehaviorSubjects).
|
|
989
|
+
* Called during engine teardown.
|
|
990
|
+
*/
|
|
991
|
+
dispose(): void;
|
|
987
992
|
}
|
|
988
993
|
|
|
989
994
|
/**
|
|
@@ -1191,8 +1196,10 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1191
1196
|
readonly commandHistory: CliCommandHistory;
|
|
1192
1197
|
readonly filePickerProvider: ICliFilePickerProvider;
|
|
1193
1198
|
private readonly modeStack;
|
|
1199
|
+
private readonly stateStoreManager;
|
|
1194
1200
|
private readonly managedTimers;
|
|
1195
1201
|
private resizeDisposable;
|
|
1202
|
+
private windowKeydownListener?;
|
|
1196
1203
|
constructor(deps: CliExecutionContextDeps, terminal: Terminal, executor: ICliCommandExecutorService, cliOptions?: CliOptions);
|
|
1197
1204
|
writeToTerminal(text: string): void;
|
|
1198
1205
|
getTerminalRows(): number;
|
|
@@ -1258,7 +1265,6 @@ declare class CliCommandExecutor implements ICliCommandExecutorService {
|
|
|
1258
1265
|
protected readonly registry: ICliCommandProcessorRegistry;
|
|
1259
1266
|
private commandParser;
|
|
1260
1267
|
private globalParameters;
|
|
1261
|
-
private lastCapturingWriter?;
|
|
1262
1268
|
constructor(registry: ICliCommandProcessorRegistry);
|
|
1263
1269
|
registerGlobalParameter(handler: ICliGlobalParameterHandler): void;
|
|
1264
1270
|
getGlobalParameters(): ICliCommandParameterDescriptor[];
|
|
@@ -1405,6 +1411,13 @@ declare class CliTerminalWriter implements ICliTerminalWriter {
|
|
|
1405
1411
|
columns?: number;
|
|
1406
1412
|
padding?: number;
|
|
1407
1413
|
}): void;
|
|
1414
|
+
writeLink(text: string, url: string): void;
|
|
1415
|
+
writeBox(content: string | string[], options?: {
|
|
1416
|
+
title?: string;
|
|
1417
|
+
borderColor?: CliForegroundColor;
|
|
1418
|
+
padding?: number;
|
|
1419
|
+
}): void;
|
|
1420
|
+
writeIndented(text: string, level?: number): void;
|
|
1408
1421
|
writeTable(headers: string[], rows: string[][]): void;
|
|
1409
1422
|
}
|
|
1410
1423
|
|
|
@@ -1506,6 +1519,7 @@ declare class CliBoot {
|
|
|
1506
1519
|
private initializing;
|
|
1507
1520
|
private readonly moduleRegistry;
|
|
1508
1521
|
private readonly bootedModules;
|
|
1522
|
+
private readonly initializedProcessors;
|
|
1509
1523
|
constructor(registry: ICliCommandProcessorRegistry, services: ICliServiceProvider);
|
|
1510
1524
|
/**
|
|
1511
1525
|
* Get the module registry for external access.
|
|
@@ -1576,6 +1590,13 @@ declare class ScriptLoaderService {
|
|
|
1576
1590
|
content?: string;
|
|
1577
1591
|
error?: any;
|
|
1578
1592
|
}>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Inject an inline script into the page.
|
|
1595
|
+
*
|
|
1596
|
+
* **Security:** This runs `code` in the host page context with full
|
|
1597
|
+
* DOM access. Only call with trusted content (e.g. verified UMD bundles
|
|
1598
|
+
* loaded via the package manager). Never pass user-supplied strings.
|
|
1599
|
+
*/
|
|
1579
1600
|
injectBodyScript(code: string): void;
|
|
1580
1601
|
/**
|
|
1581
1602
|
* Returns CDN URLs for a given npm package path.
|
|
@@ -1606,14 +1627,18 @@ declare class CliPackageManagerService {
|
|
|
1606
1627
|
private readonly storageKey;
|
|
1607
1628
|
QODALIS_COMMAND_PREFIX: string;
|
|
1608
1629
|
private store;
|
|
1630
|
+
/** In-memory cache; `null` means "not yet loaded from storage". */
|
|
1631
|
+
private cache;
|
|
1632
|
+
/** Whether the one-time localStorage migration has been checked. */
|
|
1633
|
+
private migrationDone;
|
|
1609
1634
|
constructor();
|
|
1610
1635
|
/**
|
|
1611
1636
|
* Set the key-value store instance for persistence.
|
|
1612
1637
|
*/
|
|
1613
1638
|
setStore(store: ICliKeyValueStore): void;
|
|
1614
1639
|
/**
|
|
1615
|
-
* Retrieves the list of packages
|
|
1616
|
-
*
|
|
1640
|
+
* Retrieves the list of packages.
|
|
1641
|
+
* Uses an in-memory cache after the first load.
|
|
1617
1642
|
*/
|
|
1618
1643
|
getPackages(): Promise<Package[]>;
|
|
1619
1644
|
/**
|
|
@@ -1656,11 +1681,7 @@ declare class CliInputReader implements ICliInputReader {
|
|
|
1656
1681
|
readSelect(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1657
1682
|
readSelectInline(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1658
1683
|
readMultiSelect(prompt: string, options: CliMultiSelectOption[], selectOptions?: CliMultiSelectOptions): Promise<string[] | null>;
|
|
1659
|
-
readNumber(prompt: string, options?:
|
|
1660
|
-
min?: number;
|
|
1661
|
-
max?: number;
|
|
1662
|
-
default?: number;
|
|
1663
|
-
}): Promise<number | null>;
|
|
1684
|
+
readNumber(prompt: string, options?: CliNumberOptions): Promise<number | null>;
|
|
1664
1685
|
readDate(prompt: string, options?: CliDateOptions): Promise<string | null>;
|
|
1665
1686
|
readFile(prompt: string, options?: CliFilePickerOptions): Promise<CliFileResult[] | null>;
|
|
1666
1687
|
}
|
|
@@ -1717,6 +1738,13 @@ declare class CapturingTerminalWriter implements ICliTerminalWriter {
|
|
|
1717
1738
|
columns?: number;
|
|
1718
1739
|
padding?: number;
|
|
1719
1740
|
}): void;
|
|
1741
|
+
writeLink(text: string, url: string): void;
|
|
1742
|
+
writeBox(content: string | string[], options?: {
|
|
1743
|
+
title?: string;
|
|
1744
|
+
borderColor?: CliForegroundColor;
|
|
1745
|
+
padding?: number;
|
|
1746
|
+
}): void;
|
|
1747
|
+
writeIndented(text: string, level?: number): void;
|
|
1720
1748
|
/**
|
|
1721
1749
|
* Returns true if any stdout-equivalent output was captured.
|
|
1722
1750
|
*/
|
|
@@ -1871,6 +1899,11 @@ declare class CliStateStore implements ICliStateStore {
|
|
|
1871
1899
|
reset(): void;
|
|
1872
1900
|
persist(): Promise<void>;
|
|
1873
1901
|
initialize(): Promise<void>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Complete the BehaviorSubject so all subscribers are notified
|
|
1904
|
+
* and no further emissions occur. Called during engine teardown.
|
|
1905
|
+
*/
|
|
1906
|
+
dispose(): void;
|
|
1874
1907
|
}
|
|
1875
1908
|
|
|
1876
1909
|
interface CliEngineOptions extends CliOptions {
|
|
@@ -1974,9 +2007,12 @@ declare class CliEngine {
|
|
|
1974
2007
|
* so intermediate resize events cannot leave stale artefacts.
|
|
1975
2008
|
*/
|
|
1976
2009
|
private deferResizeFix;
|
|
2010
|
+
/** Maximum time (ms) to wait for container layout before rejecting. */
|
|
2011
|
+
private static readonly LAYOUT_TIMEOUT_MS;
|
|
1977
2012
|
/**
|
|
1978
2013
|
* Wait until the container element has non-zero dimensions.
|
|
1979
2014
|
* xterm.js requires the host element to be laid out before open() is called.
|
|
2015
|
+
* Rejects after {@link LAYOUT_TIMEOUT_MS} if the container stays hidden.
|
|
1980
2016
|
*/
|
|
1981
2017
|
private waitForLayout;
|
|
1982
2018
|
}
|
|
@@ -1984,12 +2020,13 @@ declare class CliEngine {
|
|
|
1984
2020
|
declare class CliServerConnection {
|
|
1985
2021
|
private readonly _config;
|
|
1986
2022
|
private readonly _backgroundServices?;
|
|
2023
|
+
private readonly _logger?;
|
|
1987
2024
|
private _connected;
|
|
1988
2025
|
private _commands;
|
|
1989
2026
|
private _capabilities;
|
|
1990
2027
|
private _eventSocket;
|
|
1991
2028
|
onDisconnect?: () => void;
|
|
1992
|
-
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined);
|
|
2029
|
+
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined);
|
|
1993
2030
|
get config(): CliServerConfig;
|
|
1994
2031
|
get connected(): boolean;
|
|
1995
2032
|
get commands(): CliServerCommandDescriptor[];
|
|
@@ -2065,6 +2102,7 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
2065
2102
|
private readonly registry;
|
|
2066
2103
|
readonly connections: Map<string, CliServerConnection>;
|
|
2067
2104
|
private _logger?;
|
|
2105
|
+
private _cliLogger?;
|
|
2068
2106
|
private _defaultServer;
|
|
2069
2107
|
private _backgroundServices?;
|
|
2070
2108
|
constructor(registry: ICliCommandProcessorRegistry);
|
|
@@ -2073,7 +2111,7 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
2073
2111
|
connectAll(servers: CliServerConfig[], logger?: {
|
|
2074
2112
|
warn(msg: string): void;
|
|
2075
2113
|
info(msg: string): void;
|
|
2076
|
-
}, backgroundServices?: ICliBackgroundServiceRegistry): Promise<void>;
|
|
2114
|
+
}, backgroundServices?: ICliBackgroundServiceRegistry, cliLogger?: ICliLogger): Promise<void>;
|
|
2077
2115
|
reconnect(name: string): Promise<{
|
|
2078
2116
|
success: boolean;
|
|
2079
2117
|
commandCount: number;
|
package/public-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _qodalis_cli_core from '@qodalis/cli-core';
|
|
2
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, ICliGlobalParameterHandler, CliProvider, CliForegroundColor, CliBackgroundColor, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegistry, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliIcon } from '@qodalis/cli-core';
|
|
2
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, ICliGlobalParameterHandler, CliProvider, CliForegroundColor, CliBackgroundColor, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegistry, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliIcon } from '@qodalis/cli-core';
|
|
3
3
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
4
4
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
5
5
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
@@ -140,7 +140,7 @@ declare const CliBackgroundServiceRegistry_TOKEN = "cli-background-service-regis
|
|
|
140
140
|
*/
|
|
141
141
|
declare const CliPackageManagerService_TOKEN = "cli-package-manager-service";
|
|
142
142
|
|
|
143
|
-
declare const LIBRARY_VERSION = "2.0.0-beta.
|
|
143
|
+
declare const LIBRARY_VERSION = "2.0.0-beta.9";
|
|
144
144
|
declare const API_VERSION = 2;
|
|
145
145
|
|
|
146
146
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -984,6 +984,11 @@ declare class CliStateStoreManager implements ICliStateStoreManager {
|
|
|
984
984
|
name: string;
|
|
985
985
|
state: Record<string, any>;
|
|
986
986
|
}[];
|
|
987
|
+
/**
|
|
988
|
+
* Dispose all stores (completes their BehaviorSubjects).
|
|
989
|
+
* Called during engine teardown.
|
|
990
|
+
*/
|
|
991
|
+
dispose(): void;
|
|
987
992
|
}
|
|
988
993
|
|
|
989
994
|
/**
|
|
@@ -1191,8 +1196,10 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1191
1196
|
readonly commandHistory: CliCommandHistory;
|
|
1192
1197
|
readonly filePickerProvider: ICliFilePickerProvider;
|
|
1193
1198
|
private readonly modeStack;
|
|
1199
|
+
private readonly stateStoreManager;
|
|
1194
1200
|
private readonly managedTimers;
|
|
1195
1201
|
private resizeDisposable;
|
|
1202
|
+
private windowKeydownListener?;
|
|
1196
1203
|
constructor(deps: CliExecutionContextDeps, terminal: Terminal, executor: ICliCommandExecutorService, cliOptions?: CliOptions);
|
|
1197
1204
|
writeToTerminal(text: string): void;
|
|
1198
1205
|
getTerminalRows(): number;
|
|
@@ -1258,7 +1265,6 @@ declare class CliCommandExecutor implements ICliCommandExecutorService {
|
|
|
1258
1265
|
protected readonly registry: ICliCommandProcessorRegistry;
|
|
1259
1266
|
private commandParser;
|
|
1260
1267
|
private globalParameters;
|
|
1261
|
-
private lastCapturingWriter?;
|
|
1262
1268
|
constructor(registry: ICliCommandProcessorRegistry);
|
|
1263
1269
|
registerGlobalParameter(handler: ICliGlobalParameterHandler): void;
|
|
1264
1270
|
getGlobalParameters(): ICliCommandParameterDescriptor[];
|
|
@@ -1405,6 +1411,13 @@ declare class CliTerminalWriter implements ICliTerminalWriter {
|
|
|
1405
1411
|
columns?: number;
|
|
1406
1412
|
padding?: number;
|
|
1407
1413
|
}): void;
|
|
1414
|
+
writeLink(text: string, url: string): void;
|
|
1415
|
+
writeBox(content: string | string[], options?: {
|
|
1416
|
+
title?: string;
|
|
1417
|
+
borderColor?: CliForegroundColor;
|
|
1418
|
+
padding?: number;
|
|
1419
|
+
}): void;
|
|
1420
|
+
writeIndented(text: string, level?: number): void;
|
|
1408
1421
|
writeTable(headers: string[], rows: string[][]): void;
|
|
1409
1422
|
}
|
|
1410
1423
|
|
|
@@ -1506,6 +1519,7 @@ declare class CliBoot {
|
|
|
1506
1519
|
private initializing;
|
|
1507
1520
|
private readonly moduleRegistry;
|
|
1508
1521
|
private readonly bootedModules;
|
|
1522
|
+
private readonly initializedProcessors;
|
|
1509
1523
|
constructor(registry: ICliCommandProcessorRegistry, services: ICliServiceProvider);
|
|
1510
1524
|
/**
|
|
1511
1525
|
* Get the module registry for external access.
|
|
@@ -1576,6 +1590,13 @@ declare class ScriptLoaderService {
|
|
|
1576
1590
|
content?: string;
|
|
1577
1591
|
error?: any;
|
|
1578
1592
|
}>;
|
|
1593
|
+
/**
|
|
1594
|
+
* Inject an inline script into the page.
|
|
1595
|
+
*
|
|
1596
|
+
* **Security:** This runs `code` in the host page context with full
|
|
1597
|
+
* DOM access. Only call with trusted content (e.g. verified UMD bundles
|
|
1598
|
+
* loaded via the package manager). Never pass user-supplied strings.
|
|
1599
|
+
*/
|
|
1579
1600
|
injectBodyScript(code: string): void;
|
|
1580
1601
|
/**
|
|
1581
1602
|
* Returns CDN URLs for a given npm package path.
|
|
@@ -1606,14 +1627,18 @@ declare class CliPackageManagerService {
|
|
|
1606
1627
|
private readonly storageKey;
|
|
1607
1628
|
QODALIS_COMMAND_PREFIX: string;
|
|
1608
1629
|
private store;
|
|
1630
|
+
/** In-memory cache; `null` means "not yet loaded from storage". */
|
|
1631
|
+
private cache;
|
|
1632
|
+
/** Whether the one-time localStorage migration has been checked. */
|
|
1633
|
+
private migrationDone;
|
|
1609
1634
|
constructor();
|
|
1610
1635
|
/**
|
|
1611
1636
|
* Set the key-value store instance for persistence.
|
|
1612
1637
|
*/
|
|
1613
1638
|
setStore(store: ICliKeyValueStore): void;
|
|
1614
1639
|
/**
|
|
1615
|
-
* Retrieves the list of packages
|
|
1616
|
-
*
|
|
1640
|
+
* Retrieves the list of packages.
|
|
1641
|
+
* Uses an in-memory cache after the first load.
|
|
1617
1642
|
*/
|
|
1618
1643
|
getPackages(): Promise<Package[]>;
|
|
1619
1644
|
/**
|
|
@@ -1656,11 +1681,7 @@ declare class CliInputReader implements ICliInputReader {
|
|
|
1656
1681
|
readSelect(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1657
1682
|
readSelectInline(prompt: string, options: CliSelectOption[], selectOptions?: CliSelectOptions): Promise<string | null>;
|
|
1658
1683
|
readMultiSelect(prompt: string, options: CliMultiSelectOption[], selectOptions?: CliMultiSelectOptions): Promise<string[] | null>;
|
|
1659
|
-
readNumber(prompt: string, options?:
|
|
1660
|
-
min?: number;
|
|
1661
|
-
max?: number;
|
|
1662
|
-
default?: number;
|
|
1663
|
-
}): Promise<number | null>;
|
|
1684
|
+
readNumber(prompt: string, options?: CliNumberOptions): Promise<number | null>;
|
|
1664
1685
|
readDate(prompt: string, options?: CliDateOptions): Promise<string | null>;
|
|
1665
1686
|
readFile(prompt: string, options?: CliFilePickerOptions): Promise<CliFileResult[] | null>;
|
|
1666
1687
|
}
|
|
@@ -1717,6 +1738,13 @@ declare class CapturingTerminalWriter implements ICliTerminalWriter {
|
|
|
1717
1738
|
columns?: number;
|
|
1718
1739
|
padding?: number;
|
|
1719
1740
|
}): void;
|
|
1741
|
+
writeLink(text: string, url: string): void;
|
|
1742
|
+
writeBox(content: string | string[], options?: {
|
|
1743
|
+
title?: string;
|
|
1744
|
+
borderColor?: CliForegroundColor;
|
|
1745
|
+
padding?: number;
|
|
1746
|
+
}): void;
|
|
1747
|
+
writeIndented(text: string, level?: number): void;
|
|
1720
1748
|
/**
|
|
1721
1749
|
* Returns true if any stdout-equivalent output was captured.
|
|
1722
1750
|
*/
|
|
@@ -1871,6 +1899,11 @@ declare class CliStateStore implements ICliStateStore {
|
|
|
1871
1899
|
reset(): void;
|
|
1872
1900
|
persist(): Promise<void>;
|
|
1873
1901
|
initialize(): Promise<void>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Complete the BehaviorSubject so all subscribers are notified
|
|
1904
|
+
* and no further emissions occur. Called during engine teardown.
|
|
1905
|
+
*/
|
|
1906
|
+
dispose(): void;
|
|
1874
1907
|
}
|
|
1875
1908
|
|
|
1876
1909
|
interface CliEngineOptions extends CliOptions {
|
|
@@ -1974,9 +2007,12 @@ declare class CliEngine {
|
|
|
1974
2007
|
* so intermediate resize events cannot leave stale artefacts.
|
|
1975
2008
|
*/
|
|
1976
2009
|
private deferResizeFix;
|
|
2010
|
+
/** Maximum time (ms) to wait for container layout before rejecting. */
|
|
2011
|
+
private static readonly LAYOUT_TIMEOUT_MS;
|
|
1977
2012
|
/**
|
|
1978
2013
|
* Wait until the container element has non-zero dimensions.
|
|
1979
2014
|
* xterm.js requires the host element to be laid out before open() is called.
|
|
2015
|
+
* Rejects after {@link LAYOUT_TIMEOUT_MS} if the container stays hidden.
|
|
1980
2016
|
*/
|
|
1981
2017
|
private waitForLayout;
|
|
1982
2018
|
}
|
|
@@ -1984,12 +2020,13 @@ declare class CliEngine {
|
|
|
1984
2020
|
declare class CliServerConnection {
|
|
1985
2021
|
private readonly _config;
|
|
1986
2022
|
private readonly _backgroundServices?;
|
|
2023
|
+
private readonly _logger?;
|
|
1987
2024
|
private _connected;
|
|
1988
2025
|
private _commands;
|
|
1989
2026
|
private _capabilities;
|
|
1990
2027
|
private _eventSocket;
|
|
1991
2028
|
onDisconnect?: () => void;
|
|
1992
|
-
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined);
|
|
2029
|
+
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined);
|
|
1993
2030
|
get config(): CliServerConfig;
|
|
1994
2031
|
get connected(): boolean;
|
|
1995
2032
|
get commands(): CliServerCommandDescriptor[];
|
|
@@ -2065,6 +2102,7 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
2065
2102
|
private readonly registry;
|
|
2066
2103
|
readonly connections: Map<string, CliServerConnection>;
|
|
2067
2104
|
private _logger?;
|
|
2105
|
+
private _cliLogger?;
|
|
2068
2106
|
private _defaultServer;
|
|
2069
2107
|
private _backgroundServices?;
|
|
2070
2108
|
constructor(registry: ICliCommandProcessorRegistry);
|
|
@@ -2073,7 +2111,7 @@ declare class CliServerManager implements DefaultServerProvider {
|
|
|
2073
2111
|
connectAll(servers: CliServerConfig[], logger?: {
|
|
2074
2112
|
warn(msg: string): void;
|
|
2075
2113
|
info(msg: string): void;
|
|
2076
|
-
}, backgroundServices?: ICliBackgroundServiceRegistry): Promise<void>;
|
|
2114
|
+
}, backgroundServices?: ICliBackgroundServiceRegistry, cliLogger?: ICliLogger): Promise<void>;
|
|
2077
2115
|
reconnect(name: string): Promise<{
|
|
2078
2116
|
success: boolean;
|
|
2079
2117
|
commandCount: number;
|