@saltcorn/cli 1.0.0-beta.7 → 1.0.0-rc.1

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,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-beta.7",
2
+ "version": "1.0.0-rc.1",
3
3
  "commands": {
4
4
  "add-schema": {
5
5
  "id": "add-schema",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@saltcorn/cli",
3
3
  "description": "Command-line interface for Saltcorn, open-source no-code platform",
4
4
  "homepage": "https://saltcorn.com",
5
- "version": "1.0.0-beta.7",
5
+ "version": "1.0.0-rc.1",
6
6
  "author": "Tom Nielsen @glutamate",
7
7
  "bin": {
8
8
  "saltcorn": "./bin/saltcorn"
@@ -11,13 +11,13 @@
11
11
  "dependencies": {
12
12
  "@oclif/core": "^2.16.0",
13
13
  "@oclif/plugin-plugins": "^3.9.4",
14
- "@saltcorn/admin-models": "1.0.0-beta.7",
15
- "@saltcorn/common-code": "1.0.0-beta.7",
16
- "@saltcorn/data": "1.0.0-beta.7",
17
- "@saltcorn/mobile-app": "1.0.0-beta.7",
18
- "@saltcorn/mobile-builder": "1.0.0-beta.7",
19
- "@saltcorn/plugins-loader": "1.0.0-beta.7",
20
- "@saltcorn/server": "1.0.0-beta.7",
14
+ "@saltcorn/admin-models": "1.0.0-rc.1",
15
+ "@saltcorn/common-code": "1.0.0-rc.1",
16
+ "@saltcorn/data": "1.0.0-rc.1",
17
+ "@saltcorn/mobile-app": "1.0.0-rc.1",
18
+ "@saltcorn/mobile-builder": "1.0.0-rc.1",
19
+ "@saltcorn/plugins-loader": "1.0.0-rc.1",
20
+ "@saltcorn/server": "1.0.0-rc.1",
21
21
  "contractis": "^0.1.0",
22
22
  "dateformat": "^3.0.3",
23
23
  "inquirer": "^7.3.3",
@@ -36,7 +36,7 @@
36
36
  "ts-node": "^9.1.1"
37
37
  },
38
38
  "engines": {
39
- "node": ">=14.0.0"
39
+ "node": ">=16.14.0"
40
40
  },
41
41
  "files": [
42
42
  "/bin",
@@ -22,7 +22,8 @@ class BuildCordovaBuilder extends Command {
22
22
  "-f",
23
23
  join(dockerDir, "Dockerfile"),
24
24
  "-t",
25
- "saltcorn/cordova-builder"
25
+ "saltcorn/cordova-builder",
26
+ "--progress=plain"
26
27
  );
27
28
  const result = spawnSync("docker", dArgs, { cwd: ".", stdio: "inherit" });
28
29
  if (result.error) console.log(result.error.toString());
@@ -127,9 +127,10 @@ class ReleaseCommand extends Command {
127
127
  updatePkgJson(p.dir);
128
128
  if (p.publish) {
129
129
  publish(p.dir);
130
- await sleep(1000);
130
+ await sleep(3000);
131
131
  }
132
132
  }
133
+ await sleep(5000);
133
134
 
134
135
  // for cli:
135
136
  // 1. update version
@@ -15,7 +15,10 @@ class PluginsCommand extends Command {
15
15
  */
16
16
  async run() {
17
17
  const db = require("@saltcorn/data/db");
18
- const { requirePlugin } = require("@saltcorn/server/load_plugins");
18
+ const {
19
+ requirePlugin,
20
+ ensurePluginSupport,
21
+ } = require("@saltcorn/server/load_plugins");
19
22
  const { getAllTenants } = require("@saltcorn/admin-models/models/tenant");
20
23
  const Plugin = require("@saltcorn/data/models/plugin");
21
24
  var plugins = [];
@@ -57,10 +60,19 @@ class PluginsCommand extends Command {
57
60
  if (flags.upgrade || flags.dryRun) {
58
61
  var new_versions = {};
59
62
  for (let plugin of plugins) {
60
- plugin.version = "latest";
61
- const { version } = await requirePlugin(plugin, true);
62
- //console.log(plinfo)
63
- if (version) new_versions[plugin.location] = version;
63
+ const oldVersion = plugin.version;
64
+ try {
65
+ plugin.version = "latest";
66
+ await ensurePluginSupport(plugin, true);
67
+ const { version } = await requirePlugin(plugin, true);
68
+ //console.log(plinfo)
69
+ if (version) new_versions[plugin.location] = version;
70
+ } catch (e) {
71
+ plugin.version = oldVersion;
72
+ console.log(
73
+ `Unable to find a supported version for '${plugin.location}'`
74
+ );
75
+ }
64
76
  }
65
77
  console.log(new_versions);
66
78
  for (const domain of tenantList) {
@@ -19,7 +19,7 @@ class ScheduleCommand extends Command {
19
19
  const db = require("@saltcorn/data/db");
20
20
  db.set_sql_logging();
21
21
  }
22
- const runScheduler = require("@saltcorn/data/models/scheduler");
22
+ const { runScheduler } = require("@saltcorn/data/models/scheduler");
23
23
  await runScheduler({});
24
24
  }
25
25
  }