@forge/bridge 5.2.0 → 5.3.0-next.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/CHANGELOG.md +12 -0
- package/out/realtime/realtime.d.ts +6 -1
- package/out/realtime/realtime.d.ts.map +1 -1
- package/out/realtime/realtime.js +11 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/bridge
|
|
2
2
|
|
|
3
|
+
## 5.3.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8dfe9b9: Adds new subscribeGlobal and publishGlobal realtime bridge methods
|
|
8
|
+
|
|
9
|
+
## 5.3.0-next.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 331ccdf: Add message replay option to Realtime subscriptions
|
|
14
|
+
|
|
3
15
|
## 5.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export interface SubscriptionOptions {
|
|
2
|
+
replay?: number;
|
|
3
|
+
}
|
|
1
4
|
export declare const __realtime: {
|
|
2
5
|
publish: (channel: string, payload: any) => Promise<void>;
|
|
3
|
-
subscribe: (channel: string, callback: (payload?: any) => any) => Promise<void>;
|
|
6
|
+
subscribe: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
|
|
7
|
+
publishGlobal: (channel: string, payload: any) => Promise<void>;
|
|
8
|
+
subscribeGlobal: (channel: string, callback: (payload?: any) => any, options?: SubscriptionOptions) => Promise<void>;
|
|
4
9
|
};
|
|
5
10
|
//# sourceMappingURL=realtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwBD,eAAO,MAAM,UAAU;uBApBG,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;yBAIlC,MAAM,uBAAuB,GAAG,KAAK,GAAG,YAAY,mBAAmB,KAAG,QAAQ,IAAI,CAAC;6BAInF,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;+BAKzD,MAAM,uBACM,GAAG,KAAK,GAAG,YACtB,mBAAmB,KAC5B,QAAQ,IAAI,CAAC;CASf,CAAC"}
|
package/out/realtime/realtime.js
CHANGED
|
@@ -6,10 +6,18 @@ const callBridge = (0, bridge_1.getCallBridge)();
|
|
|
6
6
|
const publish = (channel, payload) => {
|
|
7
7
|
return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload });
|
|
8
8
|
};
|
|
9
|
-
const subscribe = (channel, callback) => {
|
|
10
|
-
return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback });
|
|
9
|
+
const subscribe = (channel, callback, options) => {
|
|
10
|
+
return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options });
|
|
11
|
+
};
|
|
12
|
+
const publishGlobal = (channel, payload) => {
|
|
13
|
+
return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload, isGlobal: true });
|
|
14
|
+
};
|
|
15
|
+
const subscribeGlobal = (channel, callback, options) => {
|
|
16
|
+
return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback, options, isGlobal: true });
|
|
11
17
|
};
|
|
12
18
|
exports.__realtime = {
|
|
13
19
|
publish,
|
|
14
|
-
subscribe
|
|
20
|
+
subscribe,
|
|
21
|
+
publishGlobal,
|
|
22
|
+
subscribeGlobal
|
|
15
23
|
};
|