21 New Functions In SyncJS Core
From HMAC signing to CSV parsing, and so much more!
SyncJS just got 21 new core functions, available across Syncplify Server!, AFT!, and R2FS!. All of them. No flags, no tiers. If your product is up to date (Server v7.1.1, R2FS! v2.0.0, and soon to be released AFT! v4.0.0), every function listed here is available in every script you write today.
Here is the complete addition:
File operations: GzipFile, GunzipFile, FileAgeSecs, FileSizeOf, WaitForFile, SplitFileByLines, SplitFileBySize
Data and encoding: ParseCSV, FormatCSV, ParseXML, Base64Encode, Base64Decode, HashString, FormatDateTime
Cryptography: HmacSign, HmacVerify, PGPSignFile, PGPVerifyFile
Integration: RunCapture, TcpConnect, SendToTeamsWebHook
The three additions that change the most scripts
HMAC signing and verification. HmacSign and HmacVerify implement the pattern behind every major webhook security model: GitHub, Stripe, Slack, and virtually every cloud event system use HMAC-SHA256 to authenticate payloads. Until now, doing this from a SyncJS script meant shelling out to an external tool. That workaround is gone. Both functions support SHA-256 and SHA-512. HmacVerify uses constant-time comparison, so it is safe in authentication paths.
var key = GetSecret("webhook-secret");
var sig = HmacSign("sha256", key, payload);
var trusted = HmacVerify("sha256", key, payload, incomingSig);Native CSV and XML parsing. The majority of real MFT scripts exist to read, transform, or route files based on their contents, not just their filenames. ParseCSV returns a two-dimensional array of strings. ParseXML returns a nested JavaScript object with a predictable structure: attributes under _attrs, text content under _text, repeated elements as arrays. Neither function requires a child process or an external dependency. The data is just there, in memory, ready to drive routing logic.
var rows = ParseCSV(ReadTextFile("/inbox/orders.csv"));
var doc = ParseXML(ReadTextFile("/inbox/manifest.xml"));
Log("order count: " + rows.length + ", ship-to: " + doc.order._attrs.destination);WaitForFile. If you have written a SyncJS script that waits for an upstream process to drop a trigger file, you have written the sleep/check/repeat loop manually. WaitForFile replaces it entirely. Pass a path, a timeout in milliseconds, and an optional poll interval. Get a boolean back.
if (!WaitForFile("/processing/trigger.flag", 30000)) {
Log.Warn("trigger file did not arrive within 30 seconds");
Exit(1);
}The rest, in brief
GzipFile and GunzipFile compress and decompress single files in place or to a named destination. SplitFileByLines and SplitFileBySize partition large files into numbered chunks, the prerequisite step for any parallel-upload pattern. FileAgeSecs and FileSizeOf return exactly what the names say, useful for conditional logic without a full StatFileSystemObject call.
PGPSignFile and PGPVerifyFile extend the existing PGP encrypt/decrypt pair with detached signature support. HashString brings string-level hashing to the same eight algorithms already supported by HashFile. Base64Encode and Base64Decode handle the encoding required by virtually every HTTP API.
RunCapture turns the output of any OS command into a string your script can use directly. TcpConnect checks whether a host and port are reachable before committing to a full connection. SendToTeamsWebHook joins Slack and Telegram in the notification options. FormatDateTime formats timestamps using token-based patterns without requiring the standard library workarounds that JavaScript developers normally reach for.
In conclusion
Full documentation for every new function is in the SyncJS scripting reference. If you write scripts in VSCode, the Language Server extension picks up all new symbols automatically after updating. No reinstall required.
And it doesn’t end here. SyncJS is becoming more and more central to the life and interoperation of all Syncplify software products, so we’re fully committed to its constant upkeep and improvement.

