Tests. Autocomplete. Few Fixes. Mocks for Electrum Service. Template-to-Json parser. Fix global paths. Use IO Dependency injection for logging from cli. Additional commands in CLI.
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
* Simplified to render TUI immediately and let it handle AppService creation.
|
||||
*/
|
||||
|
||||
import { join } from "node:path";
|
||||
import React from "react";
|
||||
import { render, type Instance } from "ink";
|
||||
import { App as AppComponent } from "./tui/App.js";
|
||||
import { getDataDir } from "./utils/paths.js";
|
||||
|
||||
/**
|
||||
* Configuration options for the CLI application.
|
||||
@@ -46,13 +48,14 @@ export class App {
|
||||
* @returns Running App instance
|
||||
*/
|
||||
static async create(config: Partial<AppConfig> = {}): Promise<App> {
|
||||
const dataDir = getDataDir();
|
||||
// Set default configuration
|
||||
const fullConfig: AppConfig = {
|
||||
syncServerUrl: config.syncServerUrl ?? "http://localhost:3000",
|
||||
databasePath: config.databasePath ?? "./",
|
||||
databasePath: config.databasePath ?? dataDir,
|
||||
databaseFilename: config.databaseFilename ?? "xo-wallet.db",
|
||||
invitationStoragePath:
|
||||
config.invitationStoragePath ?? "./xo-invitations.db",
|
||||
config.invitationStoragePath ?? join(dataDir, "xo-invitations.db"),
|
||||
};
|
||||
|
||||
console.log("Full config:", fullConfig);
|
||||
|
||||
Reference in New Issue
Block a user