fix(build,denoise): gate node leak, postMessage origin, fail-hard patch, CDN dedup (N124/N125/N128/N120)
- N124: denoise shim cleanup() now disconnects the noise gate AudioWorkletNode (var-scoped, guarded), releasing the gate processor thread instead of leaking it on every getUserMedia within a session. - N125: denoise-status postMessage now targets the parent origin (derived from the parentUrl widget param via new URL(...).origin, falling back to this frame's origin) instead of broadcasting with '*'. - N128: patch-folds.mjs fails hard (process.exit(1)) when the patch target is missing, so an unpatched folds can't silently ship. The idempotent "already applied" path still exits 0 (verified by re-run). - N120: the avatar-decoration CDN URL is now single-sourced in avatarDecorations.ts (DECORATION_CDN); syncDecorations.mjs extracts it by regex (can't import across the build/app boundary) and fails hard if renamed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+11
-2
@@ -19,8 +19,17 @@ try {
|
||||
writeFileSync(foldsPath, content, 'utf8');
|
||||
console.log('Applied defensive Icon src guard to folds.');
|
||||
} else {
|
||||
console.warn('Warning: folds Icon patch target not found - may need updating.');
|
||||
// Genuine "patch could not be applied" case: the target string is gone
|
||||
// (folds renamed/restructured it) AND it isn't already patched. Fail hard
|
||||
// so the postinstall hook / CI breaks loudly instead of silently shipping
|
||||
// an unpatched folds (which crashes at render with "src is not a function").
|
||||
console.error(
|
||||
'ERROR: folds Icon patch target not found - folds may have updated. ' +
|
||||
'Update the patch target string in scripts/patch-folds.mjs before building.',
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('Warning: Could not patch folds:', e.message);
|
||||
console.error('ERROR: Could not patch folds:', e.message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user