graphile-realtime-subscriptions 1.9.2 → 1.9.3
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/cursor-tracker.d.ts +2 -2
- package/cursor-tracker.js +2 -2
- package/esm/cursor-tracker.d.ts +2 -2
- package/esm/cursor-tracker.js +2 -2
- package/esm/index.d.ts +2 -2
- package/esm/index.js +1 -1
- package/esm/plugin.d.ts +2 -2
- package/esm/plugin.js +3 -3
- package/esm/realtime-manager.d.ts +1 -1
- package/esm/realtime-manager.js +1 -1
- package/index.d.ts +2 -2
- package/index.js +3 -3
- package/package.json +4 -4
- package/plugin.d.ts +2 -2
- package/plugin.js +2 -2
- package/realtime-manager.d.ts +1 -1
- package/realtime-manager.js +2 -2
package/cursor-tracker.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* The caller provides a Queryable (typically a pg.Pool from pg-cache)
|
|
13
13
|
* and this class calls pool.query() directly for each operation.
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { ChangeLogEntry, CursorTrackerOptions } from './types';
|
|
16
16
|
declare const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
17
17
|
declare const DEFAULT_HEARTBEAT_INTERVAL_MS = 30000;
|
|
18
18
|
declare const DEFAULT_BATCH_LIMIT = 500;
|
|
@@ -39,4 +39,4 @@ export declare class CursorTracker {
|
|
|
39
39
|
get isRunning(): boolean;
|
|
40
40
|
private quoteIdent;
|
|
41
41
|
}
|
|
42
|
-
export {
|
|
42
|
+
export { DEFAULT_BATCH_LIMIT, DEFAULT_HEARTBEAT_INTERVAL_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SCHEMA, };
|
package/cursor-tracker.js
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* and this class calls pool.query() directly for each operation.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.DEFAULT_SCHEMA = exports.
|
|
18
|
-
const crypto_1 = require("crypto");
|
|
17
|
+
exports.DEFAULT_SCHEMA = exports.DEFAULT_POLL_INTERVAL_MS = exports.DEFAULT_HEARTBEAT_INTERVAL_MS = exports.DEFAULT_BATCH_LIMIT = exports.CursorTracker = void 0;
|
|
19
18
|
const logger_1 = require("@pgpmjs/logger");
|
|
20
19
|
const quotes_1 = require("@pgsql/quotes");
|
|
20
|
+
const crypto_1 = require("crypto");
|
|
21
21
|
const log = new logger_1.Logger('cursor-tracker');
|
|
22
22
|
const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
23
23
|
exports.DEFAULT_POLL_INTERVAL_MS = DEFAULT_POLL_INTERVAL_MS;
|
package/esm/cursor-tracker.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* The caller provides a Queryable (typically a pg.Pool from pg-cache)
|
|
13
13
|
* and this class calls pool.query() directly for each operation.
|
|
14
14
|
*/
|
|
15
|
-
import type {
|
|
15
|
+
import type { ChangeLogEntry, CursorTrackerOptions } from './types';
|
|
16
16
|
declare const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
17
17
|
declare const DEFAULT_HEARTBEAT_INTERVAL_MS = 30000;
|
|
18
18
|
declare const DEFAULT_BATCH_LIMIT = 500;
|
|
@@ -39,4 +39,4 @@ export declare class CursorTracker {
|
|
|
39
39
|
get isRunning(): boolean;
|
|
40
40
|
private quoteIdent;
|
|
41
41
|
}
|
|
42
|
-
export {
|
|
42
|
+
export { DEFAULT_BATCH_LIMIT, DEFAULT_HEARTBEAT_INTERVAL_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SCHEMA, };
|
package/esm/cursor-tracker.js
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* The caller provides a Queryable (typically a pg.Pool from pg-cache)
|
|
13
13
|
* and this class calls pool.query() directly for each operation.
|
|
14
14
|
*/
|
|
15
|
-
import { randomUUID } from 'crypto';
|
|
16
15
|
import { Logger } from '@pgpmjs/logger';
|
|
17
16
|
import { QuoteUtils } from '@pgsql/quotes';
|
|
17
|
+
import { randomUUID } from 'crypto';
|
|
18
18
|
const log = new Logger('cursor-tracker');
|
|
19
19
|
const DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
20
20
|
const DEFAULT_HEARTBEAT_INTERVAL_MS = 30000;
|
|
@@ -123,4 +123,4 @@ export class CursorTracker {
|
|
|
123
123
|
return QuoteUtils.quoteIdentifier(identifier);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
export {
|
|
126
|
+
export { DEFAULT_BATCH_LIMIT, DEFAULT_HEARTBEAT_INTERVAL_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SCHEMA, };
|
package/esm/index.d.ts
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* };
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
+
export { CursorTracker } from './cursor-tracker';
|
|
19
20
|
export { createRealtimeSubscriptionsPlugin, RealtimeSubscriptionsPlugin } from './plugin';
|
|
20
21
|
export { RealtimeSubscriptionsPreset } from './preset';
|
|
21
|
-
export { CursorTracker } from './cursor-tracker';
|
|
22
22
|
export { RealtimeManager } from './realtime-manager';
|
|
23
23
|
export type { RealtimeSubscriptionsPluginOptions } from './types';
|
|
24
|
-
export type {
|
|
24
|
+
export type { ChangeLogEntry, CursorTrackerOptions, Queryable, RealtimeManagerOptions, } from './types';
|
package/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* };
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
+
export { CursorTracker } from './cursor-tracker';
|
|
19
20
|
export { createRealtimeSubscriptionsPlugin, RealtimeSubscriptionsPlugin } from './plugin';
|
|
20
21
|
export { RealtimeSubscriptionsPreset } from './preset';
|
|
21
|
-
export { CursorTracker } from './cursor-tracker';
|
|
22
22
|
export { RealtimeManager } from './realtime-manager';
|
package/esm/plugin.d.ts
CHANGED
|
@@ -80,5 +80,5 @@ export declare function createRealtimeSubscriptionsPlugin(options?: RealtimeSubs
|
|
|
80
80
|
export { createRealtimeSubscriptionsPlugin as RealtimeSubscriptionsPlugin };
|
|
81
81
|
export { CursorTracker } from './cursor-tracker';
|
|
82
82
|
export { RealtimeManager } from './realtime-manager';
|
|
83
|
-
export type {
|
|
84
|
-
export {
|
|
83
|
+
export type { ChangeLogEntry, CursorTrackerOptions, Queryable, RealtimeManagerOptions } from './types';
|
|
84
|
+
export { DEFAULT_OVERFLOW_THRESHOLD, EventThrottle, parseNotifyPayload };
|
package/esm/plugin.js
CHANGED
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
* - When ids are provided, only events for those specific rows are delivered,
|
|
46
46
|
* preventing cross-tenant event leaks.
|
|
47
47
|
*/
|
|
48
|
-
import { context as grafastContext, listen, object, constant, lambda } from 'grafast';
|
|
49
|
-
import { extendSchema } from 'graphile-utils';
|
|
50
48
|
import { Logger } from '@pgpmjs/logger';
|
|
49
|
+
import { constant, context as grafastContext, lambda, listen, object } from 'grafast';
|
|
50
|
+
import { extendSchema } from 'graphile-utils';
|
|
51
51
|
const log = new Logger('graphile-realtime-subscriptions');
|
|
52
52
|
/** Default overflow threshold: events per second per table per subscriber */
|
|
53
53
|
const DEFAULT_OVERFLOW_THRESHOLD = 50;
|
|
@@ -262,4 +262,4 @@ export { createRealtimeSubscriptionsPlugin as RealtimeSubscriptionsPlugin };
|
|
|
262
262
|
export { CursorTracker } from './cursor-tracker';
|
|
263
263
|
export { RealtimeManager } from './realtime-manager';
|
|
264
264
|
// Exported for testing
|
|
265
|
-
export {
|
|
265
|
+
export { DEFAULT_OVERFLOW_THRESHOLD, EventThrottle, parseNotifyPayload };
|
package/esm/realtime-manager.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* };
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
+
export { CursorTracker } from './cursor-tracker';
|
|
19
20
|
export { createRealtimeSubscriptionsPlugin, RealtimeSubscriptionsPlugin } from './plugin';
|
|
20
21
|
export { RealtimeSubscriptionsPreset } from './preset';
|
|
21
|
-
export { CursorTracker } from './cursor-tracker';
|
|
22
22
|
export { RealtimeManager } from './realtime-manager';
|
|
23
23
|
export type { RealtimeSubscriptionsPluginOptions } from './types';
|
|
24
|
-
export type {
|
|
24
|
+
export type { ChangeLogEntry, CursorTrackerOptions, Queryable, RealtimeManagerOptions, } from './types';
|
package/index.js
CHANGED
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.RealtimeManager = exports.
|
|
21
|
+
exports.RealtimeManager = exports.RealtimeSubscriptionsPreset = exports.RealtimeSubscriptionsPlugin = exports.createRealtimeSubscriptionsPlugin = exports.CursorTracker = void 0;
|
|
22
|
+
var cursor_tracker_1 = require("./cursor-tracker");
|
|
23
|
+
Object.defineProperty(exports, "CursorTracker", { enumerable: true, get: function () { return cursor_tracker_1.CursorTracker; } });
|
|
22
24
|
var plugin_1 = require("./plugin");
|
|
23
25
|
Object.defineProperty(exports, "createRealtimeSubscriptionsPlugin", { enumerable: true, get: function () { return plugin_1.createRealtimeSubscriptionsPlugin; } });
|
|
24
26
|
Object.defineProperty(exports, "RealtimeSubscriptionsPlugin", { enumerable: true, get: function () { return plugin_1.RealtimeSubscriptionsPlugin; } });
|
|
25
27
|
var preset_1 = require("./preset");
|
|
26
28
|
Object.defineProperty(exports, "RealtimeSubscriptionsPreset", { enumerable: true, get: function () { return preset_1.RealtimeSubscriptionsPreset; } });
|
|
27
|
-
var cursor_tracker_1 = require("./cursor-tracker");
|
|
28
|
-
Object.defineProperty(exports, "CursorTracker", { enumerable: true, get: function () { return cursor_tracker_1.CursorTracker; } });
|
|
29
29
|
var realtime_manager_1 = require("./realtime-manager");
|
|
30
30
|
Object.defineProperty(exports, "RealtimeManager", { enumerable: true, get: function () { return realtime_manager_1.RealtimeManager; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-realtime-subscriptions",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "Realtime subscription plugin for PostGraphile v5 — per-table GraphQL subscriptions via LISTEN/NOTIFY",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"homepage": "https://github.com/constructive-io/constructive",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"url": "https://github.com/constructive-io/constructive/issues"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@pgpmjs/logger": "^2.23.
|
|
44
|
-
"@pgsql/quotes": "^18.
|
|
43
|
+
"@pgpmjs/logger": "^2.23.3",
|
|
44
|
+
"@pgsql/quotes": "^18.2.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"grafast": "1.0.2",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"@types/node": "^22.19.11",
|
|
57
57
|
"makage": "^0.3.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c20b6be96b39bf71c0e2df0f4b51e05deacd006b"
|
|
60
60
|
}
|
package/plugin.d.ts
CHANGED
|
@@ -80,5 +80,5 @@ export declare function createRealtimeSubscriptionsPlugin(options?: RealtimeSubs
|
|
|
80
80
|
export { createRealtimeSubscriptionsPlugin as RealtimeSubscriptionsPlugin };
|
|
81
81
|
export { CursorTracker } from './cursor-tracker';
|
|
82
82
|
export { RealtimeManager } from './realtime-manager';
|
|
83
|
-
export type {
|
|
84
|
-
export {
|
|
83
|
+
export type { ChangeLogEntry, CursorTrackerOptions, Queryable, RealtimeManagerOptions } from './types';
|
|
84
|
+
export { DEFAULT_OVERFLOW_THRESHOLD, EventThrottle, parseNotifyPayload };
|
package/plugin.js
CHANGED
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
* preventing cross-tenant event leaks.
|
|
48
48
|
*/
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.
|
|
50
|
+
exports.EventThrottle = exports.DEFAULT_OVERFLOW_THRESHOLD = exports.RealtimeManager = exports.CursorTracker = void 0;
|
|
51
51
|
exports.createRealtimeSubscriptionsPlugin = createRealtimeSubscriptionsPlugin;
|
|
52
52
|
exports.RealtimeSubscriptionsPlugin = createRealtimeSubscriptionsPlugin;
|
|
53
53
|
exports.parseNotifyPayload = parseNotifyPayload;
|
|
54
|
+
const logger_1 = require("@pgpmjs/logger");
|
|
54
55
|
const grafast_1 = require("grafast");
|
|
55
56
|
const graphile_utils_1 = require("graphile-utils");
|
|
56
|
-
const logger_1 = require("@pgpmjs/logger");
|
|
57
57
|
const log = new logger_1.Logger('graphile-realtime-subscriptions');
|
|
58
58
|
/** Default overflow threshold: events per second per table per subscriber */
|
|
59
59
|
const DEFAULT_OVERFLOW_THRESHOLD = 50;
|
package/realtime-manager.d.ts
CHANGED
package/realtime-manager.js
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
*/
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.RealtimeManager = void 0;
|
|
28
|
-
exports.extractRowId = extractRowId;
|
|
29
|
-
exports.entryToNotifyPayload = entryToNotifyPayload;
|
|
30
28
|
exports.entryToChannel = entryToChannel;
|
|
29
|
+
exports.entryToNotifyPayload = entryToNotifyPayload;
|
|
30
|
+
exports.extractRowId = extractRowId;
|
|
31
31
|
const logger_1 = require("@pgpmjs/logger");
|
|
32
32
|
const cursor_tracker_1 = require("./cursor-tracker");
|
|
33
33
|
const log = new logger_1.Logger('realtime-manager');
|