@forge/realtime 0.0.4-next.4 → 0.0.5-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 +16 -0
- package/package.json +2 -2
- package/src/publish.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @forge/realtime
|
|
2
2
|
|
|
3
|
+
## 0.0.5-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 75203c4: Enabled realtime use for Forge apps deployed in non-production environments
|
|
8
|
+
|
|
9
|
+
## 0.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 7abca30: Remove SDK dependency on @atlassian/ari
|
|
14
|
+
- 67430e8: Fix tests
|
|
15
|
+
- c1bd0a4: Throw error when publish request fails
|
|
16
|
+
- e118b07: Remove remnants of sandbox runtime
|
|
17
|
+
- 91ee02a: Fix tests
|
|
18
|
+
|
|
3
19
|
## 0.0.4-next.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/realtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-next.0",
|
|
4
4
|
"description": "Forge realtime",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@atlassian/metrics-interface": "4.0.0",
|
|
17
|
-
"@forge/api": "6.0.
|
|
17
|
+
"@forge/api": "6.0.3-next.0",
|
|
18
18
|
"@types/node": "20.19.1"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
package/src/publish.ts
CHANGED
|
@@ -13,6 +13,11 @@ export const handleProxyResponseErrors = (response: Response): void => {
|
|
|
13
13
|
export const publish = async (channelName: string, eventPayload: string) => {
|
|
14
14
|
const { contextAri, appContext } = __getRuntime();
|
|
15
15
|
|
|
16
|
+
if (appContext?.environmentType === 'PRODUCTION') {
|
|
17
|
+
throw new Error(
|
|
18
|
+
'Forge realtime usage is restricted to Forge apps in a non-production environment. Please see https://developer.atlassian.com/platform/forge/cli-reference/environments/ for reference on Forge app environments.'
|
|
19
|
+
);
|
|
20
|
+
}
|
|
16
21
|
// Do not change the whitespace of the context object it has to be this exactly to match https://bitbucket.org/atlassian/app-client-events-service/src/master/
|
|
17
22
|
const graphqlBody = `mutation publishRealtimeChannel(
|
|
18
23
|
$installationId: ID!
|