From a7f0aed3337c43e9a9fc74be4f4266fb9342d988 Mon Sep 17 00:00:00 2001 From: Evan Sangaline Date: Wed, 14 Feb 2024 15:38:49 -0600 Subject: [PATCH] Lowercase the circuit name. --- .../src/script-templates/sindri/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/remix-ws-templates/src/script-templates/sindri/index.ts b/libs/remix-ws-templates/src/script-templates/sindri/index.ts index c6d0f64420..45e323706d 100644 --- a/libs/remix-ws-templates/src/script-templates/sindri/index.ts +++ b/libs/remix-ws-templates/src/script-templates/sindri/index.ts @@ -75,15 +75,14 @@ export const sindriScripts = async (plugin: any) => { break } + // Derive the circuit name from the workspace name. const {name: workspaceName} = await plugin.call('filePanel', 'getCurrentWorkspace') sindriManifest.name = workspaceName .replace(/\s*-+\s*\d*$/, '') .replace(/[^a-zA-Z0-9]+/g, '-') - .replace(/^[^a-zA-Z]+/, '') || `my-${sindriManifest.circuitType}-circuit` - - // Remove any unsupported characters from the circuit name. - sindriManifest.name = (sindriManifest.name || '').replace(/[^-a-zA-Z0-9_]+/g, '-') + .replace(/^[^a-zA-Z]+/, '') + .toLowerCase() || `my-${sindriManifest.circuitType}-circuit` // Write out the modified manifest file. writeIfNotExists('sindri.json', JSON.stringify(sindriManifest, null, 2))