feat(workflow): add altenate merge tool and translate workflow node and engine errors across locales

This commit is contained in:
alam00000
2026-04-30 13:16:48 +05:30
parent 0040317e48
commit ef3dab5aeb
74 changed files with 2552 additions and 1077 deletions
+2 -2
View File
@@ -4,6 +4,7 @@ import { pdfSocket } from '../sockets';
import type { PDFData, SocketData, MultiPDFData } from '../types';
import { loadPyMuPDF } from '../../utils/pymupdf-loader.js';
import { loadPdfDocument } from '../../utils/load-pdf-document.js';
import { wfError } from '../errors';
export class JsonToPdfNode extends BaseWorkflowNode {
readonly category = 'Input' as const;
@@ -46,8 +47,7 @@ export class JsonToPdfNode extends BaseWorkflowNode {
async data(
_inputs: Record<string, SocketData[]>
): Promise<Record<string, SocketData>> {
if (this.files.length === 0)
throw new Error('No JSON files uploaded in JSON Input node');
if (this.files.length === 0) throw new Error(wfError('noJsonUploaded'));
const pymupdf = await loadPyMuPDF();
const results: PDFData[] = [];