@forge/bridge 5.0.0 → 5.0.1-next.0

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @forge/bridge
2
2
 
3
+ ## 5.0.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 6a07b64: Add Realtime module
8
+
3
9
  ## 5.0.0
4
10
 
5
11
  ### Major Changes
package/out/index.d.ts CHANGED
@@ -7,5 +7,6 @@ export * from './modal';
7
7
  export * from './fetch';
8
8
  export * from './flag';
9
9
  export * from './events';
10
+ export * from './realtime';
10
11
  export * as i18n from './i18n';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC"}
package/out/index.js CHANGED
@@ -12,4 +12,5 @@ tslib_1.__exportStar(require("./modal"), exports);
12
12
  tslib_1.__exportStar(require("./fetch"), exports);
13
13
  tslib_1.__exportStar(require("./flag"), exports);
14
14
  tslib_1.__exportStar(require("./events"), exports);
15
+ tslib_1.__exportStar(require("./realtime"), exports);
15
16
  exports.i18n = tslib_1.__importStar(require("./i18n"));
@@ -0,0 +1,2 @@
1
+ export * from './realtime';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/realtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./realtime"), exports);
@@ -0,0 +1,5 @@
1
+ export declare const __realtime: {
2
+ publish: (channel: string, payload: any) => Promise<void>;
3
+ subscribe: (channel: string, callback: (payload?: any) => any) => Promise<void>;
4
+ };
5
+ //# sourceMappingURL=realtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/realtime/realtime.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU;uBARG,MAAM,WAAW,GAAG,KAAG,QAAQ,IAAI,CAAC;yBAIlC,MAAM,uBAAuB,GAAG,KAAK,GAAG,KAAG,QAAQ,IAAI,CAAC;CAOnF,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.__realtime = void 0;
4
+ const bridge_1 = require("../bridge");
5
+ const callBridge = (0, bridge_1.getCallBridge)();
6
+ const publish = (channel, payload) => {
7
+ return callBridge('publishRealtimeChannel', { channelName: channel, eventPayload: payload });
8
+ };
9
+ const subscribe = (channel, callback) => {
10
+ return callBridge('subscribeRealtimeChannel', { channelName: channel, onEvent: callback });
11
+ };
12
+ exports.__realtime = {
13
+ publish,
14
+ subscribe
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bridge",
3
- "version": "5.0.0",
3
+ "version": "5.0.1-next.0",
4
4
  "description": "Forge bridge API for custom UI apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",