mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 16:41:59 +00:00
16 lines
749 B
TypeScript
16 lines
749 B
TypeScript
import { Inject, Injectable } from '@nestjs/common';
|
|
import { ChildProcessWithoutNullStreams, spawn, SpawnOptionsWithoutStdio } from 'node:child_process';
|
|
import { ILoggerRepository } from 'src/interfaces/logger.interface';
|
|
import { IProcessRepository } from 'src/interfaces/process.interface';
|
|
import { StorageRepository } from 'src/repositories/storage.repository';
|
|
|
|
@Injectable()
|
|
export class ProcessRepository implements IProcessRepository {
|
|
constructor(@Inject(ILoggerRepository) private logger: ILoggerRepository) {
|
|
this.logger.setContext(StorageRepository.name);
|
|
}
|
|
|
|
spawn(command: string, args: readonly string[], options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams {
|
|
return spawn(command, args, options);
|
|
}
|
|
}
|