@livedesk/hub 0.1.73 → 0.1.74
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/package.json +1 -1
- package/src/plan-device-access.test.mjs +10 -4
- package/src/server.js +1 -1
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const clients = [6, 3, 1, 5, 2, 4].map(slotNumber => ({
|
|
|
15
15
|
}));
|
|
16
16
|
|
|
17
17
|
test('Hub and browser choose the same stable Free, Plus, Pro, and Team device owners', () => {
|
|
18
|
-
for (const limit of [5,
|
|
18
|
+
for (const limit of [5, 20, 50, Number.POSITIVE_INFINITY]) {
|
|
19
19
|
assert.deepEqual(
|
|
20
20
|
stableHubPlanAllowedDeviceIds(clients, limit),
|
|
21
21
|
stableBrowserPlanAllowedDeviceIds(clients, limit)
|
|
@@ -27,15 +27,21 @@ test('Hub and browser choose the same stable Free, Plus, Pro, and Team device ow
|
|
|
27
27
|
);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
test('Plus stops at
|
|
30
|
+
test('Plus stops at 20 Clients, Pro stops at 50, and Team remains unbounded', () => {
|
|
31
31
|
const manyClients = Array.from({ length: 51 }, (_, index) => ({
|
|
32
32
|
deviceId: `client-${index + 1}`,
|
|
33
33
|
slotNumber: index + 1,
|
|
34
34
|
connected: true
|
|
35
35
|
}));
|
|
36
36
|
|
|
37
|
-
assert.equal(createPlanDeviceAccessSnapshot(manyClients,
|
|
38
|
-
assert.equal(createPlanDeviceAccessSnapshot(manyClients,
|
|
37
|
+
assert.equal(createPlanDeviceAccessSnapshot(manyClients, 20).allowedDeviceIds.length, 20);
|
|
38
|
+
assert.equal(createPlanDeviceAccessSnapshot(manyClients, 20).blockedDeviceIds.length, 31);
|
|
39
|
+
const plus = createPlanDeviceAccessSnapshot(manyClients, 20);
|
|
40
|
+
assert.equal(plus.allowedDeviceIdSet.has('client-20'), true);
|
|
41
|
+
assert.equal(plus.allowedDeviceIdSet.has('client-21'), false);
|
|
42
|
+
assert.deepEqual(partitionPlanDeviceIds(['client-20', 'client-21'], plus), {
|
|
43
|
+
allowedDeviceIds: ['client-20'], blockedDeviceIds: ['client-21']
|
|
44
|
+
});
|
|
39
45
|
assert.equal(createPlanDeviceAccessSnapshot(manyClients, 50).allowedDeviceIds.length, 50);
|
|
40
46
|
assert.deepEqual(createPlanDeviceAccessSnapshot(manyClients, 50).blockedDeviceIds, ['client-51']);
|
|
41
47
|
assert.equal(
|
package/src/server.js
CHANGED
|
@@ -178,7 +178,7 @@ const atlasPool = new Mode4AtlasPool({
|
|
|
178
178
|
const inputClients = new Set();
|
|
179
179
|
const audioClients = new Set();
|
|
180
180
|
const FREE_DEVICE_LIMIT = 5;
|
|
181
|
-
const PLUS_DEVICE_LIMIT =
|
|
181
|
+
const PLUS_DEVICE_LIMIT = 20;
|
|
182
182
|
const PRO_DEVICE_LIMIT = 50;
|
|
183
183
|
const LICENSE_VERIFY_MAX_AGE_MS = 6 * 60 * 60 * 1000;
|
|
184
184
|
const ROLE_TRANSITION_EXIT_CODE = 43;
|