insite-users-client 1.0.26 → 1.0.28
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/bun.lockb +0 -0
- package/lib/orgs.js +2 -3
- package/lib/users.js +6 -3
- package/package.json +28 -27
package/README.md
CHANGED
package/bun.lockb
ADDED
|
Binary file
|
package/lib/orgs.js
CHANGED
|
@@ -18,9 +18,8 @@ export function handleOrgs(updated) {
|
|
|
18
18
|
org.users = Object.assign(new Set(), { sorted: [] });
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
nullOrgUsers.sorted.length = 0;
|
|
21
|
+
this.values.orgs.null.users.clear();
|
|
22
|
+
this.values.orgs.null.users.sorted.length = 0;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
}
|
package/lib/users.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { removeOne } from "@nesvet/n";
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
/** @this UsersSubscriptionGroup */
|
|
2
5
|
export function handleUsers(updated) {
|
|
3
6
|
if (updated) {
|
|
@@ -29,7 +32,7 @@ export function handleUsers(updated) {
|
|
|
29
32
|
if (user.org !== org) {
|
|
30
33
|
if (user.org) {
|
|
31
34
|
user.org.users.delete(user);
|
|
32
|
-
user.org.users.sorted
|
|
35
|
+
removeOne(user.org.users.sorted, user);
|
|
33
36
|
}
|
|
34
37
|
user.org = org;
|
|
35
38
|
user.org.users.add(user);
|
|
@@ -47,11 +50,11 @@ export function handleUsers(updated) {
|
|
|
47
50
|
org.users.sorted.sort(users.sortCompareFunction);
|
|
48
51
|
|
|
49
52
|
if (updated.deleted.length)
|
|
50
|
-
for (const org of orgs.sorted)
|
|
53
|
+
for (const org of [ ...orgs.sorted, orgs.null ])
|
|
51
54
|
for (const user of org.users)
|
|
52
55
|
if (!users.has(user._id)) {
|
|
53
56
|
org.users.delete(user);
|
|
54
|
-
org.users.sorted
|
|
57
|
+
removeOne(org.users.sorted, user);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
if (this.isLoaded) {
|
package/package.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
"name": "insite-users-client",
|
|
3
|
+
"version": "1.0.28",
|
|
4
|
+
"description": "inSite users client side",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"module": "./lib/index.js",
|
|
8
|
+
"packageManager": "bun@1.1.12",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/nesvet/insite-users-client.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"insite",
|
|
18
|
+
"users",
|
|
19
|
+
"client"
|
|
20
|
+
],
|
|
21
|
+
"author": "Eugene Nesvetaev <dev@nesvet.dev> (https://nesvet.dev/)",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@nesvet/n": "^1.0.60",
|
|
25
|
+
"insite-subscriptions-client": "^1.0.295"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@nesvet/eslint-config": "^1.1.0"
|
|
29
|
+
}
|
|
29
30
|
}
|