@saltcorn/cli 1.0.0-beta.9 → 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.
- package/README.md +46 -46
- package/npm-shrinkwrap.json +1174 -1207
- package/oclif.manifest.json +1 -1
- package/package.json +9 -9
- package/src/commands/build-cordova-builder.js +2 -1
- package/src/commands/plugins.js +17 -5
- package/src/commands/scheduler.js +1 -1
package/oclif.manifest.json
CHANGED
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-
|
|
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-
|
|
15
|
-
"@saltcorn/common-code": "1.0.0-
|
|
16
|
-
"@saltcorn/data": "1.0.0-
|
|
17
|
-
"@saltcorn/mobile-app": "1.0.0-
|
|
18
|
-
"@saltcorn/mobile-builder": "1.0.0-
|
|
19
|
-
"@saltcorn/plugins-loader": "1.0.0-
|
|
20
|
-
"@saltcorn/server": "1.0.0-
|
|
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
|
|
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());
|
package/src/commands/plugins.js
CHANGED
|
@@ -15,7 +15,10 @@ class PluginsCommand extends Command {
|
|
|
15
15
|
*/
|
|
16
16
|
async run() {
|
|
17
17
|
const db = require("@saltcorn/data/db");
|
|
18
|
-
const {
|
|
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
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
}
|