fix(openclaw-bridge): use regex replace for base64url (ES2020 compat)

replaceAll() requires ES2021+, tsconfig targets ES2020.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-08 07:40:56 -07:00
parent a7c5b264fa
commit 20e96f31cd
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ type Frame = ReqFrame | ResFrame | EventFrame;
// ── Helpers (mirror openclaw/openclaw internals) ────────────────────────────── // ── Helpers (mirror openclaw/openclaw internals) ──────────────────────────────
function base64UrlEncode(buf: Buffer): string { function base64UrlEncode(buf: Buffer): string {
return buf.toString('base64').replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/g, ''); return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '');
} }
// Ed25519 SPKI prefix (ASN.1 DER) — 12 bytes // Ed25519 SPKI prefix (ASN.1 DER) — 12 bytes