[e2e] Prevent slashes in generated project names (#28835)

* Prevent slashes in generated project names by using base64url encoding (replaces `+` and `/` by `-` and `_`)

* Keep base64 (Missing baseUrl in compilerOptions) and replace the slash manually

GitOrigin-RevId: 62217873de8d1e00e72927a5195338ad92c09769
This commit is contained in:
Antoine Clausse
2025-10-02 17:17:34 +02:00
committed by Copybot
parent 632a563ed2
commit 72c02bbd98

View File

@@ -141,6 +141,7 @@ export function getSpamSafeProjectName() {
// Move from hex/16 to base64/64 possible characters per char in string
const name = Buffer.from(uuid().replaceAll('-', ''), 'hex')
.toString('base64')
.replace('/', '_')
.slice(0, 10)
const nDigits = (name.match(/\d/g) || []).length
if (nDigits < 6) return name