From c0b95f4f0e9b882dc616e75d850d0e163622e69a Mon Sep 17 00:00:00 2001 From: guabu <135956181+guabu@users.noreply.github.com> Date: Wed, 14 Aug 2024 20:49:09 +0200 Subject: [PATCH] fix: use Node methods for creating UL theme (#46) --- scripts/bootstrap.mjs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.mjs b/scripts/bootstrap.mjs index 9c2e019..ba77e30 100644 --- a/scripts/bootstrap.mjs +++ b/scripts/bootstrap.mjs @@ -513,8 +513,17 @@ const createUniversalLoginTheme = ora({ }).start() try { - await $`cat ./themes/universal-login.json` - .pipe`auth0 api post branding/themes` + const theme = await readFile("./themes/universal-login.json", { + encoding: "utf-8", + }) + + // prettier-ignore + const createUniversalLoginThemeArgs = [ + "api", "post", "branding/themes", + "--data", theme, + ]; + + await $`auth0 ${createUniversalLoginThemeArgs}` createUniversalLoginTheme.succeed() } catch (e) {