@rool-dev/extension 0.3.10-dev.65d6b10 → 0.3.11-dev.22c312e
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/dist/dev/host-shell.js +22 -6
- package/dist/dev/host-shell.js.map +1 -1
- package/package.json +2 -2
package/dist/dev/host-shell.js
CHANGED
|
@@ -5352,6 +5352,7 @@ var GraphQLClient = class {
|
|
|
5352
5352
|
createdAt
|
|
5353
5353
|
updatedAt
|
|
5354
5354
|
linkAccess
|
|
5355
|
+
memberCount
|
|
5355
5356
|
}
|
|
5356
5357
|
}
|
|
5357
5358
|
`)).listSpaces;
|
|
@@ -5363,6 +5364,7 @@ var GraphQLClient = class {
|
|
|
5363
5364
|
name
|
|
5364
5365
|
role
|
|
5365
5366
|
linkAccess
|
|
5367
|
+
memberCount
|
|
5366
5368
|
channels {
|
|
5367
5369
|
id
|
|
5368
5370
|
name
|
|
@@ -6505,7 +6507,7 @@ function toAsyncIterable(val) {
|
|
|
6505
6507
|
var INITIAL_RECONNECT_DELAY = 1e3;
|
|
6506
6508
|
var MAX_RECONNECT_DELAY = 3e4;
|
|
6507
6509
|
var RECONNECT_MULTIPLIER = 2;
|
|
6508
|
-
var HEARTBEAT_TIMEOUT =
|
|
6510
|
+
var HEARTBEAT_TIMEOUT = 15e3;
|
|
6509
6511
|
var ClientSubscriptionManager = class {
|
|
6510
6512
|
config;
|
|
6511
6513
|
client = null;
|
|
@@ -6679,7 +6681,8 @@ var ClientSubscriptionManager = class {
|
|
|
6679
6681
|
createdAt: raw.createdAt,
|
|
6680
6682
|
updatedAt: raw.updatedAt,
|
|
6681
6683
|
role: raw.role,
|
|
6682
|
-
linkAccess: raw.linkAccess
|
|
6684
|
+
linkAccess: raw.linkAccess,
|
|
6685
|
+
memberCount: raw.memberCount
|
|
6683
6686
|
};
|
|
6684
6687
|
case "user_storage_changed": return {
|
|
6685
6688
|
type,
|
|
@@ -8339,6 +8342,7 @@ var RoolSpace = class {
|
|
|
8339
8342
|
_name;
|
|
8340
8343
|
_role;
|
|
8341
8344
|
_linkAccess;
|
|
8345
|
+
_memberCount;
|
|
8342
8346
|
_channels;
|
|
8343
8347
|
graphqlClient;
|
|
8344
8348
|
mediaClient;
|
|
@@ -8348,6 +8352,7 @@ var RoolSpace = class {
|
|
|
8348
8352
|
this._name = config.name;
|
|
8349
8353
|
this._role = config.role;
|
|
8350
8354
|
this._linkAccess = config.linkAccess;
|
|
8355
|
+
this._memberCount = config.memberCount;
|
|
8351
8356
|
this._channels = config.channels;
|
|
8352
8357
|
this.graphqlClient = config.graphqlClient;
|
|
8353
8358
|
this.mediaClient = config.mediaClient;
|
|
@@ -8365,6 +8370,12 @@ var RoolSpace = class {
|
|
|
8365
8370
|
get linkAccess() {
|
|
8366
8371
|
return this._linkAccess;
|
|
8367
8372
|
}
|
|
8373
|
+
get memberCount() {
|
|
8374
|
+
return this._memberCount;
|
|
8375
|
+
}
|
|
8376
|
+
get isPrivate() {
|
|
8377
|
+
return this._linkAccess === "none" && this._memberCount === 1;
|
|
8378
|
+
}
|
|
8368
8379
|
/**
|
|
8369
8380
|
* Open a channel on this space.
|
|
8370
8381
|
* If the channel doesn't exist, the server creates it.
|
|
@@ -8443,10 +8454,11 @@ var RoolSpace = class {
|
|
|
8443
8454
|
* Updates name, role, linkAccess, and channel list.
|
|
8444
8455
|
*/
|
|
8445
8456
|
async refresh() {
|
|
8446
|
-
const { name, role, linkAccess, channels } = await this.graphqlClient.openSpace(this._id);
|
|
8457
|
+
const { name, role, linkAccess, memberCount, channels } = await this.graphqlClient.openSpace(this._id);
|
|
8447
8458
|
this._name = name;
|
|
8448
8459
|
this._role = role;
|
|
8449
8460
|
this._linkAccess = linkAccess;
|
|
8461
|
+
this._memberCount = memberCount;
|
|
8450
8462
|
this._channels = channels;
|
|
8451
8463
|
}
|
|
8452
8464
|
};
|
|
@@ -8649,12 +8661,13 @@ var RoolClient = class extends EventEmitter {
|
|
|
8649
8661
|
* To work with objects and AI, call space.openChannel(channelId).
|
|
8650
8662
|
*/
|
|
8651
8663
|
async openSpace(spaceId) {
|
|
8652
|
-
const { name, role, linkAccess, channels } = await this.graphqlClient.openSpace(spaceId);
|
|
8664
|
+
const { name, role, linkAccess, memberCount, channels } = await this.graphqlClient.openSpace(spaceId);
|
|
8653
8665
|
return new RoolSpace({
|
|
8654
8666
|
id: spaceId,
|
|
8655
8667
|
name,
|
|
8656
8668
|
role,
|
|
8657
8669
|
linkAccess,
|
|
8670
|
+
memberCount,
|
|
8658
8671
|
channels,
|
|
8659
8672
|
graphqlClient: this.graphqlClient,
|
|
8660
8673
|
mediaClient: this.mediaClient,
|
|
@@ -8674,6 +8687,7 @@ var RoolClient = class extends EventEmitter {
|
|
|
8674
8687
|
name,
|
|
8675
8688
|
role: "owner",
|
|
8676
8689
|
linkAccess: "none",
|
|
8690
|
+
memberCount: 1,
|
|
8677
8691
|
channels: [],
|
|
8678
8692
|
graphqlClient: this.graphqlClient,
|
|
8679
8693
|
mediaClient: this.mediaClient,
|
|
@@ -8905,7 +8919,8 @@ var RoolClient = class extends EventEmitter {
|
|
|
8905
8919
|
size: event.size ?? 0,
|
|
8906
8920
|
createdAt: event.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
8907
8921
|
updatedAt: event.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
8908
|
-
linkAccess: "none"
|
|
8922
|
+
linkAccess: "none",
|
|
8923
|
+
memberCount: 1
|
|
8909
8924
|
});
|
|
8910
8925
|
break;
|
|
8911
8926
|
case "space_deleted":
|
|
@@ -8924,7 +8939,8 @@ var RoolClient = class extends EventEmitter {
|
|
|
8924
8939
|
size: event.size,
|
|
8925
8940
|
createdAt: event.createdAt,
|
|
8926
8941
|
updatedAt: event.updatedAt,
|
|
8927
|
-
linkAccess: event.linkAccess
|
|
8942
|
+
linkAccess: event.linkAccess,
|
|
8943
|
+
memberCount: event.memberCount
|
|
8928
8944
|
});
|
|
8929
8945
|
break;
|
|
8930
8946
|
case "user_storage_changed":
|