@tachybase/plugin-online-user 1.3.20 → 1.3.22

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.
@@ -1,10 +1,9 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.20",
4
- "@tachybase/schema": "1.3.20",
3
+ "@tachybase/client": "1.3.22",
4
+ "@tachybase/schema": "1.3.39",
5
5
  "antd": "5.22.5",
6
6
  "lodash": "4.17.21",
7
- "@tachybase/server": "1.3.20",
8
- "@tachybase/utils": "1.3.20",
7
+ "@tego/server": "1.3.39",
9
8
  "jsonwebtoken": "8.5.1"
10
9
  };
@@ -1 +1 @@
1
- {"name":"redis","description":"A modern, high performance Redis client","version":"4.7.0","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","files":["dist/"],"workspaces":["./packages/*"],"scripts":{"test":"npm run test -ws --if-present","build:client":"npm run build -w ./packages/client","build:test-utils":"npm run build -w ./packages/test-utils","build:tests-tools":"npm run build:client && npm run build:test-utils","build:modules":"find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'client' ! -name 'test-utils' -exec npm run build -w {} \\;","build":"tsc","build-all":"npm run build:client && npm run build:test-utils && npm run build:modules && npm run build","documentation":"npm run documentation -ws --if-present","gh-pages":"gh-pages -d ./documentation -e ./documentation -u 'documentation-bot <documentation@bot>'"},"dependencies":{"@redis/bloom":"1.2.0","@redis/client":"1.6.0","@redis/graph":"1.1.1","@redis/json":"1.0.7","@redis/search":"1.2.0","@redis/time-series":"1.1.0"},"devDependencies":{"@tsconfig/node14":"^14.1.0","gh-pages":"^6.0.0","release-it":"^16.1.5","typescript":"^5.2.2"},"repository":{"type":"git","url":"git://github.com/redis/node-redis.git"},"bugs":{"url":"https://github.com/redis/node-redis/issues"},"homepage":"https://github.com/redis/node-redis","keywords":["redis"],"_lastModified":"2025-07-24T06:29:13.472Z"}
1
+ {"name":"redis","description":"A modern, high performance Redis client","version":"4.7.0","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","files":["dist/"],"workspaces":["./packages/*"],"scripts":{"test":"npm run test -ws --if-present","build:client":"npm run build -w ./packages/client","build:test-utils":"npm run build -w ./packages/test-utils","build:tests-tools":"npm run build:client && npm run build:test-utils","build:modules":"find ./packages -mindepth 1 -maxdepth 1 -type d ! -name 'client' ! -name 'test-utils' -exec npm run build -w {} \\;","build":"tsc","build-all":"npm run build:client && npm run build:test-utils && npm run build:modules && npm run build","documentation":"npm run documentation -ws --if-present","gh-pages":"gh-pages -d ./documentation -e ./documentation -u 'documentation-bot <documentation@bot>'"},"dependencies":{"@redis/bloom":"1.2.0","@redis/client":"1.6.0","@redis/graph":"1.1.1","@redis/json":"1.0.7","@redis/search":"1.2.0","@redis/time-series":"1.1.0"},"devDependencies":{"@tsconfig/node14":"^14.1.0","gh-pages":"^6.0.0","release-it":"^16.1.5","typescript":"^5.2.2"},"repository":{"type":"git","url":"git://github.com/redis/node-redis.git"},"bugs":{"url":"https://github.com/redis/node-redis/issues"},"homepage":"https://github.com/redis/node-redis","keywords":["redis"],"_lastModified":"2025-07-29T06:20:53.272Z"}
@@ -1 +1 @@
1
- {"name":"ws","version":"8.18.0","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","keywords":["HyBi","Push","RFC-6455","WebSocket","WebSockets","real-time"],"homepage":"https://github.com/websockets/ws","bugs":"https://github.com/websockets/ws/issues","repository":{"type":"git","url":"git+https://github.com/websockets/ws.git"},"author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","license":"MIT","main":"index.js","exports":{".":{"browser":"./browser.js","import":"./wrapper.mjs","require":"./index.js"},"./package.json":"./package.json"},"browser":"browser.js","engines":{"node":">=10.0.0"},"files":["browser.js","index.js","lib/*.js","wrapper.mjs"],"scripts":{"test":"nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js","integration":"mocha --throw-deprecation test/*.integration.js","lint":"eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""},"peerDependencies":{"bufferutil":"^4.0.1","utf-8-validate":">=5.0.2"},"peerDependenciesMeta":{"bufferutil":{"optional":true},"utf-8-validate":{"optional":true}},"devDependencies":{"benchmark":"^2.1.4","bufferutil":"^4.0.1","eslint":"^9.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","globals":"^15.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"2025-07-24T06:29:13.732Z"}
1
+ {"name":"ws","version":"8.18.0","description":"Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js","keywords":["HyBi","Push","RFC-6455","WebSocket","WebSockets","real-time"],"homepage":"https://github.com/websockets/ws","bugs":"https://github.com/websockets/ws/issues","repository":{"type":"git","url":"git+https://github.com/websockets/ws.git"},"author":"Einar Otto Stangvik <einaros@gmail.com> (http://2x.io)","license":"MIT","main":"index.js","exports":{".":{"browser":"./browser.js","import":"./wrapper.mjs","require":"./index.js"},"./package.json":"./package.json"},"browser":"browser.js","engines":{"node":">=10.0.0"},"files":["browser.js","index.js","lib/*.js","wrapper.mjs"],"scripts":{"test":"nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js","integration":"mocha --throw-deprecation test/*.integration.js","lint":"eslint . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""},"peerDependencies":{"bufferutil":"^4.0.1","utf-8-validate":">=5.0.2"},"peerDependenciesMeta":{"bufferutil":{"optional":true},"utf-8-validate":{"optional":true}},"devDependencies":{"benchmark":"^2.1.4","bufferutil":"^4.0.1","eslint":"^9.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","globals":"^15.0.0","mocha":"^8.4.0","nyc":"^15.0.0","prettier":"^3.0.0","utf-8-validate":"^6.0.0"},"_lastModified":"2025-07-29T06:20:53.584Z"}
@@ -1,4 +1,4 @@
1
- import { Plugin } from '@tachybase/server';
1
+ import { Plugin } from '@tego/server';
2
2
  export declare class PluginOnlineUserServer extends Plugin {
3
3
  afterAdd(): Promise<void>;
4
4
  beforeLoad(): Promise<void>;
@@ -22,8 +22,7 @@ __export(plugin_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(plugin_exports);
24
24
  var import_node_worker_threads = require("node:worker_threads");
25
- var import_server = require("@tachybase/server");
26
- var import_utils = require("@tachybase/utils");
25
+ var import_server = require("@tego/server");
27
26
  var import_connection_manager = require("./services/connection-manager");
28
27
  class PluginOnlineUserServer extends import_server.Plugin {
29
28
  async afterAdd() {
@@ -34,7 +33,7 @@ class PluginOnlineUserServer extends import_server.Plugin {
34
33
  if (!import_node_worker_threads.isMainThread) {
35
34
  return;
36
35
  }
37
- await import_utils.Container.get(import_connection_manager.ConnectionManager).load();
36
+ await import_server.Container.get(import_connection_manager.ConnectionManager).load();
38
37
  }
39
38
  async install() {
40
39
  }
@@ -65,12 +65,11 @@ __export(connection_manager_exports, {
65
65
  ConnectionManager: () => ConnectionManager
66
66
  });
67
67
  module.exports = __toCommonJS(connection_manager_exports);
68
- var import_server = require("@tachybase/server");
69
- var import_utils = require("@tachybase/utils");
68
+ var import_server = require("@tego/server");
70
69
  var import_redis = require("redis");
71
70
  var _app_dec, _ConnectionManager_decorators, _init;
72
71
  const KEY_ONLINE_USERS = "online_users";
73
- _ConnectionManager_decorators = [(0, import_utils.Service)()], _app_dec = [(0, import_utils.App)()];
72
+ _ConnectionManager_decorators = [(0, import_server.Service)()], _app_dec = [(0, import_server.App)()];
74
73
  class ConnectionManager {
75
74
  constructor() {
76
75
  this.app = __runInitializers(_init, 8, this), __runInitializers(_init, 11, this);
@@ -107,7 +106,7 @@ class ConnectionManager {
107
106
  await this.app.online.all.connect();
108
107
  await this.app.online.pub.connect();
109
108
  await this.app.online.sub.connect();
110
- if ((0, import_utils.isMain)()) {
109
+ if ((0, import_server.isMain)()) {
111
110
  const keysToDelete = await this.app.online.all.KEYS(`${KEY_ONLINE_USERS}*`);
112
111
  if (keysToDelete.length > 0) {
113
112
  await this.app.online.all.DEL(...keysToDelete);
@@ -143,7 +142,7 @@ class ConnectionManager {
143
142
  const gateway = import_server.Gateway.getInstance();
144
143
  const wss = gateway["wsServer"];
145
144
  await this.app.online.sub.SUBSCRIBE(KEY_ONLINE_USERS + appName, async (num) => {
146
- if (num !== (0, import_utils.currentProcessNum)()) {
145
+ if (num !== (0, import_server.currentProcessNum)()) {
147
146
  await notifyAllClients(false);
148
147
  }
149
148
  });
@@ -156,7 +155,7 @@ class ConnectionManager {
156
155
  }
157
156
  });
158
157
  if (broadcast && this.app.online.pub.isOpen) {
159
- await this.app.online.pub.PUBLISH(KEY_ONLINE_USERS + appName, (0, import_utils.currentProcessNum)());
158
+ await this.app.online.pub.PUBLISH(KEY_ONLINE_USERS + appName, (0, import_server.currentProcessNum)());
160
159
  }
161
160
  };
162
161
  const getUserById = async (id) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-online-user",
3
3
  "displayName": "Online User Management",
4
- "version": "1.3.20",
4
+ "version": "1.3.22",
5
5
  "description": "Online User Management",
6
6
  "keywords": [
7
7
  "Users & permissions"
@@ -9,23 +9,19 @@
9
9
  "main": "dist/server/index.js",
10
10
  "dependencies": {},
11
11
  "devDependencies": {
12
+ "@tachybase/schema": "^1.3.39",
13
+ "@tachybase/test": "^1.3.39",
14
+ "@tego/client": "^1.3.39",
15
+ "@tego/server": "^1.3.39",
12
16
  "antd": "5.22.5",
13
17
  "jsonwebtoken": "^8.5.1",
14
18
  "lodash": "4.17.21",
15
- "react": "^18.3.1",
19
+ "react": "18.3.1",
16
20
  "redis": "^4.7.0",
17
- "ws": "^8.18.0"
18
- },
19
- "peerDependencies": {
20
- "@tachybase/client": "1.3.20",
21
- "@tachybase/server": "1.3.20",
22
- "@tachybase/test": "1.3.20",
23
- "@tachybase/utils": "1.3.20",
24
- "@tachybase/schema": "1.3.20"
21
+ "ws": "^8.18.0",
22
+ "@tachybase/client": "1.3.22"
25
23
  },
26
24
  "description.zh-CN": "在线用户管理(建设中)",
27
25
  "displayName.zh-CN": "在线用户管理(建设中)",
28
- "scripts": {
29
- "build": "tachybase-build --no-dts @tachybase/plugin-online-user"
30
- }
26
+ "scripts": {}
31
27
  }