Skip to content

Commit

Permalink
fix: comment out injectable code in BaseCommand
Browse files Browse the repository at this point in the history
Signed-off-by: Ivo Yankov <[email protected]>
  • Loading branch information
Ivo-Yankov committed Nov 8, 2024
1 parent c74f2e7 commit e049a36
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/commands/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ import { MissingArgumentError } from '../core/errors.ts'
import { ShellRunner } from '../core/shell_runner.ts'
import type { ChartManager, ConfigManager, Helm, K8, DependencyManager, LeaseManager } from '../core/index.ts'
import type { CommandFlag, Opts } from '../types/index.ts'
import { injectable } from 'inversify'
import { type LocalConfig } from './../core/config/LocalConfig.ts'

import { getContainer } from '../inject.config.ts'
import { INJECTABLES } from '../types/injectables.ts'
import getDecorators from 'inversify-inject-decorators'
const { lazyInject } = getDecorators.default(getContainer(), false)

@injectable()
// import { injectable } from 'inversify'
// import { type LocalConfig } from './../core/config/LocalConfig.ts'
// import { getContainer } from '../inject.config.ts'
// import { INJECTABLES } from '../types/injectables.ts'
// import getDecorators from 'inversify-inject-decorators'
// const { lazyInject } = getDecorators.default(getContainer(), false)

// @injectable()
export class BaseCommand extends ShellRunner {
protected readonly helm: Helm
protected readonly k8: K8
Expand All @@ -38,8 +37,8 @@ export class BaseCommand extends ShellRunner {
protected readonly leaseManager: LeaseManager
protected readonly _configMaps = new Map<string, any>()

@lazyInject(INJECTABLES.LocalConfig)
protected readonly localConfig: LocalConfig
// @lazyInject(INJECTABLES.LocalConfig)
// protected readonly localConfig: LocalConfig

constructor (opts: Opts) {
if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required')
Expand All @@ -60,7 +59,7 @@ export class BaseCommand extends ShellRunner {

// This is a workaround to get the localConfig injected.
// It should be removed once we find a proper solution or when we inject all dependencies
this.localConfig = BaseCommand.prototype.localConfig
// this.localConfig = BaseCommand.prototype.localConfig
}

async prepareChartPath (chartDir: string, chartRepo: string, chartReleaseName: string) {
Expand Down

0 comments on commit e049a36

Please sign in to comment.