@hocuspocus/extension-webhook 3.2.5 → 3.2.6

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.
@@ -1,4 +1,4 @@
1
- import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, beforeBroadcastStatelessPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onDisconnectPayload, onStoreDocumentPayload } from "@hocuspocus/server";
1
+ import type { Extension, Hocuspocus, afterLoadDocumentPayload, afterStoreDocumentPayload, afterUnloadDocumentPayload, beforeBroadcastStatelessPayload, beforeUnloadDocumentPayload, onAwarenessUpdatePayload, onChangePayload, onConfigurePayload, onStoreDocumentPayload } from "@hocuspocus/server";
2
2
  import { type ExecutionResult, type Lock, Redlock } from "@sesamecare-oss/redlock";
3
3
  import type { Cluster, ClusterNode, ClusterOptions, RedisOptions } from "ioredis";
4
4
  import RedisClient from "ioredis";
@@ -67,11 +67,6 @@ export declare class Redis implements Extension {
67
67
  release?: Promise<ExecutionResult>;
68
68
  }>;
69
69
  messagePrefix: Buffer;
70
- /**
71
- * When we have a high frequency of updates to a document we don't need tons of setTimeouts
72
- * piling up, so we'll track them to keep it to the most recent per document.
73
- */
74
- private pendingDisconnects;
75
70
  private pendingAfterStoreDocumentResolves;
76
71
  constructor(configuration: Partial<Configuration>);
77
72
  onConfigure({ instance }: onConfigurePayload): Promise<void>;
@@ -117,10 +112,10 @@ export declare class Redis implements Extension {
117
112
  */
118
113
  onChange(data: onChangePayload): Promise<any>;
119
114
  /**
120
- * Make sure to *not* listen for further changes, when there’s
121
- * no one connected anymore.
115
+ * Delay unloading to allow syncs to finish
122
116
  */
123
- onDisconnect: ({ documentName }: onDisconnectPayload) => Promise<void>;
117
+ beforeUnloadDocument(data: beforeUnloadDocumentPayload): Promise<void>;
118
+ afterUnloadDocument(data: afterUnloadDocumentPayload): Promise<void>;
124
119
  beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise<number>;
125
120
  /**
126
121
  * Kill the Redlock connection immediately.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hocuspocus/extension-webhook",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "hocuspocus webhook extension",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
@@ -30,9 +30,9 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
- "@hocuspocus/common": "^3.2.5",
34
- "@hocuspocus/server": "^3.2.5",
35
- "@hocuspocus/transformer": "^3.2.5",
33
+ "@hocuspocus/common": "^3.2.6",
34
+ "@hocuspocus/server": "^3.2.6",
35
+ "@hocuspocus/transformer": "^3.2.6",
36
36
  "axios": "^1.12.2"
37
37
  },
38
38
  "peerDependencies": {