@secondlayer/shared 11.11.0 → 11.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/db/index.d.ts +18 -1
- package/dist/src/db/index.js +4 -1
- package/dist/src/db/index.js.map +3 -3
- package/dist/src/db/queries/chain-reorgs.js.map +2 -2
- package/dist/src/index-http.d.ts +6 -6
- package/dist/src/index-http.js +6 -3
- package/dist/src/index-http.js.map +3 -3
- package/dist/src/index.d.ts +18 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +3 -3
- package/dist/src/queue/listener.d.ts +14 -6
- package/dist/src/queue/listener.js +964 -5
- package/dist/src/queue/listener.js.map +12 -4
- package/package.json +1 -1
|
@@ -9,16 +9,24 @@ interface ListenOptions {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* LISTEN/NOTIFY connection for indexer-fired channels (`indexer:new_block`,
|
|
12
|
-
* `subgraph_reorg`, `tx:confirmed`) — they fire
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* `subgraph_reorg`, `tx:confirmed`, `index:tip`) — they fire wherever
|
|
13
|
+
* `getSourceDb()` writes. Delegates to `resolveSourceUrl` (the same function
|
|
14
|
+
* `getSourceDb()` calls) instead of re-deriving the env-var precedence here:
|
|
15
|
+
* a hand-duplicated resolver previously skipped the `isPlatformMode()` gate
|
|
16
|
+
* that `getSourceDb()` applies, so a process not in platform mode (but with
|
|
17
|
+
* `SOURCE_DATABASE_URL` set anyway, e.g. inherited from a shared env
|
|
18
|
+
* template) would LISTEN on a different database than the one the write
|
|
19
|
+
* actually commits to — a NOTIFY that fires correctly on the writer's
|
|
20
|
+
* connection then never reaches this listener. One resolver, used by both.
|
|
15
21
|
*/
|
|
16
|
-
declare function sourceListenerUrl(): string
|
|
22
|
+
declare function sourceListenerUrl(): string;
|
|
17
23
|
/**
|
|
18
24
|
* LISTEN/NOTIFY connection for control-plane channels (`webhooks:new_outbox`,
|
|
19
|
-
* `webhooks:changed`, subgraph operations) — they fire
|
|
25
|
+
* `webhooks:changed`, subgraph operations) — they fire wherever `getTargetDb()`
|
|
26
|
+
* writes. See {@link sourceListenerUrl} for why this delegates instead of
|
|
27
|
+
* re-deriving the precedence.
|
|
20
28
|
*/
|
|
21
|
-
declare function targetListenerUrl(): string
|
|
29
|
+
declare function targetListenerUrl(): string;
|
|
22
30
|
declare function listen(channel: string, callback: (payload?: string) => void, opts?: ListenOptions): Promise<() => Promise<void>>;
|
|
23
31
|
/** A shareable wake point: any number of callers can `wait()` for the next
|
|
24
32
|
* NOTIFY on `channel`, each getting their own promise. One LISTEN connection
|