@appwrite.io/console 15.1.1 → 15.2.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/README.md +1 -1
- package/dist/cjs/sdk.js +10 -3
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +10 -3
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +10 -3
- package/package.json +1 -1
- package/types/services/usage.d.ts +2 -2
package/dist/esm/sdk.js
CHANGED
|
@@ -620,7 +620,7 @@ class Client {
|
|
|
620
620
|
'x-sdk-name': 'Console',
|
|
621
621
|
'x-sdk-platform': 'console',
|
|
622
622
|
'x-sdk-language': 'web',
|
|
623
|
-
'x-sdk-version': '15.
|
|
623
|
+
'x-sdk-version': '15.2.0',
|
|
624
624
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
625
625
|
};
|
|
626
626
|
this.realtime = {
|
|
@@ -672,7 +672,10 @@ class Client {
|
|
|
672
672
|
}
|
|
673
673
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
674
674
|
// URL carries only the project; channels/queries are sent via subscribe message.
|
|
675
|
-
|
|
675
|
+
let queryParams = 'project=' + encodedProject;
|
|
676
|
+
if (this.config.jwt) {
|
|
677
|
+
queryParams += '&jwt=' + encodeURIComponent(this.config.jwt);
|
|
678
|
+
}
|
|
676
679
|
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
677
680
|
if (url !== this.realtime.url || // Check if URL is present
|
|
678
681
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -36793,7 +36796,11 @@ class Realtime {
|
|
|
36793
36796
|
throw new AppwriteException('Missing project ID');
|
|
36794
36797
|
}
|
|
36795
36798
|
// URL carries only the project; channels/queries are sent via the subscribe message.
|
|
36796
|
-
|
|
36799
|
+
let queryParams = `project=${projectId}`;
|
|
36800
|
+
const jwt = this.client.config.jwt;
|
|
36801
|
+
if (jwt) {
|
|
36802
|
+
queryParams += `&jwt=${encodeURIComponent(jwt)}`;
|
|
36803
|
+
}
|
|
36797
36804
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
36798
36805
|
? this.client.config.endpointRealtime
|
|
36799
36806
|
: this.client.config.endpoint || '';
|