From f646065c36d51a928b7fe691c5b114d82b140354 Mon Sep 17 00:00:00 2001 From: BigYellowHammer <6392942+BigYellowHammer@users.noreply.github.com> Date: Sat, 11 Apr 2026 13:03:16 +0200 Subject: [PATCH] Rewriting fixCryptoApiImports and fixSnackbarMarkup to js to make it OS agnostic (#2298) --- Gruntfile.js | 18 +------ .../config/scripts/fixCryptoApiImports.mjs | 54 +++++++++++++++++++ src/core/config/scripts/fixSnackBarMarkup.mjs | 28 ++++++++++ 3 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 src/core/config/scripts/fixCryptoApiImports.mjs create mode 100644 src/core/config/scripts/fixSnackBarMarkup.mjs diff --git a/Gruntfile.js b/Gruntfile.js index a67aa5b8..b04f3048 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -411,25 +411,11 @@ module.exports = function (grunt) { stdout: false, }, fixCryptoApiImports: { - command: function () { - switch (process.platform) { - case "darwin": - return `find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`; - default: - return `find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i -e '/\\.mjs/!s/\\(from "\\.[^"]*\\)";/\\1.mjs";/g'`; - } - }, + command: `node ${nodeFlags} src/core/config/scripts/fixCryptoApiImports.mjs`, stdout: false }, fixSnackbarMarkup: { - command: function () { - switch (process.platform) { - case "darwin": - return `sed -i '' 's/