Skip to content

Commit b9d5a70

Browse files
committed
Enhance logging in DumpPackageConfigExecutor to include selected package.json fields
1 parent 6f99be4 commit b9d5a70

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1+
import { pick } from 'radash';
12
import { BackendRunnerService } from '../backend-runner.service';
23
import { ExecutorExecuteResponseInterface, ExecutorInterface } from '../executors.interface';
4+
import { PackageJson } from 'types-package-json';
35

46
export class DumpPackageConfigExecutor implements ExecutorInterface {
57
public constructor(public service: BackendRunnerService) { }
68

79
public async execute({ job }): Promise<ExecutorExecuteResponseInterface> {
8-
return {
9-
status: 0,
10-
jobId: job.id,
11-
data: [this.service.packageJson],
12-
};
10+
this.service.logger.debug('Dump package config: ' + JSON.stringify(pick(this.service.packageJson, [
11+
'name',
12+
'description',
13+
'version',
14+
] as any) as Pick<PackageJson, 'name' | 'description' | 'version'>));
15+
16+
return { status: 0, jobId: job.id, data: [this.service.packageJson] };
1317
}
1418
}

0 commit comments

Comments
 (0)