@saltcorn/server 1.1.0-beta.11 → 1.1.0-beta.13

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,4 +1,4 @@
1
- The Cordova builder is a docker image with all dependencies to build Android apps.
1
+ The Capacitor builder is a docker image with all dependencies to build Android apps.
2
2
  It can be pulled from dockerhub while installing Saltcorn, or you can use the pull button.
3
3
 
4
4
  Please make sure your server has a valid and accessible docker daemon running.
@@ -0,0 +1,5 @@
1
+ These are the available configuration keys:
2
+
3
+ {{# for (const [key, defn] of Object.entries(configTypes)) { }}
4
+ * `{{key}}`: {{defn.label||""}}
5
+ {{# } }}
package/help/index.js CHANGED
@@ -11,6 +11,7 @@ const { pre } = require("@saltcorn/markup/tags");
11
11
  const path = require("path");
12
12
  const { getState } = require("@saltcorn/data/db/state");
13
13
  const { oneOf } = require("@saltcorn/types/generators");
14
+ const { configTypes } = require("@saltcorn/data/models/config");
14
15
  const get_md_file = async (topic) => {
15
16
  try {
16
17
  const fp = File.normalise_in_base(__dirname, `${topic}.tmd`);
@@ -36,6 +37,7 @@ const get_help_markup = async (topic, query, req) => {
36
37
  query,
37
38
  oneOf,
38
39
  moment,
40
+ configTypes
39
41
  };
40
42
  const mdTemplate = await get_md_file(topic);
41
43
  if (!mdTemplate) return { markup: "Topic not found" };
package/load_plugins.js CHANGED
@@ -97,7 +97,10 @@ const loadPlugin = async (plugin, force, forceFetch) => {
97
97
  }
98
98
  }
99
99
  // load plugin
100
- const loader = new PluginInstaller(plugin);
100
+ const loader = new PluginInstaller(plugin, {
101
+ scVersion: packagejson.version,
102
+ envVars: { PUPPETEER_SKIP_DOWNLOAD: true },
103
+ });
101
104
  const res = await loader.install(force);
102
105
  const configuration =
103
106
  typeof plugin.configuration === "string"
@@ -162,7 +165,10 @@ const reloadAuthFromRoot = () => {
162
165
  * @returns {Promise<{plugin_module: *}|{plugin_module: any}>}
163
166
  */
164
167
  const requirePlugin = async (plugin, force) => {
165
- const loader = new PluginInstaller(plugin);
168
+ const loader = new PluginInstaller(plugin, {
169
+ scVersion: packagejson.version,
170
+ envVars: { PUPPETEER_SKIP_DOWNLOAD: true },
171
+ });
166
172
  return await loader.install(force);
167
173
  };
168
174
 
@@ -231,7 +237,7 @@ const loadAndSaveNewPlugin = async (
231
237
  const loadMsgs = [];
232
238
  const loader = new PluginInstaller(plugin, {
233
239
  scVersion: packagejson.version,
234
- envVars: { PUPPETEER_SKIP_DOWNLOAD: "1" },
240
+ envVars: { PUPPETEER_SKIP_DOWNLOAD: true },
235
241
  });
236
242
  const { version, plugin_module, location, loadedWithReload, msgs } =
237
243
  await loader.install(force);
package/locales/en.json CHANGED
@@ -1494,5 +1494,10 @@
1494
1494
  "Fluid layout": "Fluid layout",
1495
1495
  "Request fluid layout from theme for a wider display for this page": "Request fluid layout from theme for a wider display for this page",
1496
1496
  "Location of view to create new row": "Location of view to create new row",
1497
- "Default locale": "Default locale"
1497
+ "Capacitor builder": "Capacitor builder",
1498
+ "Pulling the capacitor-builder docker image...": "Pulling the capacitor-builder docker image...",
1499
+ "Pull done with code %s": "Pull done with code %s",
1500
+ "Default locale": "Default locale",
1501
+ "Confirm leaving unsaved": "Confirm leaving unsaved",
1502
+ "Ask the user to confirm if they close a tab with unsaved changes": "Ask the user to confirm if they close a tab with unsaved changes"
1498
1503
  }
package/markup/admin.js CHANGED
@@ -17,7 +17,7 @@ const {
17
17
  li,
18
18
  } = require("@saltcorn/markup/tags");
19
19
  const db = require("@saltcorn/data/db");
20
- const { configTypes, isFixedConfig } = require("@saltcorn/data/models/config");
20
+ const { configTypes } = require("@saltcorn/data/models/config");
21
21
  const { getState } = require("@saltcorn/data/db/state");
22
22
  const Form = require("@saltcorn/data/models/form");
23
23
  const Table = require("@saltcorn/data/models/table");
@@ -466,7 +466,7 @@ const config_fields_form = async ({
466
466
  ...configTypes[name],
467
467
  label: label ? req.__(label) : undefined,
468
468
  sublabel: sublabel ? req.__(sublabel) : undefined,
469
- disabled: isFixedConfig(name),
469
+ disabled: state.isFixedConfig(name),
470
470
  type:
471
471
  isView || isRole || isTenant
472
472
  ? "String"
@@ -475,6 +475,9 @@ const config_fields_form = async ({
475
475
  : configTypes[name].type,
476
476
  input_type: configTypes[name].input_type,
477
477
  showIf,
478
+ help: configTypes[name].helpTopic
479
+ ? { topic: configTypes[name].helpTopic }
480
+ : undefined,
478
481
  attributes: isView
479
482
  ? await viewAttributes(name)
480
483
  : isRole
@@ -505,7 +508,7 @@ const save_config_from_form = async (form) => {
505
508
  const state = getState();
506
509
 
507
510
  for (const [k, v] of Object.entries(form.values)) {
508
- if (!isFixedConfig(k) && typeof v !== "undefined") {
511
+ if (!state.isFixedConfig(k) && typeof v !== "undefined") {
509
512
  await state.setConfig(k, v);
510
513
  }
511
514
  }
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@saltcorn/server",
3
- "version": "1.1.0-beta.11",
3
+ "version": "1.1.0-beta.13",
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": "1.1.0-beta.11",
11
- "@saltcorn/builder": "1.1.0-beta.11",
12
- "@saltcorn/data": "1.1.0-beta.11",
13
- "@saltcorn/admin-models": "1.1.0-beta.11",
14
- "@saltcorn/filemanager": "1.1.0-beta.11",
15
- "@saltcorn/markup": "1.1.0-beta.11",
16
- "@saltcorn/plugins-loader": "1.1.0-beta.11",
17
- "@saltcorn/sbadmin2": "1.1.0-beta.11",
10
+ "@saltcorn/base-plugin": "1.1.0-beta.13",
11
+ "@saltcorn/builder": "1.1.0-beta.13",
12
+ "@saltcorn/data": "1.1.0-beta.13",
13
+ "@saltcorn/admin-models": "1.1.0-beta.13",
14
+ "@saltcorn/filemanager": "1.1.0-beta.13",
15
+ "@saltcorn/markup": "1.1.0-beta.13",
16
+ "@saltcorn/plugins-loader": "1.1.0-beta.13",
17
+ "@saltcorn/sbadmin2": "1.1.0-beta.13",
18
18
  "@socket.io/cluster-adapter": "^0.2.1",
19
19
  "@socket.io/sticky": "^1.0.1",
20
20
  "adm-zip": "0.5.10",