mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
22 lines
609 B
TypeScript
22 lines
609 B
TypeScript
|
|
import path from 'path';
|
||
|
|
import main from './main';
|
||
|
|
|
||
|
|
async function processFile(baseFilePath: string, compareFilename: string) {
|
||
|
|
await main(baseFilePath, compareFilename);
|
||
|
|
}
|
||
|
|
|
||
|
|
const args = process.argv.slice(-1);
|
||
|
|
|
||
|
|
if (args.length !== 1) {
|
||
|
|
console.log(process.argv, args);
|
||
|
|
console.error('Usage: bun file.ts <compareFilename>');
|
||
|
|
process.exit(1);
|
||
|
|
}
|
||
|
|
|
||
|
|
const languagesDir = './client/src/localization/languages';
|
||
|
|
const baseFilePath = path.resolve(languagesDir, 'Eng.ts');
|
||
|
|
|
||
|
|
const compareFilename = path.resolve(languagesDir, `${args[0]}.ts`);
|
||
|
|
|
||
|
|
processFile(baseFilePath, compareFilename).catch(console.error);
|