Run yarn dedupe and upgrade TS (#13853)

Upgrading TS to the latest version, and cleaning up packages with yarn
dedupe
This commit is contained in:
Félix Malfait
2025-08-12 15:18:59 +02:00
committed by GitHub
parent 62352901ba
commit 3c0f3fd2ae
17 changed files with 330 additions and 4909 deletions
@@ -3,7 +3,6 @@ import { Injectable } from '@nestjs/common';
import DOMPurify from 'dompurify';
import FileType from 'file-type';
import { JSDOM } from 'jsdom';
import sharp from 'sharp';
import { v4 } from 'uuid';
@@ -12,8 +11,8 @@ import { type FileFolder } from 'src/engine/core-modules/file/interfaces/file-fo
import { settings } from 'src/engine/constants/settings';
import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service';
import { FileService } from 'src/engine/core-modules/file/services/file.service';
import { getCropSize, getImageBufferFromUrl } from 'src/utils/image';
import { buildFileInfo } from 'src/engine/core-modules/file/utils/build-file-info.utils';
import { getCropSize, getImageBufferFromUrl } from 'src/utils/image';
export type SignedFile = { path: string; token: string };
@@ -60,6 +59,7 @@ export class FileUploadService {
mimeType: string | undefined;
}): Buffer | Uint8Array | string {
if (ext === 'svg' || mimeType === 'image/svg+xml') {
const { JSDOM } = require('jsdom');
const window = new JSDOM('').window;
const purify = DOMPurify(window);
@@ -1,7 +1,6 @@
import { Injectable, Logger } from '@nestjs/common';
import DOMPurify from 'dompurify';
import { JSDOM } from 'jsdom';
import { isDefined, isValidUuid } from 'twenty-shared/utils';
import { z } from 'zod';
@@ -116,6 +115,7 @@ export class SendEmailTool implements Tool {
workspaceId,
);
const { JSDOM } = await import('jsdom');
const window = new JSDOM('').window;
const purify = DOMPurify(window);
const safeBody = purify.sanitize(body || '');