mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Remove nostr shim and retarget imports
This commit is contained in:
1 parent
5d22d78717
commit
3996986e63
36 files changed
+89
-206
No files matched your search
@@ -32,7 +32,7 @@ When wiring moderation or playback toggles into view analytics, import helpers f
|
||||
import { recordVideoView, subscribeVideoViewEvents } from "../nostrViewEventsFacade.js";
|
||||
```
|
||||
|
||||
The facade wraps [`js/nostr/viewEventBindings.js`](../js/nostr/viewEventBindings.js) so feature flags, relay discovery, and COUNT/LIST fallbacks all run through the same guard clauses that enforce the NIP-71/NIP-78 schemas. `js/nostr.js` still exports shimmed versions for legacy bundles, but new code should migrate to the facades to keep the eventual removal painless. Modules that need to no-op when relays disable optional methods can rely on the binding’s "unavailable" errors to short-circuit cleanly.
|
||||
The facade wraps [`js/nostr/viewEventBindings.js`](../js/nostr/viewEventBindings.js) so feature flags, relay discovery, and COUNT/LIST fallbacks all run through the same guard clauses that enforce the NIP-71/NIP-78 schemas. Modules that need to no-op when relays disable optional methods can rely on the binding’s "unavailable" errors to short-circuit cleanly.
|
||||
|
||||
### Hydration, COUNT, and UI sync
|
||||
|
||||
|
||||
@@ -110,9 +110,8 @@ through the dedicated facade when you need to run a NIP-07 handshake:
|
||||
import { nostrClient, requestDefaultExtensionPermissions } from "./nostrClientFacade.js";
|
||||
```
|
||||
|
||||
`js/nostr.js` remains as a compatibility shim while downstream packages migrate;
|
||||
it forwards to the new facades but is slated for removal once legacy imports
|
||||
are retired.【F:js/nostr/defaultClient.js†L1-L25】【F:js/nostr.js†L1-L92】
|
||||
The compatibility shim has been removed; import from the facades above to avoid
|
||||
broken references.【F:js/nostr/defaultClient.js†L1-L25】
|
||||
|
||||
For analytics, route through the
|
||||
[NIP-71](https://github.com/nostr-protocol/nips/blob/master/71.md) helpers in
|
||||
|
||||
Reference in new issue
Block a user