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

This commit is contained in:
alam00000 committed 2026-04-30 13:16:48 +05:30
1 parent 0040317e48
commit ef3dab5aeb
74 files changed
+2552 -1077

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import type { SocketData } from '../types';
import { requirePdfInput, processBatch } from '../types';
import { PDFDocument } from 'pdf-lib';
import * as pdfjsLib from 'pdfjs-dist';
import { wfError } from '../errors';
export class PosterizeNode extends BaseWorkflowNode {
readonly category = 'Organize & Manage' as const;
@@ -57,7 +58,7 @@ export class PosterizeNode extends BaseWorkflowNode {
canvas.height = viewport.height;
const ctx = canvas.getContext('2d');
if (!ctx)
throw new Error(`Failed to get canvas context for page ${i}`);
throw new Error(wfError('failedToGetCanvasContext', { page: i }));
await page.render({ canvasContext: ctx, viewport, canvas }).promise;
const tileW = viewport.width / cols;
@@ -70,7 +71,7 @@ export class PosterizeNode extends BaseWorkflowNode {
tileCanvas.height = tileH;
const tileCtx = tileCanvas.getContext('2d');
if (!tileCtx)
throw new Error('Failed to get tile canvas context');
throw new Error(wfError('posterizeFailedTileCanvas'));
tileCtx.drawImage(
canvas,
c * tileW,