Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging): Add the new custom process output class and inject it into the default list renderer options #622

Merged
merged 7 commits into from
Oct 1, 2024
10 changes: 5 additions & 5 deletions src/commands/account.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { FREEZE_ADMIN_ACCOUNT } from '../core/constants.mjs'

export class AccountCommand extends BaseCommand {
/**
* @param {{accountManager: AccountManager, logger: Logger, helm: Helm, k8: K8, chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager}} opts
* @param {{accountManager: AccountManager, logger: SoloLogger, helm: Helm, k8: K8, chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager}} opts
* @param {number[][]} [systemAccounts]
*/
constructor (opts, systemAccounts = constants.SYSTEM_ACCOUNTS) {
Expand Down Expand Up @@ -359,21 +359,21 @@ export class AccountCommand extends BaseCommand {
},
{
title: 'get the account info',
task: async (ctx, task) => {
task: async (ctx) => {
ctx.accountInfo = await self.buildAccountInfo(await self.getAccountInfo(ctx), ctx.config.namespace, ctx.config.privateKey)
}
},
{
title: 'update the account',
task: async (ctx, task) => {
task: async (ctx) => {
if (!(await self.updateAccountInfo(ctx))) {
throw new FullstackTestingError(`An error occurred updating account ${ctx.accountInfo.accountId}`)
}
}
},
{
title: 'get the updated account info',
task: async (ctx, task) => {
task: async (ctx) => {
self.accountInfo = await self.buildAccountInfo(await self.getAccountInfo(ctx), ctx.config.namespace, false)
this.logger.showJSON('account info', self.accountInfo)
}
Expand Down Expand Up @@ -430,7 +430,7 @@ export class AccountCommand extends BaseCommand {
},
{
title: 'get the account info',
task: async (ctx, task) => {
task: async (ctx) => {
self.accountInfo = await self.buildAccountInfo(await self.getAccountInfo(ctx), ctx.config.namespace, false)
this.logger.showJSON('account info', self.accountInfo)
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ export class BaseCommand extends ShellRunner {
}

/**
* @param {{logger: Logger, helm: Helm, k8: K8, chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager}} opts
* @param {{logger: SoloLogger, helm: Helm, k8: K8, chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager}} opts
*/
constructor (opts) {
if (!opts || !opts.logger) throw new Error('An instance of core/Logger is required')
if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required')
if (!opts || !opts.helm) throw new Error('An instance of core/Helm is required')
if (!opts || !opts.k8) throw new Error('An instance of core/K8 is required')
if (!opts || !opts.chartManager) throw new Error('An instance of core/ChartManager is required')
Expand Down
4 changes: 2 additions & 2 deletions src/commands/mirror_node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import { getFileContents, getEnvValue } from '../core/helpers.mjs'

export class MirrorNodeCommand extends BaseCommand {
/**
* @param {{accountManager: AccountManager, profileManager: ProfileManager, logger: Logger, helm: Helm, k8: K8,
* hartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager,
* @param {{accountManager: AccountManager, profileManager: ProfileManager, logger: SoloLogger, helm: Helm, k8: K8,
* chartManager: ChartManager, configManager: ConfigManager, depManager: DependencyManager,
* downloader: PackageDownloader}} opts
*/
constructor (opts) {
Expand Down
5 changes: 3 additions & 2 deletions src/commands/network.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ import fs from 'fs'

export class NetworkCommand extends BaseCommand {
/**
* @param {{profileManager: ProfileManager, logger: Logger, helm: Helm, k8: K8, chartManager: ChartManager,
* configManager: ConfigManager, depManager: DependencyManager, downloader: PackageDownloader}} opts
* @param {{profileManager: ProfileManager, logger: SoloLogger, helm: Helm, k8: K8, chartManager: ChartManager,
* configManager: ConfigManager, depManager: DependencyManager, downloader: PackageDownloader, keyManager: KeyManager,
* platformInstaller: PlatformInstaller}} opts
*/
constructor (opts) {
super(opts)
Expand Down
Loading
Loading