@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/README.md
CHANGED
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
|
|
|
33
33
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.2.0"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -622,7 +622,7 @@ class Client {
|
|
|
622
622
|
'x-sdk-name': 'Console',
|
|
623
623
|
'x-sdk-platform': 'console',
|
|
624
624
|
'x-sdk-language': 'web',
|
|
625
|
-
'x-sdk-version': '15.
|
|
625
|
+
'x-sdk-version': '15.2.0',
|
|
626
626
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
627
627
|
};
|
|
628
628
|
this.realtime = {
|
|
@@ -674,7 +674,10 @@ class Client {
|
|
|
674
674
|
}
|
|
675
675
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
676
676
|
// URL carries only the project; channels/queries are sent via subscribe message.
|
|
677
|
-
|
|
677
|
+
let queryParams = 'project=' + encodedProject;
|
|
678
|
+
if (this.config.jwt) {
|
|
679
|
+
queryParams += '&jwt=' + encodeURIComponent(this.config.jwt);
|
|
680
|
+
}
|
|
678
681
|
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
679
682
|
if (url !== this.realtime.url || // Check if URL is present
|
|
680
683
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -36795,7 +36798,11 @@ class Realtime {
|
|
|
36795
36798
|
throw new AppwriteException('Missing project ID');
|
|
36796
36799
|
}
|
|
36797
36800
|
// URL carries only the project; channels/queries are sent via the subscribe message.
|
|
36798
|
-
|
|
36801
|
+
let queryParams = `project=${projectId}`;
|
|
36802
|
+
const jwt = this.client.config.jwt;
|
|
36803
|
+
if (jwt) {
|
|
36804
|
+
queryParams += `&jwt=${encodeURIComponent(jwt)}`;
|
|
36805
|
+
}
|
|
36799
36806
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
36800
36807
|
? this.client.config.endpointRealtime
|
|
36801
36808
|
: this.client.config.endpoint || '';
|