Skip to content

Commit 208d29f

Browse files
committed
Comment out unused imports and code
1 parent d280e95 commit 208d29f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/app.service.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { Injectable } from '@nestjs/common';
22
import { ModuleRef } from '@nestjs/core';
33
import { AbstractService } from './_common/abstracts/abstract.service';
44
import { PackageJson } from 'types-package-json';
5-
import { readFileSync } from 'node:fs';
6-
import { pick } from 'radash';
5+
//import { readFileSync } from 'node:fs';
6+
//import { pick } from 'radash';
77

88
@Injectable()
99
export class AppService extends AbstractService {
1010
protected package: Partial<PackageJson>;
1111

1212
public constructor(protected moduleRef: ModuleRef) {
1313
super({ moduleRef });
14-
this.package = JSON.parse(readFileSync('package.json', 'utf-8'));
14+
//this.package = JSON.parse(readFileSync('package.json', 'utf-8'));
1515
}
1616

17-
public getInfo(): Partial<PackageJson> {
18-
return pick(this.package, ['name', 'version']);
19-
}
17+
// public getInfo(): Partial<PackageJson> {
18+
// return pick(this.package, ['name', 'version']);
19+
// }
2020
}

src/backend-runner/_executors/dump-package-config.executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class DumpPackageConfigExecutor implements ExecutorInterface {
88
return {
99
status: 0,
1010
jobId: job.id,
11-
data: [this.service.packageJson],
11+
data: [/*this.service.packageJson*/],
1212
};
1313
}
1414
}

src/backend-runner/backend-runner.service.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { ActionType } from './_enum/action-type.enum';
1010
import { ExecutorConfigInterface } from '~/_common/interfaces/executor-config.interface';
1111
import Redis from 'ioredis';
1212
import { DumpPackageConfigExecutor } from './_executors/dump-package-config.executor';
13-
import { PackageJson } from 'types-package-json';
14-
import { readFileSync } from 'node:fs';
13+
//import { PackageJson } from 'types-package-json';
14+
//import { readFileSync } from 'node:fs';
1515

1616
@Injectable()
1717
export class BackendRunnerService implements OnApplicationBootstrap, OnModuleInit {
18-
protected _package: Partial<PackageJson>;
18+
// protected _package: Partial<PackageJson>;
1919
private readonly _logger = new Logger(BackendRunnerService.name);
2020

2121
protected executors: Map<string, ExecutorInterface> = new Map<string, ExecutorInterface>();
@@ -28,9 +28,9 @@ export class BackendRunnerService implements OnApplicationBootstrap, OnModuleIni
2828
return this._logger;
2929
}
3030

31-
public get packageJson(): Partial<PackageJson> {
32-
return this._package;
33-
}
31+
//public get packageJson(): Partial<PackageJson> {
32+
// return this._package;
33+
//}
3434

3535
public get backendExecutorConfig(): ExecutorConfigInterface {
3636
return this._config.get<ExecutorConfigInterface>('application.backendExecutorConfig');
@@ -41,7 +41,7 @@ export class BackendRunnerService implements OnApplicationBootstrap, OnModuleIni
4141
private readonly _backendsConfig: BackendConfigService,
4242
@InjectRedis() private readonly redis: Redis,
4343
) {
44-
this._package = JSON.parse(readFileSync('package.json', 'utf-8'));
44+
// this._package = JSON.parse(readFileSync('package.json', 'utf-8'));
4545
}
4646

4747
public async onModuleInit() {

0 commit comments

Comments
 (0)