AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(file-helper): improve the file action step forms (#15684)
Talal Jaber625e0233496a
diff --git a/bun.lock b/bun.lockindex 78b6598a934..100b56c4223 100644--- a/bun.lock+++ b/bun.lock@@ -10394,7 +10394,7 @@},"packages/pieces/core/file-helper": {"name": "@activepieces/piece-file-helper",- "version": "0.1.31",+ "version": "0.2.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/core/file-helper/package.json b/packages/pieces/core/file-helper/package.jsonindex be4af781f87..12acc90c0c2 100644--- a/packages/pieces/core/file-helper/package.json+++ b/packages/pieces/core/file-helper/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-file-helper",- "version": "0.1.31",+ "version": "0.2.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","dependencies": {diff --git a/packages/pieces/core/file-helper/src/i18n/ca.json b/packages/pieces/core/file-helper/src/i18n/ca.jsonindex 05aa20f5195..aa9b9a79db4 100644--- a/packages/pieces/core/file-helper/src/i18n/ca.json+++ b/packages/pieces/core/file-helper/src/i18n/ca.json@@ -1,27 +1,10 @@{- "Files Helper": "Files Helper",- "Read file content and return it in different formats.": "Read file content and return it in different formats.","Read File": "Read File",- "Create file": "Create file","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",+ "Get File Name": "Get File Name","File": "File",- "Output format": "Output format","Content": "Content",- "File name": "File name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -105,7 +88,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/de.json b/packages/pieces/core/file-helper/src/i18n/de.jsonindex f3e17c9d763..cf3fcb37503 100644--- a/packages/pieces/core/file-helper/src/i18n/de.json+++ b/packages/pieces/core/file-helper/src/i18n/de.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "Lesen Sie den Dateiinhalt und geben Sie ihn in verschiedenen Formaten zurück.","Read File": "Datei lesen",- "Create file": "Datei erstellen",+ "Create File": "Datei erstellen","Change File Encoding": "Dateicodierung ändern",- "Check file type": "Dateityp überprüfen",+ "Check File Type": "Dateityp überprüfen","Zip Files": "Zip-Dateien","Unzip File": "Datei entpacken",- "Read a file from the file system": "Eine Datei aus dem Dateisystem lesen",- "Create file from content": "Datei aus Inhalt erstellen",- "Changes the encoding of a file": "Ändert die Kodierung einer Datei",- "Check MIME type of a file and filter based on selected types": "Überprüfen Sie den MIME-Typ einer Datei und Filter basierend auf ausgewählten Typen",- "Create compressed zip file from one or many files": "Komprimierte Zip-Datei aus einer oder mehreren Dateien erstellen",- "Unzip compressed zip file": "Komprimierte Zip-Datei entpacken",+ "Get File Name": "Dateiname abrufen","File": "Datei",- "Output format": "Ausgabeformat",+ "Output Format": "Ausgabeformat","Content": "Inhalt",- "File name": "Dateiname",+ "File Name": "Dateiname","Encoding": "Encodierung",- "Source file": "Quelldatei",- "Source encoding": "Quellcodierung",- "Output file name": "Dateiname ausgeben",- "Output encoding": "Ausgabekodierung",- "File to Check": "Zu überprüfende Datei",- "Select MIME Types": "MIME-Typen auswählen",+ "Source File": "Quelldatei",+ "Source Encoding": "Quellcodierung",+ "Output File Name": "Dateiname ausgeben",+ "Output Encoding": "Ausgabekodierung","Files": "Dateien",- "Name of zipped file": "Name der Zip-Datei",- "Use password": "Passwort verwenden",- "Password options": "Passwort-Optionen",+ "Use Password": "Passwort verwenden",+ "Password Options": "Passwort-Optionen","Zip File": "Zip-Datei",- "Max Results": "Maximale Ergebnisse",- "The output format": "Das Ausgabeformat",- "Choose one or more MIME types to check against the file.": "Wählen Sie einen oder mehrere MIME-Typen, um die Datei zu überprüfen.",- "Enable password protection for the zip file": "Passwortschutz für die Zip-Datei aktivieren",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nSendet einen Fehler, wenn die Zip-Datei mehr als erwartet enthält.\n- Dies ist ein sicherer Test, wenn Sie mit nicht vertrauenswürdigen Zip-Dateien arbeiten.\n- Dieses Feld ausschließen oder auf 0 setzen, um diese Überprüfung zu überspringen.\n",- "Enable if the zip file is password protected": "Aktivieren, wenn die Zip-Datei passwortgeschützt ist","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "FreeARC-Archiv","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG-Transport-Stream",- "Opus Audio in Ogg Container": "Opus Audio im Ogg Container",- "Get File Name": "Dateiname abrufen",- "Get the name of a file": "Den Dateinamen abrufen"+ "Opus Audio in Ogg Container": "Opus Audio im Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/es.json b/packages/pieces/core/file-helper/src/i18n/es.jsonindex 9971da67089..3f053849fbc 100644--- a/packages/pieces/core/file-helper/src/i18n/es.json+++ b/packages/pieces/core/file-helper/src/i18n/es.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "Leer contenido de archivo y devolverlo en diferentes formatos.","Read File": "Leer archivo",- "Create file": "Crear archivo",+ "Create File": "Crear archivo","Change File Encoding": "Cambiar codificación de archivo",- "Check file type": "Comprobar tipo de archivo",+ "Check File Type": "Comprobar tipo de archivo","Zip Files": "Archivos Zip","Unzip File": "Descomprimir archivo",- "Read a file from the file system": "Leer un archivo del sistema de archivos",- "Create file from content": "Crear archivo a partir de contenido",- "Changes the encoding of a file": "Cambia la codificación de un archivo",- "Check MIME type of a file and filter based on selected types": "Compruebe el tipo MIME de un archivo y filtro basado en los tipos seleccionados",- "Create compressed zip file from one or many files": "Crear archivo comprimido a partir de uno o muchos archivos",- "Unzip compressed zip file": "Archivo comprimido descomprimido",+ "Get File Name": "Obtener nombre de archivo","File": "Archivo",- "Output format": "Formato de salida",+ "Output Format": "Formato de salida","Content": "Contenido",- "File name": "Nombre del archivo",+ "File Name": "Nombre del archivo","Encoding": "Codificación",- "Source file": "Archivo fuente",- "Source encoding": "Codificación de origen",- "Output file name": "Nombre del archivo de salida",- "Output encoding": "Codificación de salida",- "File to Check": "Archivo a revisar",- "Select MIME Types": "Seleccionar tipos MIME",+ "Source File": "Archivo fuente",+ "Source Encoding": "Codificación de origen",+ "Output File Name": "Nombre del archivo de salida",+ "Output Encoding": "Codificación de salida","Files": "Archivos",- "Name of zipped file": "Nombre del archivo comprimido",- "Use password": "Usar contraseña",- "Password options": "Opciones de contraseña",+ "Use Password": "Usar contraseña",+ "Password Options": "Opciones de contraseña","Zip File": "Archivo Zip",- "Max Results": "Resultados máximos",- "The output format": "El formato de salida",- "Choose one or more MIME types to check against the file.": "Elija uno o más tipos MIME para comprobar contra el archivo.",- "Enable password protection for the zip file": "Activar la protección de contraseña para el archivo zip",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n",- "Enable if the zip file is password protected": "Activar si el archivo zip está protegido por contraseña","Text": "Texto","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "Archivo FreeARC","CD Audio": "Audio de CD","MPEG Transport Stream": "Flujo de transporte MPEG",- "Opus Audio in Ogg Container": "Audio Opus en contenedor Ogg",- "Get File Name": "Obtener nombre de archivo",- "Get the name of a file": "Obtener el nombre de un archivo"+ "Opus Audio in Ogg Container": "Audio Opus en contenedor Ogg"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/fr.json b/packages/pieces/core/file-helper/src/i18n/fr.jsonindex 6fde983ef77..2ed7726ba7b 100644--- a/packages/pieces/core/file-helper/src/i18n/fr.json+++ b/packages/pieces/core/file-helper/src/i18n/fr.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "Lire le contenu du fichier et le renvoyer dans différents formats.","Read File": "Lire le fichier",- "Create file": "Créer un fichier",+ "Create File": "Créer un fichier","Change File Encoding": "Modifier l'encodage du fichier",- "Check file type": "Vérifier le type de fichier",+ "Check File Type": "Vérifier le type de fichier","Zip Files": "Fichiers Zip","Unzip File": "Décompresser le fichier",- "Read a file from the file system": "Lire un fichier depuis le système de fichiers",- "Create file from content": "Créer un fichier à partir du contenu",- "Changes the encoding of a file": "Modifie l'encodage d'un fichier",- "Check MIME type of a file and filter based on selected types": "Vérifier le type MIME d'un fichier et le filtre basé sur les types sélectionnés",- "Create compressed zip file from one or many files": "Créer un fichier zip compressé à partir d'un ou plusieurs fichiers",- "Unzip compressed zip file": "Décompresser le fichier zip compressé",+ "Get File Name": "Obtenir le nom du fichier","File": "Ficher",- "Output format": "Format de sortie",+ "Output Format": "Format de sortie","Content": "Contenus",- "File name": "Nom du fichier",+ "File Name": "Nom du fichier","Encoding": "Encodage",- "Source file": "Fichier source",- "Source encoding": "Encodage source",- "Output file name": "Nom du fichier de sortie",- "Output encoding": "Encodage de sortie",- "File to Check": "Fichier à vérifier",- "Select MIME Types": "Sélectionnez les types MIME",+ "Source File": "Fichier source",+ "Source Encoding": "Encodage source",+ "Output File Name": "Nom du fichier de sortie",+ "Output Encoding": "Encodage de sortie","Files": "Fichiers",- "Name of zipped file": "Nom du fichier compressé",- "Use password": "Utiliser le mot de passe",- "Password options": "Options de mot de passe",+ "Use Password": "Utiliser le mot de passe",+ "Password Options": "Options de mot de passe","Zip File": "Fichier Zip",- "Max Results": "Nombre maximum de résultats",- "The output format": "Le format de sortie",- "Choose one or more MIME types to check against the file.": "Choisissez un ou plusieurs types MIME à vérifier par rapport au fichier.",- "Enable password protection for the zip file": "Activer la protection par mot de passe pour le fichier zip",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n",- "Enable if the zip file is password protected": "Activer si le fichier zip est protégé par mot de passe","Text": "Texte du texte","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "Archive FreeARC","CD Audio": "CD audio","MPEG Transport Stream": "Flux de Transport MPEG",- "Opus Audio in Ogg Container": "Opus Audio dans Ogg Container",- "Get File Name": "Obtenir le nom du fichier",- "Get the name of a file": "Récupère le nom d'un fichier"+ "Opus Audio in Ogg Container": "Opus Audio dans Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/hi.json b/packages/pieces/core/file-helper/src/i18n/hi.jsonindex 05aa20f5195..aa9b9a79db4 100644--- a/packages/pieces/core/file-helper/src/i18n/hi.json+++ b/packages/pieces/core/file-helper/src/i18n/hi.json@@ -1,27 +1,10 @@{- "Files Helper": "Files Helper",- "Read file content and return it in different formats.": "Read file content and return it in different formats.","Read File": "Read File",- "Create file": "Create file","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",+ "Get File Name": "Get File Name","File": "File",- "Output format": "Output format","Content": "Content",- "File name": "File name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -105,7 +88,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/id.json b/packages/pieces/core/file-helper/src/i18n/id.jsonindex 05aa20f5195..aa9b9a79db4 100644--- a/packages/pieces/core/file-helper/src/i18n/id.json+++ b/packages/pieces/core/file-helper/src/i18n/id.json@@ -1,27 +1,10 @@{- "Files Helper": "Files Helper",- "Read file content and return it in different formats.": "Read file content and return it in different formats.","Read File": "Read File",- "Create file": "Create file","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",+ "Get File Name": "Get File Name","File": "File",- "Output format": "Output format","Content": "Content",- "File name": "File name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -105,7 +88,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/ja.json b/packages/pieces/core/file-helper/src/i18n/ja.jsonindex 3801ab90124..88a95638564 100644--- a/packages/pieces/core/file-helper/src/i18n/ja.json+++ b/packages/pieces/core/file-helper/src/i18n/ja.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "ファイルの内容を読み込み、さまざまな形式で返します。","Read File": "ファイルの読み取り",- "Create file": "ファイルを作成",+ "Create File": "ファイルを作成","Change File Encoding": "ファイルエンコーディングを変更",- "Check file type": "ファイルの種類を確認",+ "Check File Type": "ファイルの種類を確認","Zip Files": "Zipファイル","Unzip File": "ファイルを展開する",- "Read a file from the file system": "ファイルシステムからファイルを読み込みます",- "Create file from content": "コンテンツからファイルを作成",- "Changes the encoding of a file": "ファイルのエンコーディングを変更します",- "Check MIME type of a file and filter based on selected types": "選択したタイプに基づいてファイルのMIMEタイプとフィルタをチェックします",- "Create compressed zip file from one or many files": "1つまたは複数のファイルから圧縮されたzipファイルを作成します",- "Unzip compressed zip file": "圧縮されたzipファイルを解凍する",+ "Get File Name": "ファイル名を取得","File": "ファイル",- "Output format": "出力フォーマット",+ "Output Format": "出力フォーマット","Content": "コンテンツ",- "File name": "ファイル名",+ "File Name": "ファイル名","Encoding": "エンコード",- "Source file": "ソースファイル",- "Source encoding": "ソースのエンコーディング",- "Output file name": "出力ファイル名",- "Output encoding": "出力エンコーディング",- "File to Check": "チェックするファイル",- "Select MIME Types": "MIMEタイプの選択",+ "Source File": "ソースファイル",+ "Source Encoding": "ソースのエンコーディング",+ "Output File Name": "出力ファイル名",+ "Output Encoding": "出力エンコーディング","Files": "ファイル",- "Name of zipped file": "zip形式のファイル名",- "Use password": "パスワードを使用",- "Password options": "パスワードオプション",+ "Use Password": "パスワードを使用",+ "Password Options": "パスワードオプション","Zip File": "Zipファイル",- "Max Results": "最大結果",- "The output format": "出力フォーマット",- "Choose one or more MIME types to check against the file.": "ファイルをチェックするために 1 つ以上の MIME タイプを選択してください。",- "Enable password protection for the zip file": "ZIP ファイルのパスワード保護を有効にする",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n",- "Enable if the zip file is password protected": "ZIP ファイルがパスワードで保護されている場合は有効にする","Text": "テキスト","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "FreeARCアーカイブ","CD Audio": "CD オーディオ","MPEG Transport Stream": "MPEG転送ストリーム",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "ファイル名を取得",- "Get the name of a file": "ファイル名を取得する"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/nl.json b/packages/pieces/core/file-helper/src/i18n/nl.jsonindex 6f91e2abd47..bdb4adc3b87 100644--- a/packages/pieces/core/file-helper/src/i18n/nl.json+++ b/packages/pieces/core/file-helper/src/i18n/nl.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "Lees de bestandsinhoud en geef deze in verschillende formaten terug.","Read File": "Bestand lezen",- "Create file": "Bestand aanmaken",+ "Create File": "Bestand aanmaken","Change File Encoding": "Bestandscodering wijzigen",- "Check file type": "Controleer bestandstype",+ "Check File Type": "Controleer bestandstype","Zip Files": "Zip bestanden","Unzip File": "Uitpakken bestand",- "Read a file from the file system": "Lees een bestand van het bestandssysteem",- "Create file from content": "Maak bestand van inhoud",- "Changes the encoding of a file": "Verandert de codering van een bestand",- "Check MIME type of a file and filter based on selected types": "Controleer MIME type van een bestand en filter op basis van geselecteerde types",- "Create compressed zip file from one or many files": "Maak gecomprimeerd zip-bestand van één of meerdere bestanden",- "Unzip compressed zip file": "Unzip gecomprimeerd zip-bestand",+ "Get File Name": "Bestandsnaam ophalen","File": "Bestand",- "Output format": "Uitvoer formaat",+ "Output Format": "Uitvoer formaat","Content": "Inhoud",- "File name": "Bestandsnaam is vereist",+ "File Name": "Bestandsnaam is vereist","Encoding": "Codering",- "Source file": "Bron bestand",- "Source encoding": "Broncode codering",- "Output file name": "Output bestandsnaam",- "Output encoding": "Uitvoer codering",- "File to Check": "Te controleren bestand",- "Select MIME Types": "MIME-typen selecteren",+ "Source File": "Bron bestand",+ "Source Encoding": "Broncode codering",+ "Output File Name": "Output bestandsnaam",+ "Output Encoding": "Uitvoer codering","Files": "Bestanden",- "Name of zipped file": "Naam van gezipt bestand",- "Use password": "Gebruik wachtwoord",- "Password options": "Wachtwoord opties",+ "Use Password": "Gebruik wachtwoord",+ "Password Options": "Wachtwoord opties","Zip File": "Zip bestand",- "Max Results": "Max. aantal resultaten",- "The output format": "Het uitgangsformaat",- "Choose one or more MIME types to check against the file.": "Kies een of meer MIME-types om het bestand te checken.",- "Enable password protection for the zip file": "Wachtwoordbeveiliging voor zip-bestand inschakelen",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nGooi een fout als zip-bestand meer dan verwacht invoert.\n- Dit is een veilige meting bij het werken met niet-vertrouwde zip-bestanden.\n- Dit veld uitsluiten of op 0 zetten om deze controle over te slaan.\n",- "Enable if the zip file is password protected": "Inschakelen als het zip-bestand is beveiligd met een wachtwoord","Text": "Tekstveld","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "FreeARC archief","CD Audio": "CD audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Bestandsnaam ophalen",- "Get the name of a file": "De naam van een bestand ophalen"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/pt.json b/packages/pieces/core/file-helper/src/i18n/pt.jsonindex f1fc0c47135..6b902889959 100644--- a/packages/pieces/core/file-helper/src/i18n/pt.json+++ b/packages/pieces/core/file-helper/src/i18n/pt.json@@ -1,39 +1,24 @@{- "Read file content and return it in different formats.": "Leia o conteúdo do arquivo e retorna-o em formatos diferentes.","Read File": "Arquivo de leitura",- "Create file": "Criar arquivo",+ "Create File": "Criar arquivo","Change File Encoding": "Alterar Codificação do Arquivo",- "Check file type": "Verificar tipo de arquivo",+ "Check File Type": "Verificar tipo de arquivo","Zip Files": "Arquivos Zip","Unzip File": "Descompactar Arquivo",- "Read a file from the file system": "Ler um arquivo do sistema de arquivos",- "Create file from content": "Criar arquivo a partir do conteúdo",- "Changes the encoding of a file": "Altera a codificação de um arquivo",- "Check MIME type of a file and filter based on selected types": "Verificar o tipo MIME de um arquivo e filtro baseado nos tipos selecionados",- "Create compressed zip file from one or many files": "Criar arquivo zip compactado a partir de um ou vários arquivos",- "Unzip compressed zip file": "Descompactar arquivo zip compactado",+ "Get File Name": "Obter Nome do Arquivo","File": "Arquivo",- "Output format": "Formato de saída",+ "Output Format": "Formato de saída","Content": "Conteúdo",- "File name": "Nome do arquivo",+ "File Name": "Nome do arquivo","Encoding": "Codificação",- "Source file": "Arquivo de origem",- "Source encoding": "Codificação fonte",- "Output file name": "Nome do arquivo de saída",- "Output encoding": "Codificação de saída",- "File to Check": "Arquivo para verificar",- "Select MIME Types": "Selecionar tipos MIME",+ "Source File": "Arquivo de origem",+ "Source Encoding": "Codificação fonte",+ "Output File Name": "Nome do arquivo de saída",+ "Output Encoding": "Codificação de saída","Files": "arquivos",- "Name of zipped file": "Nome do arquivo compactado",- "Use password": "Usar senha",- "Password options": "Opções de senha",+ "Use Password": "Usar senha",+ "Password Options": "Opções de senha","Zip File": "Arquivo compactado",- "Max Results": "Resultados no Máx.",- "The output format": "O formato de saída",- "Choose one or more MIME types to check against the file.": "Escolha um ou mais tipos de MIME para checar contra o arquivo.",- "Enable password protection for the zip file": "Ativar proteção por senha para o arquivo zip",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "U\nLança um erro se o arquivo zip tiver mais do que o esperado.\n- Esta é uma medida segura ao funcionar com arquivos zip não confiáveis.\n- Excluir este campo ou definir como 0 para ignorar esta verificação.\n",- "Enable if the zip file is password protected": "Ativar se o arquivo zip estiver protegido por senha","Text": "texto","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +102,5 @@"FreeARC Archive": "Arquivo FreeARC","CD Audio": "Áudio do CD","MPEG Transport Stream": "Transporte MPEG - Transporte",- "Opus Audio in Ogg Container": "Opus Audio no Recipiente Ogg",- "Get File Name": "Obter Nome do Arquivo",- "Get the name of a file": "Obter o nome de um arquivo"+ "Opus Audio in Ogg Container": "Opus Audio no Recipiente Ogg"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/ru.json b/packages/pieces/core/file-helper/src/i18n/ru.jsonindex 74f0ac9984f..d0a1d75dd2a 100644--- a/packages/pieces/core/file-helper/src/i18n/ru.json+++ b/packages/pieces/core/file-helper/src/i18n/ru.json@@ -1,27 +1,18 @@{- "Files Helper": "Помощник по файлам",- "Read file content and return it in different formats.": "Читайте содержимое файла и возвращайте его в разных форматах.","Read File": "Читать файл",- "Create file": "Создать файл",+ "Create File": "Создать файл","Change File Encoding": "Изменить кодировку файла",- "Check file type": "Проверить тип файла",- "Read a file from the file system": "Читать файл из файловой системы",- "Create file from content": "Создать файл из содержимого",- "Changes the encoding of a file": "Изменяет кодировку файла",- "Check MIME type of a file and filter based on selected types": "Проверьте MIME-тип файла и фильтра на основе выбранных типов",+ "Check File Type": "Проверить тип файла",+ "Get File Name": "Получить имя файла","File": "Файл",- "Output format": "Формат вывода",+ "Output Format": "Формат вывода","Content": "Содержание",- "File name": "Имя файла",+ "File Name": "Имя файла","Encoding": "Кодировка",- "Source file": "Исходный файл",- "Source encoding": "Исходная кодировка",- "Output file name": "Имя файла вывода",- "Output encoding": "Кодировка вывода",- "File to Check": "Файл для проверки",- "Select MIME Types": "Выберите типы MIME",- "The output format": "Выходной формат",- "Choose one or more MIME types to check against the file.": "Выберите один или несколько типов MIME для проверки с файлом.",+ "Source File": "Исходный файл",+ "Source Encoding": "Исходная кодировка",+ "Output File Name": "Имя файла вывода",+ "Output Encoding": "Кодировка вывода","Text": "Текст","Base64": "Base64","ASCII": "ASCII",@@ -105,7 +96,5 @@"FreeARC Archive": "Архив FreeARC","CD Audio": "CD аудио","MPEG Transport Stream": "MPEG транспортный поток",- "Opus Audio in Ogg Container": "Opus аудио в Ogg Container",- "Get File Name": "Получить имя файла",- "Get the name of a file": "Получить имя файла"+ "Opus Audio in Ogg Container": "Opus аудио в Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/translation.json b/packages/pieces/core/file-helper/src/i18n/translation.jsonindex d2e80157dd9..8b33d1dd52a 100644--- a/packages/pieces/core/file-helper/src/i18n/translation.json+++ b/packages/pieces/core/file-helper/src/i18n/translation.json@@ -1,39 +1,49 @@{- "Read file content and return it in different formats.": "Read file content and return it in different formats.",+ "Read, create, convert, check, zip and unzip files in your flow.": "Read, create, convert, check, zip and unzip files in your flow.","Read File": "Read File",- "Create file": "Create file",+ "Create File": "Create File","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type",+ "Check File Type": "Check File Type","Zip Files": "Zip Files","Unzip File": "Unzip File",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",- "Create compressed zip file from one or many files": "Create compressed zip file from one or many files",- "Unzip compressed zip file": "Unzip compressed zip file",+ "Get File Name": "Get File Name",+ "Return a file's contents as text or Base64.": "Return a file's contents as text or Base64.",+ "Save text as a new file.": "Save text as a new file.",+ "Convert a file from one text encoding to another.": "Convert a file from one text encoding to another.",+ "Detect a file's type and check it against the one you pick.": "Detect a file's type and check it against the one you pick.",+ "Bundle one or more files into a zip archive.": "Bundle one or more files into a zip archive.",+ "Extract every file inside a zip archive.": "Extract every file inside a zip archive.",+ "Return a file's name, including its extension.": "Return a file's name, including its extension.","File": "File",- "Output format": "Output format",+ "Output Format": "Output Format","Content": "Content",- "File name": "File name",+ "File Name": "File Name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types",+ "Source File": "Source File",+ "Source Encoding": "Source Encoding",+ "Output File Name": "Output File Name",+ "Output Encoding": "Output Encoding",+ "Expected File Type": "Expected File Type","Files": "Files",- "Name of zipped file": "Name of zipped file",- "Use password": "Use password",- "Password options": "Password options",+ "Use Password": "Use Password",+ "Password Options": "Password Options","Zip File": "Zip File",- "Max Results": "Max Results",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.",- "Enable password protection for the zip file": "Enable password protection for the zip file",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n",- "Enable if the zip file is password protected": "Enable if the zip file is password protected",+ "Max Files": "Max Files",+ "Pick a file from an earlier step or paste a URL to download.": "Pick a file from an earlier step or paste a URL to download.",+ "Text for text files, Base64 for images, PDFs and other binaries.": "Text for text files, Base64 for images, PDFs and other binaries.",+ "The text to write into the file.": "The text to write into the file.",+ "Include the extension so other steps know the file type.": "Include the extension so other steps know the file type.",+ "How to read the content. Keep UTF-8 for text, Base64 for binary data.": "How to read the content. Keep UTF-8 for text, Base64 for binary data.",+ "The encoding the file is in now. A wrong choice garbles characters.": "The encoding the file is in now. A wrong choice garbles characters.",+ "Include the file extension.": "Include the file extension.",+ "The encoding the new file is saved in. UTF-8 works almost everywhere.": "The encoding the new file is saved in. UTF-8 works almost everywhere.",+ "Matched against the type worked out from the file extension.": "Matched against the type worked out from the file extension.",+ "One row per file to add to the archive.": "One row per file to add to the archive.",+ "Include the .zip extension.": "Include the .zip extension.",+ "Require a password to open the archive.": "Require a password to open the archive.",+ "Pick a zip from an earlier step or paste a URL to download.": "Pick a zip from an earlier step or paste a URL to download.",+ "Fail if the zip holds more files than this. 0 or empty: no limit.": "Fail if the zip holds more files than this. 0 or empty: no limit.",+ "Turn on if the zip needs a password to open.": "Turn on if the zip needs a password to open.","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +127,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/vi.json b/packages/pieces/core/file-helper/src/i18n/vi.jsonindex 05aa20f5195..aa9b9a79db4 100644--- a/packages/pieces/core/file-helper/src/i18n/vi.json+++ b/packages/pieces/core/file-helper/src/i18n/vi.json@@ -1,27 +1,10 @@{- "Files Helper": "Files Helper",- "Read file content and return it in different formats.": "Read file content and return it in different formats.","Read File": "Read File",- "Create file": "Create file","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",+ "Get File Name": "Get File Name","File": "File",- "Output format": "Output format","Content": "Content",- "File name": "File name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.","Text": "Text","Base64": "Base64","ASCII": "ASCII",@@ -105,7 +88,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/i18n/zh.json b/packages/pieces/core/file-helper/src/i18n/zh.jsonindex 8102c512b4a..9af843dd43f 100644--- a/packages/pieces/core/file-helper/src/i18n/zh.json+++ b/packages/pieces/core/file-helper/src/i18n/zh.json@@ -1,39 +1,14 @@{- "Read file content and return it in different formats.": "Read file content and return it in different formats.","Read File": "Read File",- "Create file": "Create file","Change File Encoding": "Change File Encoding",- "Check file type": "Check file type","Zip Files": "Zip Files","Unzip File": "Unzip File",- "Read a file from the file system": "Read a file from the file system",- "Create file from content": "Create file from content",- "Changes the encoding of a file": "Changes the encoding of a file",- "Check MIME type of a file and filter based on selected types": "Check MIME type of a file and filter based on selected types",- "Create compressed zip file from one or many files": "Create compressed zip file from one or many files",- "Unzip compressed zip file": "Unzip compressed zip file",+ "Get File Name": "Get File Name","File": "文件",- "Output format": "Output format","Content": "Content",- "File name": "File name","Encoding": "Encoding",- "Source file": "Source file",- "Source encoding": "Source encoding",- "Output file name": "Output file name",- "Output encoding": "Output encoding",- "File to Check": "File to Check",- "Select MIME Types": "Select MIME Types","Files": "Files",- "Name of zipped file": "Name of zipped file",- "Use password": "Use password",- "Password options": "Password options","Zip File": "Zip File",- "Max Results": "Max Results",- "The output format": "The output format",- "Choose one or more MIME types to check against the file.": "Choose one or more MIME types to check against the file.",- "Enable password protection for the zip file": "Enable password protection for the zip file",- "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n": "\nThrow an error if zip file has more than expected entries.\n- This is a safe measure when working with untrusted zip files.\n- Exclude this field or set to 0 to skip this check.\n",- "Enable if the zip file is password protected": "Enable if the zip file is password protected","Text": "文本","Base64": "Base64","ASCII": "ASCII",@@ -117,7 +92,5 @@"FreeARC Archive": "FreeARC Archive","CD Audio": "CD Audio","MPEG Transport Stream": "MPEG Transport Stream",- "Opus Audio in Ogg Container": "Opus Audio in Ogg Container",- "Get File Name": "Get File Name",- "Get the name of a file": "Get the name of a file"+ "Opus Audio in Ogg Container": "Opus Audio in Ogg Container"}\ No newline at end of filediff --git a/packages/pieces/core/file-helper/src/index.ts b/packages/pieces/core/file-helper/src/index.tsindex 88fc2f5f8ee..b4c1185b3be 100644--- a/packages/pieces/core/file-helper/src/index.ts+++ b/packages/pieces/core/file-helper/src/index.ts@@ -10,9 +10,9 @@ import { getFileName } from './lib/actions/get-file-name';export const filesHelper = createPiece({displayName: 'Files Helper',- description: 'Read file content and return it in different formats.',+ description: 'Read, create, convert, check, zip and unzip files in your flow.',auth: PieceAuth.None(),- minimumSupportedRelease: '0.30.0',+ minimumSupportedRelease: '0.88.2',logoUrl: 'https://cdn.activepieces.com/pieces/new-core/file-helper.svg',categories: [PieceCategory.CORE],authors: ['kishanprmr', 'MoShizzle', 'abuaboud', 'Seb-C', 'danielpoonwj'],diff --git a/packages/pieces/core/file-helper/src/lib/actions/change-file-encoding.ts b/packages/pieces/core/file-helper/src/lib/actions/change-file-encoding.tsindex 58ed2d5446e..c93c807500f 100644--- a/packages/pieces/core/file-helper/src/lib/actions/change-file-encoding.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/change-file-encoding.ts@@ -7,27 +7,32 @@ export const changeFileEncoding = createAction({name: 'change_file_encoding',classification: 'READ',displayName: 'Change File Encoding',- description: 'Changes the encoding of a file',+ description: 'Convert a file from one text encoding to another.',aiMetadata: { description: 'Re-encodes the bytes of a file from one character encoding to another (e.g. latin1 to utf8), writing the result to a new file under the output name you give. Use it when a downstream step mis-reads a file because of its character set; use Read File to simply get the content as text, or Create File to build a file from a string. The declared source encoding must actually match the file, since it is decoded blindly - a wrong choice silently corrupts characters rather than failing; deterministic and idempotent.', idempotent: true },outputSchema: changeFileEncodingActionOutputSchema,props: {inputFile: Property.File({- displayName: 'Source file',+ displayName: 'Source File',+ description: 'Pick a file from an earlier step or paste a URL to download.',required: true,}),inputEncoding: Property.StaticDropdown({- displayName: 'Source encoding',+ displayName: 'Source Encoding',+ description: 'The encoding the file is in now. A wrong choice garbles characters.',required: true,options: {options: encodings,},}),outputFileName: Property.ShortText({- displayName: 'Output file name',+ displayName: 'Output File Name',+ description: 'Include the file extension.',+ placeholder: 'converted.txt',required: true,}),outputEncoding: Property.StaticDropdown({- displayName: 'Output encoding',+ displayName: 'Output Encoding',+ description: 'The encoding the new file is saved in. UTF-8 works almost everywhere.',required: true,options: {options: encodings,@@ -40,9 +45,7 @@ export const changeFileEncoding = createAction({const outputFileName = context.propsValue.outputFileName;const outputEncoding = context.propsValue.outputEncoding as BufferEncoding;- // First decode the input buffer using the source encodingconst decodedString = inputFile.toString(inputEncoding);- // Then encode to the target encodingconst encodedBuffer = Buffer.from(decodedString, outputEncoding);return context.files.write({diff --git a/packages/pieces/core/file-helper/src/lib/actions/check-file-type.ts b/packages/pieces/core/file-helper/src/lib/actions/check-file-type.tsindex cb895db73b1..579c2cd4fdc 100644--- a/packages/pieces/core/file-helper/src/lib/actions/check-file-type.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/check-file-type.ts@@ -7,37 +7,37 @@ export const checkFileType = createAction({audience: 'both',name: 'checkFileType',classification: 'READ',- displayName: 'Check file type',- description: 'Check MIME type of a file and filter based on selected types',+ displayName: 'Check File Type',+ description: "Detect a file's type and check it against the one you pick.",aiMetadata: { description: 'Determines the MIME type of a file from its extension and reports whether it matches the selected MIME type. Use it as a guard before a format-specific step (e.g. only continue for images or PDFs); use Get File Name if you only want the name, or Read File to get the contents. Detection is extension-based only - contents are never sniffed, so the extension is trusted as-is and only a missing or unrecognized one falls back to application/octet-stream; read-only and idempotent.', idempotent: true },outputSchema: checkFileTypeActionOutputSchema,props: {file: Property.File({- displayName: 'File to Check',+ displayName: 'File',+ description: 'Pick a file from an earlier step or paste a URL to download.',required: true,}),mimeTypes: Property.StaticDropdown({- displayName: 'Select MIME Types',+ displayName: 'Expected File Type',required: true,options: {options: predefinedMimeTypes,- },- description: 'Choose one or more MIME types to check against the file.',+ },+ description: 'Matched against the type worked out from the file extension.',}),},async run(context) {const file = context.propsValue.file;-- const selectedMimeTypes = context.propsValue.mimeTypes;- // Determine the MIME type of the file+ const selectedMimeType = context.propsValue.mimeTypes;const fileType = file.extension ? mime.lookup(file.extension) || 'application/octet-stream' : 'application/octet-stream';- // Check if the file's MIME type matches any of the selected MIME types.- const isMatch = fileType && selectedMimeTypes.includes(fileType);+ const isMatch = Array.isArray(selectedMimeType)+ ? selectedMimeType.includes(fileType)+ : fileType === selectedMimeType;return {- mimeType: fileType || 'unknown',+ mimeType: fileType,isMatch,};},diff --git a/packages/pieces/core/file-helper/src/lib/actions/create-file.ts b/packages/pieces/core/file-helper/src/lib/actions/create-file.tsindex 4c42e9555b9..b86eeb7e88c 100644--- a/packages/pieces/core/file-helper/src/lib/actions/create-file.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/create-file.ts@@ -4,18 +4,28 @@ import { createFileActionOutputSchema } from '../output-schemas';export const createFile = createAction({audience: 'both',- // auth: check https://www.activepieces.com/docs/developers/piece-reference/authentication,name: 'createFile',classification: 'READ',- displayName: 'Create file',- description: 'Create file from content',+ displayName: 'Create File',+ description: 'Save text as a new file.',aiMetadata: { description: 'Writes a text string out to a new file with the given file name and character encoding (utf8 by default). Use it when a downstream step needs an actual file rather than a value - for example to attach generated CSV or JSON text to an email - and use Read File for the opposite direction. Requires the content and file name, and the encoding must be one of the supported Buffer encodings; nothing outside the run is changed, so it is idempotent.', idempotent: true },outputSchema: createFileActionOutputSchema,props: {- content: Property.LongText({ displayName: 'Content', required: true }),- fileName: Property.ShortText({ displayName: 'File name', required: true }),+ content: Property.LongText({+ displayName: 'Content',+ description: 'The text to write into the file.',+ placeholder: 'Hello, world',+ required: true,+ }),+ fileName: Property.ShortText({+ displayName: 'File Name',+ description: 'Include the extension so other steps know the file type.',+ placeholder: 'report.txt',+ required: true,+ }),encoding: Property.StaticDropdown({displayName: 'Encoding',+ description: 'How to read the content. Keep UTF-8 for text, Base64 for binary data.',required: true,defaultValue: 'utf8',options: {diff --git a/packages/pieces/core/file-helper/src/lib/actions/get-file-name.ts b/packages/pieces/core/file-helper/src/lib/actions/get-file-name.tsindex 0d1e196623b..e60a6a7fd69 100644--- a/packages/pieces/core/file-helper/src/lib/actions/get-file-name.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/get-file-name.ts@@ -6,12 +6,13 @@ export const getFileName = createAction({name: 'get_file_name',classification: 'READ',displayName: 'Get File Name',- description: 'Get the name of a file',+ description: "Return a file's name, including its extension.",aiMetadata: { description: 'Returns only the file name of an input file, without reading or decoding its contents. Use it when the name itself is what you need - to build a path, log it, or branch on the extension - and prefer Read File to get the content or Check File Type to resolve the MIME type. Requires a file input; read-only and idempotent.', idempotent: true },outputSchema: getFileNameActionOutputSchema,props: {file: Property.File({displayName: 'File',+ description: 'Pick a file from an earlier step or paste a URL to download.',required: true,}),},diff --git a/packages/pieces/core/file-helper/src/lib/actions/read-file.ts b/packages/pieces/core/file-helper/src/lib/actions/read-file.tsindex bf773646199..13ac47ca4c9 100644--- a/packages/pieces/core/file-helper/src/lib/actions/read-file.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/read-file.ts@@ -12,17 +12,18 @@ export const readFileAction = createAction({name: 'read_file',classification: 'READ',displayName: 'Read File',- description: 'Read a file from the file system',+ description: "Return a file's contents as text or Base64.",aiMetadata: { description: 'Decodes an input file and returns its contents as either UTF-8 text or a base64 string, selected by the output-format option. Use it to turn a file from a trigger or earlier step into a usable value - Text for text-based files such as .txt/.json, Base64 for binary files or API payloads; use Create File for the reverse direction, and Convert CSV to JSON in the CSV piece when you need parsed rows. Requires a file input and an output format (any other value errors); read-only and idempotent.', idempotent: true },outputSchema: readFileActionOutputSchema,props: {file: Property.File({displayName: 'File',+ description: 'Pick a file from an earlier step or paste a URL to download.',required: true,}),readOptions: Property.StaticDropdown({- displayName: 'Output format',- description: 'The output format',+ displayName: 'Output Format',+ description: 'Text for text files, Base64 for images, PDFs and other binaries.',required: true,options: {options: [diff --git a/packages/pieces/core/file-helper/src/lib/actions/unzip-file.ts b/packages/pieces/core/file-helper/src/lib/actions/unzip-file.tsindex 4f611c0984c..128c5787544 100644--- a/packages/pieces/core/file-helper/src/lib/actions/unzip-file.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/unzip-file.ts@@ -17,39 +17,35 @@ interface Result {filePath: string;}-const maxResultsDescription = `-Throw an error if zip file has more than expected entries.-- This is a safe measure when working with untrusted zip files.-- Exclude this field or set to 0 to skip this check.-`;-export const unzipFile = createAction({audience: 'both',name: 'unzipFile',classification: 'READ',displayName: 'Unzip File',- description: 'Unzip compressed zip file',- aiMetadata: { description: 'Extracts every file entry from a zip archive, writing each one out as its own file; supports password-protected archives. Use it to reach the contents of a zip attachment before processing them; use Zip Files for the reverse direction. Set Max Results to throw when an untrusted archive exceeds that entry count; directory entries are skipped, a wrong or missing password makes extraction fail, and the source archive is unchanged, so it is idempotent.', idempotent: true },+ description: 'Extract every file inside a zip archive.',+ aiMetadata: { description: 'Extracts every file entry from a zip archive, writing each one out as its own file; supports password-protected archives. Use it to reach the contents of a zip attachment before processing them; use Zip Files for the reverse direction. Set Max Files to throw when an untrusted archive exceeds that entry count; directory entries are skipped, a wrong or missing password makes extraction fail, and the source archive is unchanged, so it is idempotent.', idempotent: true },outputSchema: unzipFileActionOutputSchema,props: {file: Property.File({displayName: 'Zip File',+ description: 'Pick a zip from an earlier step or paste a URL to download.',required: true,}),maxResults: Property.Number({- displayName: 'Max Results',- description: maxResultsDescription,+ displayName: 'Max Files',+ description: 'Fail if the zip holds more files than this. 0 or empty: no limit.',defaultValue: 0,required: false,+ advanced: true,}),usePassword: Property.Checkbox({- displayName: 'Use password',- description: 'Enable if the zip file is password protected',+ displayName: 'Use Password',+ description: 'Turn on if the zip needs a password to open.',required: false,defaultValue: false,}),passwordOptions: Property.DynamicProperties({- displayName: 'Password options',+ displayName: 'Password Options',auth: PieceAuth.None(),required: false,refreshers: ['usePassword'],@@ -74,14 +70,17 @@ export const unzipFile = createAction({const zipReader = new ZipReader(new BlobReader(blob));const entries = await zipReader.getEntries();+ const fileEntries = entries.filter((entry) => !entry.directory);+const maxResults = context.propsValue.maxResults || 0;- if (maxResults !== 0 && entries.length > maxResults) {+ if (maxResults !== 0 && fileEntries.length > maxResults) {await zipReader.close();- throw `Zip file contains more entries than allowed: ${entries.length}`;+ throw new Error(+ `Zip file contains more files than allowed: ${fileEntries.length}`+ );}- // Prepare options for getData, including password if providedconst getDataOptions: EntryGetDataOptions = {};if (context.propsValue.usePassword) {const password = context.propsValue.passwordOptions?.[@@ -92,28 +91,26 @@ export const unzipFile = createAction({const results: Result[] = [];- for (const entry of entries) {- if (!entry.directory) {- const mimeType = getMimeType(entry.filename);+ for (const entry of fileEntries) {+ const mimeType = getMimeType(entry.filename);- const blob = await entry.getData(- new BlobWriter(mimeType),- getDataOptions- );- const arrayBuffer = await blob.arrayBuffer();- const buffer = Buffer.from(arrayBuffer);+ const blob = await entry.getData(+ new BlobWriter(mimeType),+ getDataOptions+ );+ const arrayBuffer = await blob.arrayBuffer();+ const buffer = Buffer.from(arrayBuffer);- const fileBaseName = entry.filename.split('/').pop() || entry.filename;- const fileReference = await context.files.write({- data: buffer,- fileName: fileBaseName,- });+ const fileBaseName = entry.filename.split('/').pop() || entry.filename;+ const fileReference = await context.files.write({+ data: buffer,+ fileName: fileBaseName,+ });- results.push({- file: fileReference,- filePath: entry.filename,- });- }+ results.push({+ file: fileReference,+ filePath: entry.filename,+ });}await zipReader.close();diff --git a/packages/pieces/core/file-helper/src/lib/actions/zip-files.ts b/packages/pieces/core/file-helper/src/lib/actions/zip-files.tsindex 992d2ec32c9..6ffb59ff0e3 100644--- a/packages/pieces/core/file-helper/src/lib/actions/zip-files.ts+++ b/packages/pieces/core/file-helper/src/lib/actions/zip-files.ts@@ -17,53 +17,47 @@ interface FileObject {filePath: string;}-const filePathDescription = `-- You can put files in specific folders eg. foo/test.txt-- If not specified, the file would be at the top level of the zip file.-- If the same File Path is specified for different files, the later file would take precedence.-`;--const encryptionMethodDescription = `-- ZipCrypto: Legacy encryption method with wide compatibility (not recommended for sensitive data)-- AES-256: Modern encryption with strong security (may not be supported by older zip clients)-`;-export const zipFiles = createAction({audience: 'both',name: 'zipFiles',classification: 'READ',displayName: 'Zip Files',- description: 'Create compressed zip file from one or many files',+ description: 'Bundle one or more files into a zip archive.',aiMetadata: { description: 'Compresses one or many input files into a single zip archive, optionally placing each entry at a custom path inside the archive (e.g. foo/test.txt) and optionally password-protecting it with ZipCrypto or AES-256. Use it to bundle several files into one attachment or download; use Unzip File for the reverse direction. Requires the list of files and an output file name; entries default to their own file names, reusing the same in-zip path keeps only the later file, and there are no external side effects, so it is idempotent.', idempotent: true },outputSchema: zipFilesActionOutputSchema,props: {files: Property.Array({displayName: 'Files',+ description: 'One row per file to add to the archive.',properties: {file: Property.File({displayName: 'File',+ description: 'Pick a file from an earlier step or paste a URL to download.',required: true,}),filePath: Property.ShortText({- displayName: 'File Path in zip',- description: filePathDescription,+ displayName: 'Path in Zip',+ description: 'Folder and name inside the zip. Empty: the file name at the top level.',+ placeholder: 'reports/summary.pdf',required: false,}),},required: true,}),outputFileName: Property.ShortText({- displayName: 'Name of zipped file',+ displayName: 'Output File Name',+ description: 'Include the .zip extension.',+ placeholder: 'archive.zip',required: true,}),usePassword: Property.Checkbox({- displayName: 'Use password',- description: 'Enable password protection for the zip file',+ displayName: 'Use Password',+ description: 'Require a password to open the archive.',required: false,defaultValue: false,}),passwordOptions: Property.DynamicProperties({- displayName: 'Password options',+ displayName: 'Password Options',required: false,auth: PieceAuth.None(),refreshers: ['usePassword'],@@ -79,7 +73,7 @@ export const zipFiles = createAction({}),encryptionMethod: Property.StaticDropdown({displayName: 'Encryption Method',- description: encryptionMethodDescription,+ description: 'AES-256 is far safer; ZipCrypto opens in every unzip app but is weak.',required: true,defaultValue: 'zipcrypto',options: {@@ -104,7 +98,6 @@ export const zipFiles = createAction({const fileAddOptions: ZipWriterAddDataOptions = {};- // Add encryption if password is providedif (context.propsValue.usePassword) {const password = context.propsValue.passwordOptions?.['password'@@ -123,15 +116,13 @@ export const zipFiles = createAction({fileAddOptions.encryptionStrength = 3;break;default:- // Default to ZipCrypto for compatibilityfileAddOptions.zipCrypto = true;break;}}for (const fileProp of fileProps) {- // default to file name if filePath not explicitly provided- const zipFilePath = fileProp.filePath ?? fileProp.file.filename;+ const zipFilePath = fileProp.filePath || fileProp.file.filename;const blob = new Blob([new Uint8Array(fileProp.file.data)]);await zipWriter.add(zipFilePath, new BlobReader(blob), fileAddOptions);}diff --git a/packages/pieces/core/file-helper/test/check-file-type.test.ts b/packages/pieces/core/file-helper/test/check-file-type.test.tsindex b711af18aba..63920d5478d 100644--- a/packages/pieces/core/file-helper/test/check-file-type.test.ts+++ b/packages/pieces/core/file-helper/test/check-file-type.test.ts@@ -19,6 +19,36 @@ describe('checkFileType', () => {});});+ test('matches a single selected MIME type exactly', async () => {+ const file = new ApFile('photo.png', Buffer.from('fake-png'), 'png');+ const ctx = createMockActionContext({+ propsValue: {+ file,+ mimeTypes: 'image/png',+ },+ });+ const result = await checkFileType.run(ctx);+ expect(result).toEqual({+ mimeType: 'image/png',+ isMatch: true,+ });+ });++ test('does not match a different single MIME type', async () => {+ const file = new ApFile('photo.png', Buffer.from('fake-png'), 'png');+ const ctx = createMockActionContext({+ propsValue: {+ file,+ mimeTypes: 'image/jpeg',+ },+ });+ const result = await checkFileType.run(ctx);+ expect(result).toEqual({+ mimeType: 'image/png',+ isMatch: false,+ });+ });+test('does not match incorrect MIME type', async () => {const file = new ApFile('doc.pdf', Buffer.from('fake-pdf'), 'pdf');const ctx = createMockActionContext({