lokalise-file-exchange
Version:
Exchange translation files with Lokalise TMS
41 lines (33 loc) • 1.09 kB
text/typescript
import type { LokaliseApi, QueuedProcess } from "@lokalise/node-api";
import type { LogFunction, LogLevel, LogThreshold } from "kliedz";
import { LokaliseFileExchange } from "../../../lib/services/LokaliseFileExchange.js";
// Public morozov
export class FakeLokaliseFileExchange extends LokaliseFileExchange {
getLogger(): LogFunction {
return this.logger;
}
getApiClient(): LokaliseApi {
return this.apiClient;
}
getLogThreshold(): LogThreshold {
return this.logThreshold;
}
public async withExponentialBackoff<T>(
operation: () => Promise<T>,
): Promise<T> {
return await super.withExponentialBackoff(operation);
}
public async getUpdatedProcess(processId: string): Promise<QueuedProcess> {
return await super.getUpdatedProcess(processId);
}
public async pollProcesses(
processes: QueuedProcess[],
initialWaitTime: number,
maxWaitTime: number,
): Promise<QueuedProcess[]> {
return await super.pollProcesses(processes, initialWaitTime, maxWaitTime);
}
public logMsg(level: LogLevel, ...args: unknown[]): void {
super.logMsg(level, ...args);
}
}