From e7c833ddaedbcfe4437237f89c5da87c44b68e88 Mon Sep 17 00:00:00 2001 From: BigYellowHammer <6392942+BigYellowHammer@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:11:30 +0100 Subject: [PATCH] Rewriting fixCryptoApiImports and fixSnackbarMarkup to js to make it OS agnostic --- Gruntfile.js | 18 +------ .../config/scripts/fixCryptoApiImports.js | 54 +++++++++++++++++++ src/core/config/scripts/fixSnackBarMarkup.js | 28 ++++++++++ 3 files changed, 84 insertions(+), 16 deletions(-) create mode 100644 src/core/config/scripts/fixCryptoApiImports.js create mode 100644 src/core/config/scripts/fixSnackBarMarkup.js diff --git a/Gruntfile.js b/Gruntfile.js index a67aa5b8..c9a21e22 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.js`, stdout: false }, fixSnackbarMarkup: { - command: function () { - switch (process.platform) { - case "darwin": - return `sed -i '' 's/