@forge/realtime 0.4.1 → 0.4.2-next.0-experimental-4a332af
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 +13 -0
- package/out/publish.d.ts.map +1 -1
- package/out/publish.js +8 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @forge/realtime
|
|
2
2
|
|
|
3
|
+
## 0.4.2-next.0-experimental-4a332af
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4c69f6e: Add headers for rate limits
|
|
8
|
+
- aa757af: Module add
|
|
9
|
+
|
|
10
|
+
## 0.4.2-next.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 4c69f6e: Add headers for rate limits
|
|
15
|
+
|
|
3
16
|
## 0.4.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/out/publish.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BlD,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,OAAO,mDACL,MAAM,sCAET,cAAc;;;;;;;;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BlD,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,OAAO,mDACL,MAAM,sCAET,cAAc;;;;;;;;EA4EzB,CAAC;AAEF,eAAO,MAAM,aAAa,mDACX,MAAM,sCAET,cAAc;;;;;;;;EAgEzB,CAAC"}
|
package/out/publish.js
CHANGED
|
@@ -54,7 +54,9 @@ const publish = async (channelName, eventPayload, options) => {
|
|
|
54
54
|
errors: [],
|
|
55
55
|
headers: {
|
|
56
56
|
'Content-Type': 'application/json',
|
|
57
|
-
'x-forge-context-token': realtime?.contextToken
|
|
57
|
+
'x-forge-context-token': realtime?.contextToken,
|
|
58
|
+
'x-rate-limit-app-id': appContext.appId,
|
|
59
|
+
'x-rate-limit-installation-id': appContext.installationId
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
(0, utils_1.handleProxyResponseErrors)(response);
|
|
@@ -86,7 +88,7 @@ const publish = async (channelName, eventPayload, options) => {
|
|
|
86
88
|
};
|
|
87
89
|
exports.publish = publish;
|
|
88
90
|
const publishGlobal = async (channelName, eventPayload, options) => {
|
|
89
|
-
const { appContext } = (0, runtime_1.__getRuntime)();
|
|
91
|
+
const { appContext, realtime } = (0, runtime_1.__getRuntime)();
|
|
90
92
|
const response = await global.__forge_fetch__({
|
|
91
93
|
type: 'realtime'
|
|
92
94
|
}, '/', {
|
|
@@ -103,7 +105,10 @@ const publishGlobal = async (channelName, eventPayload, options) => {
|
|
|
103
105
|
}),
|
|
104
106
|
errors: [],
|
|
105
107
|
headers: {
|
|
106
|
-
'Content-Type': 'application/json'
|
|
108
|
+
'Content-Type': 'application/json',
|
|
109
|
+
'x-forge-context-token': realtime?.contextToken,
|
|
110
|
+
'x-rate-limit-app-id': appContext.appId,
|
|
111
|
+
'x-rate-limit-installation-id': appContext.installationId
|
|
107
112
|
}
|
|
108
113
|
});
|
|
109
114
|
(0, utils_1.handleProxyResponseErrors)(response);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/realtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2-next.0-experimental-4a332af",
|
|
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": "^7.2.1",
|
|
17
|
+
"@forge/api": "^7.2.1-experimental-4a332af",
|
|
18
18
|
"@types/node": "20.19.1"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|