@qodalis/cli 2.0.0-beta.20 → 2.0.0-beta.21
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 +19 -2
- package/public-api.d.ts +19 -2
- package/public-api.js +23 -6
- package/public-api.js.map +1 -1
- package/public-api.mjs +23 -6
- package/public-api.mjs.map +1 -1
package/public-api.mjs
CHANGED
|
@@ -511,7 +511,7 @@ var CliKeyValueStore_TOKEN = createCliToken("cli-key-value-store");
|
|
|
511
511
|
var SyntaxHighlighterRegistry_TOKEN = createCliToken("syntax-highlighter-registry");
|
|
512
512
|
|
|
513
513
|
// src/lib/version.ts
|
|
514
|
-
var LIBRARY_VERSION = "2.0.0-beta.
|
|
514
|
+
var LIBRARY_VERSION = "2.0.0-beta.21";
|
|
515
515
|
var API_VERSION = 2;
|
|
516
516
|
var ANONYMOUS = "\0anonymous";
|
|
517
517
|
function aliasOwner(context2) {
|
|
@@ -4187,7 +4187,7 @@ function getTerminalOptions(userOptions) {
|
|
|
4187
4187
|
...userOptions ?? {}
|
|
4188
4188
|
};
|
|
4189
4189
|
}
|
|
4190
|
-
function initializeTerminal(container, opts) {
|
|
4190
|
+
function initializeTerminal(container, opts, focus = true) {
|
|
4191
4191
|
const terminal = new Terminal(opts);
|
|
4192
4192
|
const fitAddon = new FitAddon();
|
|
4193
4193
|
terminal.loadAddon(fitAddon);
|
|
@@ -4208,7 +4208,9 @@ function initializeTerminal(container, opts) {
|
|
|
4208
4208
|
container.style.background = opts.theme?.background ?? "#000";
|
|
4209
4209
|
const wheelListener = (e) => e.preventDefault();
|
|
4210
4210
|
container.addEventListener("wheel", wheelListener, { passive: false });
|
|
4211
|
-
|
|
4211
|
+
if (focus) {
|
|
4212
|
+
terminal.focus();
|
|
4213
|
+
}
|
|
4212
4214
|
const dragDropService = new CliDragDropService(container);
|
|
4213
4215
|
return { terminal, fitAddon, serializeAddon, dragDropService, wheelListener };
|
|
4214
4216
|
}
|
|
@@ -22585,6 +22587,9 @@ var CliEngine = class {
|
|
|
22585
22587
|
}
|
|
22586
22588
|
await this.completeBoot(bootLog);
|
|
22587
22589
|
await this.runAfterBootHooks(modules);
|
|
22590
|
+
if (this.options?.welcome === false && !this.options?.snapshot) {
|
|
22591
|
+
this.executionContext.showPrompt();
|
|
22592
|
+
}
|
|
22588
22593
|
if (this.options?.snapshot) {
|
|
22589
22594
|
await this.restoreSnapshot(this.options.snapshot);
|
|
22590
22595
|
}
|
|
@@ -22599,7 +22604,11 @@ var CliEngine = class {
|
|
|
22599
22604
|
this.terminalOptions = getTerminalOptions(
|
|
22600
22605
|
this.options?.terminalOptions
|
|
22601
22606
|
);
|
|
22602
|
-
const setup = initializeTerminal(
|
|
22607
|
+
const setup = initializeTerminal(
|
|
22608
|
+
this.container,
|
|
22609
|
+
this.terminalOptions,
|
|
22610
|
+
this.options?.autoFocus !== false
|
|
22611
|
+
);
|
|
22603
22612
|
this.terminal = setup.terminal;
|
|
22604
22613
|
this.fitAddon = setup.fitAddon;
|
|
22605
22614
|
this.serializeAddon = setup.serializeAddon;
|
|
@@ -22736,13 +22745,21 @@ var CliEngine = class {
|
|
|
22736
22745
|
*/
|
|
22737
22746
|
modulesToBoot() {
|
|
22738
22747
|
const serverModule = createServerModule();
|
|
22739
|
-
|
|
22740
|
-
|
|
22748
|
+
if (!this.showsWelcome) {
|
|
22749
|
+
return [serverModule, ...this.userModules];
|
|
22750
|
+
}
|
|
22751
|
+
const welcome = this.options?.welcome;
|
|
22752
|
+
return [
|
|
22753
|
+
typeof welcome === "object" ? welcomeModule.configure(welcome) : welcomeModule,
|
|
22741
22754
|
serverModule,
|
|
22742
22755
|
...this.userModules,
|
|
22743
22756
|
greetingModule
|
|
22744
22757
|
];
|
|
22745
22758
|
}
|
|
22759
|
+
/** Whether startup shows the welcome banner (which also shows the first prompt). */
|
|
22760
|
+
get showsWelcome() {
|
|
22761
|
+
return !this.options?.snapshot && this.options?.welcome !== false;
|
|
22762
|
+
}
|
|
22746
22763
|
/** 7. Replace the boot report with the terminal and mark the CLI booted. */
|
|
22747
22764
|
async completeBoot(bootLog) {
|
|
22748
22765
|
await bootLog.finish(
|