@kumologica/sdk 3.6.0-beta2 → 3.6.0-beta4
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/cli/cli.js +30 -8
- package/cli/commands/{start.js → serve.js} +7 -8
- package/package.json +4 -4
- package/src/app/ui/editor-client/public/red/red.js +828 -2
- package/src/app/ui/editor-client/public/red/red.min.js +1 -1
- package/src/app/ui/editor-client/public/red/style.min.css +1 -1
- package/src/app/ui/editor-client/src/js/ui/sidebar.js +1 -1
- package/src/app/ui/editor-client/src/sass/style.scss +1 -0
package/cli/cli.js
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
|
-
const
|
|
1
|
+
const { logError } = require("./utils/logger"); //("../utils/logger");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
const validCommands = [
|
|
4
|
+
"build",
|
|
5
|
+
"create-node",
|
|
6
|
+
"create",
|
|
7
|
+
"doc",
|
|
8
|
+
"export",
|
|
9
|
+
"list-templates",
|
|
10
|
+
"login",
|
|
11
|
+
"open",
|
|
12
|
+
"serve",
|
|
13
|
+
"test",
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
require("yargs/yargs")(process.argv.slice(2))
|
|
17
|
+
.commandDir("commands")
|
|
18
|
+
.demandCommand(1, "Error: Command missing.")
|
|
19
|
+
.check((argv) => {
|
|
20
|
+
if (!validCommands.includes(argv._[0].toLowerCase())) {
|
|
21
|
+
throw new Error(`Unknown command: ${argv._[0]}. `);
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
})
|
|
25
|
+
.help("help", "Show usage information & exit")
|
|
26
|
+
.alias("help", "h")
|
|
27
|
+
.fail((msg, err, yargs) => {
|
|
28
|
+
logError(msg);
|
|
29
|
+
yargs.showHelp();
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}).argv;
|
|
@@ -29,8 +29,8 @@ const { DesignerServer } = require("../../src/server/DesignerServer");
|
|
|
29
29
|
const { logError, logNotice, logInfo, logFatal } = require("../utils/logger");
|
|
30
30
|
// const opn = require('better-opn');
|
|
31
31
|
|
|
32
|
-
exports.command = "
|
|
33
|
-
exports.desc = `
|
|
32
|
+
exports.command = "serve [project_directory]";
|
|
33
|
+
exports.desc = `Start a local HTTP server to serve a project`;
|
|
34
34
|
|
|
35
35
|
exports.builder = (yargs) => {
|
|
36
36
|
yargs.positional(`project_directory`, {
|
|
@@ -50,17 +50,16 @@ exports.builder = (yargs) => {
|
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
exports.desc = "Starting Kumologica Runtime for Development";
|
|
54
|
-
|
|
55
53
|
exports.handler = async ({ project_directory, loglevel, port, secured }) => {
|
|
56
|
-
logNotice(`
|
|
54
|
+
logNotice(`Starting HTTP Server...`);
|
|
55
|
+
let projectDirectory = project_directory || process.cwd();
|
|
57
56
|
// project_directory can point to a directory or a flow, so lets make sure that first the directory exists
|
|
58
57
|
let absProjectDirectory;
|
|
59
58
|
|
|
60
59
|
try {
|
|
61
|
-
absProjectDirectory = fs.realpathSync(
|
|
60
|
+
absProjectDirectory = fs.realpathSync(projectDirectory);
|
|
62
61
|
} catch (err) {
|
|
63
|
-
logFatal(`Project not found: ${
|
|
62
|
+
logFatal(`Project not found: ${projectDirectory}`);
|
|
64
63
|
process.exit(1);
|
|
65
64
|
}
|
|
66
65
|
|
|
@@ -123,7 +122,7 @@ function resolveProjectFlowPath(projectDir) {
|
|
|
123
122
|
projectFlowDirname = path.dirname(projectDirOrFile);
|
|
124
123
|
projectFlowFullPath = projectDirOrFile;
|
|
125
124
|
} else {
|
|
126
|
-
logError(`Directory does not exist: ${
|
|
125
|
+
logError(`Directory does not exist: ${projectDirOrFile}`);
|
|
127
126
|
process.exit(1);
|
|
128
127
|
}
|
|
129
128
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumologica/sdk",
|
|
3
|
-
"version": "3.6.0-
|
|
3
|
+
"version": "3.6.0-beta4",
|
|
4
4
|
"productName": "Kumologica Designer",
|
|
5
5
|
"copyright": "Copyright 2020 Kumologica Pty Ltd, All Rights Reserved.",
|
|
6
6
|
"author": "Kumologica Pty Ltd <contact@kumologica.com>",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"@aws-sdk/credential-providers": "^3.556.0",
|
|
83
83
|
"@aws-sdk/lib-dynamodb": "^3.549.0",
|
|
84
84
|
"@electron/remote": "^2.0.8",
|
|
85
|
-
"@kumologica/builder": "3.6.0-
|
|
86
|
-
"@kumologica/devkit": "3.6.0-
|
|
87
|
-
"@kumologica/runtime": "3.6.0-
|
|
85
|
+
"@kumologica/builder": "3.6.0-beta4",
|
|
86
|
+
"@kumologica/devkit": "3.6.0-beta4",
|
|
87
|
+
"@kumologica/runtime": "3.6.0-beta4",
|
|
88
88
|
"adm-zip": "0.4.13",
|
|
89
89
|
"ajv": "8.10.0",
|
|
90
90
|
"archive-type": "^4.0.0",
|