@saltcorn/cli 1.3.1-beta.9 → 1.3.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 +51 -50
- package/npm-shrinkwrap.json +859 -2540
- package/oclif.manifest.json +8 -1
- package/package.json +8 -8
- package/src/commands/build-app.js +4 -2
- package/src/commands/dev/plugin-test.js +7 -0
- package/src/commands/list-tenants.js +3 -1
package/oclif.manifest.json
CHANGED
|
@@ -879,6 +879,13 @@
|
|
|
879
879
|
"name": "json",
|
|
880
880
|
"allowNo": false,
|
|
881
881
|
"type": "boolean"
|
|
882
|
+
},
|
|
883
|
+
"plain": {
|
|
884
|
+
"char": "p",
|
|
885
|
+
"description": "plain text format",
|
|
886
|
+
"name": "plain",
|
|
887
|
+
"allowNo": false,
|
|
888
|
+
"type": "boolean"
|
|
882
889
|
}
|
|
883
890
|
},
|
|
884
891
|
"hasDynamicHelp": false,
|
|
@@ -2240,5 +2247,5 @@
|
|
|
2240
2247
|
]
|
|
2241
2248
|
}
|
|
2242
2249
|
},
|
|
2243
|
-
"version": "1.3.1
|
|
2250
|
+
"version": "1.3.1"
|
|
2244
2251
|
}
|
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.3.1
|
|
5
|
+
"version": "1.3.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": "4.4.0",
|
|
13
13
|
"@oclif/plugin-plugins": "^5.4.26",
|
|
14
|
-
"@saltcorn/admin-models": "1.3.1
|
|
15
|
-
"@saltcorn/common-code": "1.3.1
|
|
16
|
-
"@saltcorn/data": "1.3.1
|
|
17
|
-
"@saltcorn/mobile-app": "1.3.1
|
|
18
|
-
"@saltcorn/mobile-builder": "1.3.1
|
|
19
|
-
"@saltcorn/plugins-loader": "1.3.1
|
|
20
|
-
"@saltcorn/server": "1.3.1
|
|
14
|
+
"@saltcorn/admin-models": "1.3.1",
|
|
15
|
+
"@saltcorn/common-code": "1.3.1",
|
|
16
|
+
"@saltcorn/data": "1.3.1",
|
|
17
|
+
"@saltcorn/mobile-app": "1.3.1",
|
|
18
|
+
"@saltcorn/mobile-builder": "1.3.1",
|
|
19
|
+
"@saltcorn/plugins-loader": "1.3.1",
|
|
20
|
+
"@saltcorn/server": "1.3.1",
|
|
21
21
|
"contractis": "^0.1.0",
|
|
22
22
|
"dateformat": "^4.6.3",
|
|
23
23
|
"inquirer": "^12.3.3",
|
|
@@ -27,8 +27,10 @@ class BuildAppCommand extends Command {
|
|
|
27
27
|
"When 'app target-directory' (-c) is set, a valid 'user email' (-u) is needed"
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
if (!flags.entryPoint) {
|
|
31
|
-
throw new Error(
|
|
30
|
+
if (!flags.entryPoint && flags.entryPointType !== "byrole") {
|
|
31
|
+
throw new Error(
|
|
32
|
+
"Please specify an entry point for the first view or use -t byrole"
|
|
33
|
+
);
|
|
32
34
|
}
|
|
33
35
|
if (!flags.platforms) {
|
|
34
36
|
throw new Error("Please specify a platform (android or iOS)");
|
|
@@ -27,6 +27,7 @@ const adminModelsDir = process.env.JEST_SC_ADMIN_MODELS_DIR;
|
|
|
27
27
|
const modulePath = process.env.TEST_PLUGIN_PACKAGES_DIR;
|
|
28
28
|
const config = {
|
|
29
29
|
moduleNameMapper: {
|
|
30
|
+
"mjml": "${path.join(location, "mjml.js")}",
|
|
30
31
|
"@saltcorn/sqlite/(.*)": sqliteDir + "/$1",
|
|
31
32
|
"@saltcorn/db-common/(.*)": dbCommonDir + "/$1",
|
|
32
33
|
"@saltcorn/data/(.*)": dataDir + "/$1",
|
|
@@ -41,6 +42,11 @@ module.exports = config;`
|
|
|
41
42
|
);
|
|
42
43
|
};
|
|
43
44
|
|
|
45
|
+
const writeMockFilesIntoPluginDir = (location) => {
|
|
46
|
+
const mjmlPath = path.join(location, "mjml.js");
|
|
47
|
+
if (!fs.existsSync(mjmlPath)) fs.writeFileSync(mjmlPath, "");
|
|
48
|
+
};
|
|
49
|
+
|
|
44
50
|
const spawnTest = async (installDir, env) => {
|
|
45
51
|
const scEnvVars = {};
|
|
46
52
|
for (const pckName of [
|
|
@@ -76,6 +82,7 @@ const installPlugin = async (plugin) => {
|
|
|
76
82
|
removePluginsDir();
|
|
77
83
|
await loadAndSaveNewPlugin(plugin, false, false);
|
|
78
84
|
const location = getPluginLocation(plugin.name);
|
|
85
|
+
writeMockFilesIntoPluginDir(location);
|
|
79
86
|
writeJestConfigIntoPluginDir(location);
|
|
80
87
|
return location;
|
|
81
88
|
};
|
|
@@ -44,7 +44,8 @@ class ListTenantsCommand extends Command {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// print
|
|
47
|
-
if (
|
|
47
|
+
if (flags.plain) for (const domain of tenantList) console.log(domain);
|
|
48
|
+
else if (!flags.verbose) print_table(tenantDetails, ["domain"], flags.json);
|
|
48
49
|
else
|
|
49
50
|
print_table(
|
|
50
51
|
tenantDetails,
|
|
@@ -93,6 +94,7 @@ ListTenantsCommand.flags = {
|
|
|
93
94
|
required: false,
|
|
94
95
|
}),
|
|
95
96
|
json: Flags.boolean({ char: "j", description: "json format" }),
|
|
97
|
+
plain: Flags.boolean({ char: "p", description: "plain text format" }),
|
|
96
98
|
};
|
|
97
99
|
|
|
98
100
|
module.exports = ListTenantsCommand;
|