@nocobase/server 2.1.0-beta.17 → 2.1.0-beta.19
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.
|
@@ -140,7 +140,15 @@ async function listEnabledPlugins(ctx, lane = "client") {
|
|
|
140
140
|
}
|
|
141
141
|
__name(listEnabledPlugins, "listEnabledPlugins");
|
|
142
142
|
function normalizePmPluginKeys(filterByTk) {
|
|
143
|
-
|
|
143
|
+
if (typeof filterByTk === "string") {
|
|
144
|
+
return filterByTk.split(",").map((k) => k.trim()).filter(Boolean);
|
|
145
|
+
}
|
|
146
|
+
if (!Array.isArray(filterByTk) || filterByTk.some((item) => typeof item !== "string")) {
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
return filterByTk.flatMap(
|
|
150
|
+
(item) => item.split(",").map((k) => k.trim()).filter(Boolean)
|
|
151
|
+
);
|
|
144
152
|
}
|
|
145
153
|
__name(normalizePmPluginKeys, "normalizePmPluginKeys");
|
|
146
154
|
function coerceAwaitResponse(value) {
|
|
@@ -233,9 +241,6 @@ var resource_default = {
|
|
|
233
241
|
async enable(ctx, next) {
|
|
234
242
|
const { filterByTk, awaitResponse: awaitResponseRaw } = ctx.action.params;
|
|
235
243
|
const app = ctx.app;
|
|
236
|
-
if (filterByTk == null || filterByTk === "" || typeof filterByTk !== "string") {
|
|
237
|
-
ctx.throw(400, "plugin name invalid");
|
|
238
|
-
}
|
|
239
244
|
const keys = normalizePmPluginKeys(filterByTk);
|
|
240
245
|
if (!keys.length) {
|
|
241
246
|
ctx.throw(400, "plugin name invalid");
|
|
@@ -255,9 +260,6 @@ var resource_default = {
|
|
|
255
260
|
async disable(ctx, next) {
|
|
256
261
|
const { filterByTk, awaitResponse: awaitResponseRaw } = ctx.action.params;
|
|
257
262
|
const app = ctx.app;
|
|
258
|
-
if (filterByTk == null || filterByTk === "" || typeof filterByTk !== "string") {
|
|
259
|
-
ctx.throw(400, "plugin name invalid");
|
|
260
|
-
}
|
|
261
263
|
const keys = normalizePmPluginKeys(filterByTk);
|
|
262
264
|
if (!keys.length) {
|
|
263
265
|
ctx.throw(400, "plugin name invalid");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.19",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,21 +10,21 @@
|
|
|
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.1.0-beta.
|
|
14
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
15
|
-
"@nocobase/ai": "2.1.0-beta.
|
|
16
|
-
"@nocobase/auth": "2.1.0-beta.
|
|
17
|
-
"@nocobase/cache": "2.1.0-beta.
|
|
18
|
-
"@nocobase/data-source-manager": "2.1.0-beta.
|
|
19
|
-
"@nocobase/database": "2.1.0-beta.
|
|
20
|
-
"@nocobase/evaluators": "2.1.0-beta.
|
|
21
|
-
"@nocobase/lock-manager": "2.1.0-beta.
|
|
22
|
-
"@nocobase/logger": "2.1.0-beta.
|
|
23
|
-
"@nocobase/resourcer": "2.1.0-beta.
|
|
24
|
-
"@nocobase/sdk": "2.1.0-beta.
|
|
25
|
-
"@nocobase/snowflake-id": "2.1.0-beta.
|
|
26
|
-
"@nocobase/telemetry": "2.1.0-beta.
|
|
27
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
13
|
+
"@nocobase/acl": "2.1.0-beta.19",
|
|
14
|
+
"@nocobase/actions": "2.1.0-beta.19",
|
|
15
|
+
"@nocobase/ai": "2.1.0-beta.19",
|
|
16
|
+
"@nocobase/auth": "2.1.0-beta.19",
|
|
17
|
+
"@nocobase/cache": "2.1.0-beta.19",
|
|
18
|
+
"@nocobase/data-source-manager": "2.1.0-beta.19",
|
|
19
|
+
"@nocobase/database": "2.1.0-beta.19",
|
|
20
|
+
"@nocobase/evaluators": "2.1.0-beta.19",
|
|
21
|
+
"@nocobase/lock-manager": "2.1.0-beta.19",
|
|
22
|
+
"@nocobase/logger": "2.1.0-beta.19",
|
|
23
|
+
"@nocobase/resourcer": "2.1.0-beta.19",
|
|
24
|
+
"@nocobase/sdk": "2.1.0-beta.19",
|
|
25
|
+
"@nocobase/snowflake-id": "2.1.0-beta.19",
|
|
26
|
+
"@nocobase/telemetry": "2.1.0-beta.19",
|
|
27
|
+
"@nocobase/utils": "2.1.0-beta.19",
|
|
28
28
|
"@types/decompress": "4.2.7",
|
|
29
29
|
"@types/ini": "^1.3.31",
|
|
30
30
|
"@types/koa-send": "^4.1.3",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"@types/serve-handler": "^6.1.1",
|
|
62
62
|
"@types/ws": "^8.5.5"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "d89ab08dbcb25877de69827d5bad6823c27b2cbb"
|
|
65
65
|
}
|