@saltcorn/server 0.9.6-beta.4 → 0.9.6-beta.5
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/auth/admin.js +4 -1
- package/load_plugins.js +5 -1
- package/package.json +9 -9
- package/routes/fields.js +1 -1
- package/routes/plugins.js +6 -1
- package/routes/utils.js +5 -2
- package/tests/plugins.test.js +2 -0
package/auth/admin.js
CHANGED
|
@@ -531,7 +531,10 @@ router.post(
|
|
|
531
531
|
if (restart_required)
|
|
532
532
|
res.json({
|
|
533
533
|
success: "ok",
|
|
534
|
-
notify:
|
|
534
|
+
notify:
|
|
535
|
+
req.__("Restart required for changes to take effect.") +
|
|
536
|
+
" " +
|
|
537
|
+
a({ href: "/admin/system" }, req.__("Restart here")),
|
|
535
538
|
});
|
|
536
539
|
else res.json({ success: "ok" });
|
|
537
540
|
}
|
package/load_plugins.js
CHANGED
|
@@ -141,7 +141,11 @@ const loadAndSaveNewPlugin = async (
|
|
|
141
141
|
const existing = await Plugin.findOne({ location: loc });
|
|
142
142
|
if (!existing && loc !== plugin.location) {
|
|
143
143
|
await loadAndSaveNewPlugin(
|
|
144
|
-
new Plugin({
|
|
144
|
+
new Plugin({
|
|
145
|
+
name: loc.replace("@saltcorn/", ""),
|
|
146
|
+
location: loc,
|
|
147
|
+
source: "npm",
|
|
148
|
+
}),
|
|
145
149
|
force,
|
|
146
150
|
noSignalOrDB
|
|
147
151
|
);
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/server",
|
|
3
|
-
"version": "0.9.6-beta.
|
|
3
|
+
"version": "0.9.6-beta.5",
|
|
4
4
|
"description": "Server app for Saltcorn, open-source no-code platform",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@aws-sdk/client-s3": "^3.451.0",
|
|
10
|
-
"@saltcorn/base-plugin": "0.9.6-beta.
|
|
11
|
-
"@saltcorn/builder": "0.9.6-beta.
|
|
12
|
-
"@saltcorn/data": "0.9.6-beta.
|
|
13
|
-
"@saltcorn/admin-models": "0.9.6-beta.
|
|
14
|
-
"@saltcorn/filemanager": "0.9.6-beta.
|
|
15
|
-
"@saltcorn/markup": "0.9.6-beta.
|
|
16
|
-
"@saltcorn/plugins-loader": "0.9.6-beta.
|
|
17
|
-
"@saltcorn/sbadmin2": "0.9.6-beta.
|
|
10
|
+
"@saltcorn/base-plugin": "0.9.6-beta.5",
|
|
11
|
+
"@saltcorn/builder": "0.9.6-beta.5",
|
|
12
|
+
"@saltcorn/data": "0.9.6-beta.5",
|
|
13
|
+
"@saltcorn/admin-models": "0.9.6-beta.5",
|
|
14
|
+
"@saltcorn/filemanager": "0.9.6-beta.5",
|
|
15
|
+
"@saltcorn/markup": "0.9.6-beta.5",
|
|
16
|
+
"@saltcorn/plugins-loader": "0.9.6-beta.5",
|
|
17
|
+
"@saltcorn/sbadmin2": "0.9.6-beta.5",
|
|
18
18
|
"@socket.io/cluster-adapter": "^0.2.1",
|
|
19
19
|
"@socket.io/sticky": "^1.0.1",
|
|
20
20
|
"adm-zip": "0.5.10",
|
package/routes/fields.js
CHANGED
|
@@ -1157,7 +1157,7 @@ router.post(
|
|
|
1157
1157
|
else res.send(fv.run(result, req, { row, ...configuration }));
|
|
1158
1158
|
} catch (e) {
|
|
1159
1159
|
console.error("show-calculated error", e);
|
|
1160
|
-
return res.status(
|
|
1160
|
+
return res.status(200).send(``);
|
|
1161
1161
|
}
|
|
1162
1162
|
})
|
|
1163
1163
|
);
|
package/routes/plugins.js
CHANGED
|
@@ -1315,7 +1315,12 @@ router.get(
|
|
|
1315
1315
|
await upgrade_all_tenants_plugins((p, f) =>
|
|
1316
1316
|
load_plugins.loadPlugin(p, f)
|
|
1317
1317
|
);
|
|
1318
|
-
req.flash(
|
|
1318
|
+
req.flash(
|
|
1319
|
+
"success",
|
|
1320
|
+
req.__(`Modules up-to-date. Please restart server`) +
|
|
1321
|
+
". " +
|
|
1322
|
+
a({ href: "/admin/system" }, req.__("Restart here"))
|
|
1323
|
+
);
|
|
1319
1324
|
} else {
|
|
1320
1325
|
const installed_plugins = await Plugin.find({});
|
|
1321
1326
|
for (const plugin of installed_plugins) {
|
package/routes/utils.js
CHANGED
|
@@ -14,7 +14,7 @@ const {
|
|
|
14
14
|
} = require("@saltcorn/data/db/state");
|
|
15
15
|
const { get_base_url } = require("@saltcorn/data/models/config");
|
|
16
16
|
const { hash } = require("@saltcorn/data/utils");
|
|
17
|
-
const { input, script, domReady } = require("@saltcorn/markup/tags");
|
|
17
|
+
const { input, script, domReady, a } = require("@saltcorn/markup/tags");
|
|
18
18
|
const session = require("express-session");
|
|
19
19
|
const cookieSession = require("cookie-session");
|
|
20
20
|
const is = require("contractis/is");
|
|
@@ -398,7 +398,10 @@ const admin_config_route = ({
|
|
|
398
398
|
if (restart_required)
|
|
399
399
|
res.json({
|
|
400
400
|
success: "ok",
|
|
401
|
-
notify:
|
|
401
|
+
notify:
|
|
402
|
+
req.__("Restart required for changes to take effect.") +
|
|
403
|
+
" " +
|
|
404
|
+
a({ href: "/admin/system" }, req.__("Restart here")),
|
|
402
405
|
});
|
|
403
406
|
else res.json({ success: "ok" });
|
|
404
407
|
}
|
package/tests/plugins.test.js
CHANGED
|
@@ -137,8 +137,10 @@ describe("Plugin dependency resolution and upgrade", () => {
|
|
|
137
137
|
.expect(toRedirect("/plugins"));
|
|
138
138
|
const quill = await Plugin.findOne({ name: "quill-editor" });
|
|
139
139
|
expect(quill.location).toBe("@saltcorn/quill-editor");
|
|
140
|
+
expect(quill.name).toBe("quill-editor");
|
|
140
141
|
const html = await Plugin.findOne({ location: "@saltcorn/html" });
|
|
141
142
|
expect(html.location).toBe("@saltcorn/html");
|
|
143
|
+
expect(html.name).toBe("html");
|
|
142
144
|
const html_type = getState().types.HTML;
|
|
143
145
|
expect(!!html_type.fieldviews.Quill).toBe(true);
|
|
144
146
|
});
|