Skip to content

Commit 12cfc77

Browse files
committed
fixes
1 parent 758106c commit 12cfc77

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Determine release tag
2424
id: release_tag
2525
run: |
26-
if [[ "$" == *"-rc"* ]]; then
26+
if [[ "${{ github.ref }}" == *"-rc"* ]]; then
2727
echo "tag=next" >> "$GITHUB_OUTPUT"
2828
else
2929
echo "tag=latest" >> "$GITHUB_OUTPUT"
@@ -37,6 +37,6 @@ jobs:
3737
3838
# Publish to NPM with the appropriate tag
3939
- name: Publish
40-
run: npm publish --tag $
40+
run: npm publish --tag ${{ steps.release_tag.outputs.tag }}
4141
env:
4242
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/client.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ class Client {
238238
}
239239
},
240240
createSocket: () => {
241-
if (this.realtime.channels.size < 1) return;
241+
if (this.realtime.channels.size < 1) {
242+
this.realtime.reconnect = false;
243+
this.realtime.socket?.close();
244+
return;
245+
}
242246

243247
const channels = new URLSearchParams();
244248
channels.set('project', this.config.project);
@@ -382,7 +386,6 @@ class Client {
382386
async call(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<any> {
383387
method = method.toUpperCase();
384388

385-
386389
headers = Object.assign({}, this.headers, headers);
387390
headers.Origin = `appwrite-${Platform.OS}://${this.config.platform}`
388391

@@ -455,6 +458,4 @@ class Client {
455458
}
456459

457460
export { Client, AppwriteException };
458-
export { Query } from './query';
459461
export type { Models, Payload };
460-
export type { QueryTypes, QueryTypesList } from './query';

src/enums/image-gravity.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export enum ImageGravity {
22
Center = 'center',
3-
Topleft = 'top-left',
3+
TopLeft = 'top-left',
44
Top = 'top',
5-
Topright = 'top-right',
5+
TopRight = 'top-right',
66
Left = 'left',
77
Right = 'right',
8-
Bottomleft = 'bottom-left',
8+
BottomLeft = 'bottom-left',
99
Bottom = 'bottom',
10-
Bottomright = 'bottom-right',
10+
BottomRight = 'bottom-right',
1111
}

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { Client, Query, AppwriteException } from './client';
1+
export { Client, AppwriteException } from './client';
22
export { Account } from './services/account';
33
export { Avatars } from './services/avatars';
44
export { Databases } from './services/databases';
@@ -10,6 +10,7 @@ export { Storage } from './services/storage';
1010
export { Teams } from './services/teams';
1111
export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
1212
export type { QueryTypes, QueryTypesList } from './query';
13+
export { Query } from './query';
1314
export { Permission } from './permission';
1415
export { Role } from './role';
1516
export { ID } from './id';

0 commit comments

Comments
 (0)