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:
parent
a7c5b264fa
commit
20e96f31cd
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue