@nocobase/server 2.1.0-alpha.23 → 2.1.0-alpha.25
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.
|
@@ -147,7 +147,15 @@ async function listEnabledPlugins(ctx, lane = "client") {
|
|
|
147
147
|
}
|
|
148
148
|
__name(listEnabledPlugins, "listEnabledPlugins");
|
|
149
149
|
function normalizePmPluginKeys(filterByTk) {
|
|
150
|
-
|
|
150
|
+
if (typeof filterByTk === "string") {
|
|
151
|
+
return filterByTk.split(",").map((k) => k.trim()).filter(Boolean);
|
|
152
|
+
}
|
|
153
|
+
if (!Array.isArray(filterByTk) || filterByTk.some((item) => typeof item !== "string")) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
return filterByTk.flatMap(
|
|
157
|
+
(item) => item.split(",").map((k) => k.trim()).filter(Boolean)
|
|
158
|
+
);
|
|
151
159
|
}
|
|
152
160
|
__name(normalizePmPluginKeys, "normalizePmPluginKeys");
|
|
153
161
|
function coerceAwaitResponse(value) {
|
|
@@ -240,9 +248,6 @@ var resource_default = {
|
|
|
240
248
|
async enable(ctx, next) {
|
|
241
249
|
const { filterByTk, awaitResponse: awaitResponseRaw } = ctx.action.params;
|
|
242
250
|
const app = ctx.app;
|
|
243
|
-
if (filterByTk == null || filterByTk === "" || typeof filterByTk !== "string") {
|
|
244
|
-
ctx.throw(400, "plugin name invalid");
|
|
245
|
-
}
|
|
246
251
|
const keys = normalizePmPluginKeys(filterByTk);
|
|
247
252
|
if (!keys.length) {
|
|
248
253
|
ctx.throw(400, "plugin name invalid");
|
|
@@ -262,9 +267,6 @@ var resource_default = {
|
|
|
262
267
|
async disable(ctx, next) {
|
|
263
268
|
const { filterByTk, awaitResponse: awaitResponseRaw } = ctx.action.params;
|
|
264
269
|
const app = ctx.app;
|
|
265
|
-
if (filterByTk == null || filterByTk === "" || typeof filterByTk !== "string") {
|
|
266
|
-
ctx.throw(400, "plugin name invalid");
|
|
267
|
-
}
|
|
268
270
|
const keys = normalizePmPluginKeys(filterByTk);
|
|
269
271
|
if (!keys.length) {
|
|
270
272
|
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-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.25",
|
|
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-alpha.
|
|
14
|
-
"@nocobase/actions": "2.1.0-alpha.
|
|
15
|
-
"@nocobase/ai": "2.1.0-alpha.
|
|
16
|
-
"@nocobase/auth": "2.1.0-alpha.
|
|
17
|
-
"@nocobase/cache": "2.1.0-alpha.
|
|
18
|
-
"@nocobase/data-source-manager": "2.1.0-alpha.
|
|
19
|
-
"@nocobase/database": "2.1.0-alpha.
|
|
20
|
-
"@nocobase/evaluators": "2.1.0-alpha.
|
|
21
|
-
"@nocobase/lock-manager": "2.1.0-alpha.
|
|
22
|
-
"@nocobase/logger": "2.1.0-alpha.
|
|
23
|
-
"@nocobase/resourcer": "2.1.0-alpha.
|
|
24
|
-
"@nocobase/sdk": "2.1.0-alpha.
|
|
25
|
-
"@nocobase/snowflake-id": "2.1.0-alpha.
|
|
26
|
-
"@nocobase/telemetry": "2.1.0-alpha.
|
|
27
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
13
|
+
"@nocobase/acl": "2.1.0-alpha.25",
|
|
14
|
+
"@nocobase/actions": "2.1.0-alpha.25",
|
|
15
|
+
"@nocobase/ai": "2.1.0-alpha.25",
|
|
16
|
+
"@nocobase/auth": "2.1.0-alpha.25",
|
|
17
|
+
"@nocobase/cache": "2.1.0-alpha.25",
|
|
18
|
+
"@nocobase/data-source-manager": "2.1.0-alpha.25",
|
|
19
|
+
"@nocobase/database": "2.1.0-alpha.25",
|
|
20
|
+
"@nocobase/evaluators": "2.1.0-alpha.25",
|
|
21
|
+
"@nocobase/lock-manager": "2.1.0-alpha.25",
|
|
22
|
+
"@nocobase/logger": "2.1.0-alpha.25",
|
|
23
|
+
"@nocobase/resourcer": "2.1.0-alpha.25",
|
|
24
|
+
"@nocobase/sdk": "2.1.0-alpha.25",
|
|
25
|
+
"@nocobase/snowflake-id": "2.1.0-alpha.25",
|
|
26
|
+
"@nocobase/telemetry": "2.1.0-alpha.25",
|
|
27
|
+
"@nocobase/utils": "2.1.0-alpha.25",
|
|
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": "63e4aaa625f3108fe41238e85bb13dee37fe1f48"
|
|
65
65
|
}
|