@nocobase/server 2.0.0-alpha.52 → 2.0.0-alpha.54
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/lib/application.js
CHANGED
|
@@ -949,6 +949,11 @@ const _Application = class _Application extends import_koa.default {
|
|
|
949
949
|
name: "auth",
|
|
950
950
|
actions: import_auth.actions
|
|
951
951
|
});
|
|
952
|
+
this._dataSourceManager.beforeAddDataSource((dataSource) => {
|
|
953
|
+
if (dataSource.collectionManager instanceof import_data_source_manager.SequelizeCollectionManager) {
|
|
954
|
+
(0, import_snowflake_id_field.setupSnowflakeIdField)(this, dataSource.collectionManager.db);
|
|
955
|
+
}
|
|
956
|
+
});
|
|
952
957
|
this._dataSourceManager.afterAddDataSource((dataSource) => {
|
|
953
958
|
if (dataSource.collectionManager instanceof import_data_source_manager.SequelizeCollectionManager) {
|
|
954
959
|
for (const [actionName, actionParams] of Object.entries(import_available_action.availableActions)) {
|
|
@@ -990,7 +995,6 @@ const _Application = class _Application extends import_koa.default {
|
|
|
990
995
|
app: this
|
|
991
996
|
});
|
|
992
997
|
this.dataSourceManager.dataSources.set("main", mainDataSourceInstance);
|
|
993
|
-
(0, import_snowflake_id_field.setupSnowflakeIdField)(this);
|
|
994
998
|
}
|
|
995
999
|
createDatabase(options) {
|
|
996
1000
|
const logging = /* @__PURE__ */ __name((...args) => {
|
package/lib/gateway/ws-server.js
CHANGED
|
@@ -228,6 +228,9 @@ const _WSServer = class _WSServer extends import_events.default {
|
|
|
228
228
|
}
|
|
229
229
|
removeClientTag(clientId, tagKey) {
|
|
230
230
|
const client = this.webSocketClients.get(clientId);
|
|
231
|
+
if (!client) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
231
234
|
client.tags.forEach((tag) => {
|
|
232
235
|
if (tag.startsWith(`${tagKey}#`)) {
|
|
233
236
|
client.tags.delete(tag);
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import { Database } from '@nocobase/database';
|
|
9
10
|
import Application from './application';
|
|
10
|
-
export declare function setupSnowflakeIdField(app: Application): void;
|
|
11
|
+
export declare function setupSnowflakeIdField(app: Application, db: Database): void;
|
|
@@ -31,13 +31,13 @@ __export(snowflake_id_field_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(snowflake_id_field_exports);
|
|
33
33
|
var import_database = require("@nocobase/database");
|
|
34
|
-
function setupSnowflakeIdField(app) {
|
|
34
|
+
function setupSnowflakeIdField(app, db) {
|
|
35
35
|
const _SnowflakeIdField = class _SnowflakeIdField extends import_database.SnowflakeIdField {
|
|
36
36
|
};
|
|
37
37
|
__name(_SnowflakeIdField, "SnowflakeIdField");
|
|
38
38
|
let SnowflakeIdField = _SnowflakeIdField;
|
|
39
39
|
SnowflakeIdField.setApp(app);
|
|
40
|
-
|
|
40
|
+
db.registerFieldTypes({
|
|
41
41
|
snowflakeId: SnowflakeIdField
|
|
42
42
|
});
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.54",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
"@koa/cors": "^5.0.0",
|
|
11
11
|
"@koa/multer": "^3.1.0",
|
|
12
12
|
"@koa/router": "^13.1.0",
|
|
13
|
-
"@nocobase/acl": "2.0.0-alpha.
|
|
14
|
-
"@nocobase/actions": "2.0.0-alpha.
|
|
15
|
-
"@nocobase/auth": "2.0.0-alpha.
|
|
16
|
-
"@nocobase/cache": "2.0.0-alpha.
|
|
17
|
-
"@nocobase/data-source-manager": "2.0.0-alpha.
|
|
18
|
-
"@nocobase/database": "2.0.0-alpha.
|
|
19
|
-
"@nocobase/evaluators": "2.0.0-alpha.
|
|
20
|
-
"@nocobase/lock-manager": "2.0.0-alpha.
|
|
21
|
-
"@nocobase/logger": "2.0.0-alpha.
|
|
22
|
-
"@nocobase/resourcer": "2.0.0-alpha.
|
|
23
|
-
"@nocobase/sdk": "2.0.0-alpha.
|
|
24
|
-
"@nocobase/snowflake-id": "2.0.0-alpha.
|
|
25
|
-
"@nocobase/telemetry": "2.0.0-alpha.
|
|
26
|
-
"@nocobase/utils": "2.0.0-alpha.
|
|
13
|
+
"@nocobase/acl": "2.0.0-alpha.54",
|
|
14
|
+
"@nocobase/actions": "2.0.0-alpha.54",
|
|
15
|
+
"@nocobase/auth": "2.0.0-alpha.54",
|
|
16
|
+
"@nocobase/cache": "2.0.0-alpha.54",
|
|
17
|
+
"@nocobase/data-source-manager": "2.0.0-alpha.54",
|
|
18
|
+
"@nocobase/database": "2.0.0-alpha.54",
|
|
19
|
+
"@nocobase/evaluators": "2.0.0-alpha.54",
|
|
20
|
+
"@nocobase/lock-manager": "2.0.0-alpha.54",
|
|
21
|
+
"@nocobase/logger": "2.0.0-alpha.54",
|
|
22
|
+
"@nocobase/resourcer": "2.0.0-alpha.54",
|
|
23
|
+
"@nocobase/sdk": "2.0.0-alpha.54",
|
|
24
|
+
"@nocobase/snowflake-id": "2.0.0-alpha.54",
|
|
25
|
+
"@nocobase/telemetry": "2.0.0-alpha.54",
|
|
26
|
+
"@nocobase/utils": "2.0.0-alpha.54",
|
|
27
27
|
"@types/decompress": "4.2.7",
|
|
28
28
|
"@types/ini": "^1.3.31",
|
|
29
29
|
"@types/koa-send": "^4.1.3",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"@types/serve-handler": "^6.1.1",
|
|
61
61
|
"@types/ws": "^8.5.5"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "68c84deaabba0ebec7407bf7245376b8d843449c"
|
|
64
64
|
}
|