@kumologica/sdk 3.5.4 → 3.6.0-beta2
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/commands/open.js +4 -2
- package/cli/commands/start.js +140 -0
- package/package.json +5 -5
- package/src/app/main-process/main-window.js +1 -0
- package/src/app/main-process/modal-home.js +1 -0
- package/src/app/main-process/modal-newproject.js +1 -0
- package/src/app/main-process/modal-newtab.js +1 -0
- package/src/app/main-process/modal-nodelibrary.js +1 -0
- package/src/app/main-process/modal-renameTab.js +1 -0
- package/src/app/main-process/modal-welcome.js +1 -0
- package/src/app/main.js +3 -1
- package/src/app/preload.js +0 -2
- package/src/app/ui/editor-client/public/red/style.min.css +1 -1
- package/src/app/ui/editor-client/public/vendor/ace-linters/javascript-service.js +10 -2
- package/src/app/ui/editor-client/src/sass/editor.scss +745 -746
- package/src/app/ui/editor-client/src/vendor/ace-linters/build/javascript-service.js +10 -2
- package/src/app/ui/editor-client/templates/index.mst +1 -1
- package/src/server/DesignerServer.js +152 -153
|
@@ -22470,7 +22470,7 @@ var require_acorn = __commonJS({
|
|
|
22470
22470
|
// (the latest version the library supports). This influences
|
|
22471
22471
|
// support for strict mode, the set of reserved words, and support
|
|
22472
22472
|
// for new syntax features.
|
|
22473
|
-
ecmaVersion: null,
|
|
22473
|
+
ecmaVersion: null,
|
|
22474
22474
|
// `sourceType` indicates the mode the code should be parsed in.
|
|
22475
22475
|
// Can be either `"script"` or `"module"`. This influences global
|
|
22476
22476
|
// strict mode and parsing of `import` and `export` declarations.
|
|
@@ -22618,7 +22618,12 @@ var require_acorn = __commonJS({
|
|
|
22618
22618
|
}
|
|
22619
22619
|
var BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5;
|
|
22620
22620
|
var Parser = function Parser2(options, input, startPos) {
|
|
22621
|
+
|
|
22622
|
+
|
|
22621
22623
|
this.options = options = getOptions(options);
|
|
22624
|
+
this.options.sourceType = "module"; // overrite by kumologica
|
|
22625
|
+
this.options.ecmaVersion = 2022;
|
|
22626
|
+
|
|
22622
22627
|
this.sourceFile = options.sourceFile;
|
|
22623
22628
|
this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]);
|
|
22624
22629
|
var reserved = "";
|
|
@@ -85304,7 +85309,8 @@ var require_no_undef = __commonJS({
|
|
|
85304
85309
|
identifier.name === 'msg' ||
|
|
85305
85310
|
identifier.name ==='vars' ||
|
|
85306
85311
|
identifier.name === 'env' ||
|
|
85307
|
-
identifier.name === 'node'
|
|
85312
|
+
identifier.name === 'node'
|
|
85313
|
+
) return;
|
|
85308
85314
|
|
|
85309
85315
|
context.report({
|
|
85310
85316
|
node: identifier,
|
|
@@ -104042,6 +104048,8 @@ var require_linter = __commonJS({
|
|
|
104042
104048
|
nodeType: null
|
|
104043
104049
|
}
|
|
104044
104050
|
};
|
|
104051
|
+
|
|
104052
|
+
|
|
104045
104053
|
}
|
|
104046
104054
|
}
|
|
104047
104055
|
function createRuleListeners(rule, ruleContext) {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</head>
|
|
48
48
|
<body spellcheck="false" style="overflow: hidden !important">
|
|
49
49
|
<div class="win-top-separator" style="display:flex; height:1px; border-top:1px solid #ddd"></div>
|
|
50
|
-
<div id="header"
|
|
50
|
+
<div id="header">
|
|
51
51
|
<!-- <span class="logo">{{#header.url}}<a href="{{.}}">{{/header.url}}{{#header.image}}<img src="{{.}}">{{/header.image}} <span>{{ header.title }}</span>{{#header.url}}</a>{{/header.url}}</span> -->
|
|
52
52
|
<!-- <ul class="header-toolbar hide"> -->
|
|
53
53
|
<div id="left">
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
const {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = require(
|
|
6
|
-
const tcpPortUsed = require(
|
|
2
|
+
AbstractServerfulServer,
|
|
3
|
+
ConfigBuilder,
|
|
4
|
+
PLATFORMS,
|
|
5
|
+
} = require("@kumologica/runtime");
|
|
6
|
+
const tcpPortUsed = require("tcp-port-used");
|
|
7
7
|
|
|
8
|
+
const os = require("os");
|
|
8
9
|
/**
|
|
9
10
|
* This class will encapsulate the adminApp and FlowApp into two servers.
|
|
10
11
|
* It will be the one running on the development box of the user (either local or remote),
|
|
@@ -12,155 +13,153 @@ const tcpPortUsed = require('tcp-port-used');
|
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
class DesignerServer {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @param {Object} options - Configuration options.
|
|
18
|
+
* @param {string} options.flowPath - The path of the flow.
|
|
19
|
+
* @param {boolean} options.safe - A boolean indicating safety.
|
|
20
|
+
* @param {Object} options.cliParams - Command line parameters as an object.
|
|
21
|
+
* @param {Object} options.editorApi - API object for the editor.
|
|
22
|
+
* @param {Object} options.startupEmitter - EventEmitter object for handling events.
|
|
23
|
+
* @param {string} options.platform - The platform to run on. Default LOCAL.
|
|
24
|
+
*/
|
|
25
|
+
constructor(options) {
|
|
26
|
+
if (!options.flowPath) {
|
|
27
|
+
console.log(
|
|
28
|
+
"[ERROR] Flow is not defined. Make sure you pass the flow file to the constructor of FlowBuilder"
|
|
29
|
+
);
|
|
30
|
+
os.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
this.editorApi = options.editorApi;
|
|
34
|
+
this.startupEmitter = options.startupEmitter;
|
|
35
|
+
|
|
36
|
+
this.config = ConfigBuilder.getInstance().buildConfig(
|
|
37
|
+
options.flowPath,
|
|
38
|
+
options.platform || PLATFORMS.LOCAL,
|
|
39
|
+
options.cliParams
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async start() {
|
|
44
|
+
// Check if port passed by parameter is available otherwise allocate a new one
|
|
45
|
+
this.config.port = await this.allocatePort(this.config.port);
|
|
46
|
+
this.flowServer = new AbstractServerfulServer(
|
|
47
|
+
this.config,
|
|
48
|
+
this.editorApi,
|
|
49
|
+
this.startupEmitter
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
await this.flowServer.start();
|
|
53
|
+
this.flowServer.log.debug(
|
|
54
|
+
`Runtime Configuration:${JSON.stringify(this.config, null, 2)}`
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async allocatePort(port) {
|
|
59
|
+
let inUse = await tcpPortUsed.check(port);
|
|
60
|
+
if (inUse) {
|
|
61
|
+
let newPort = port + 1;
|
|
62
|
+
console.log(`> Port: ${port} in use. Trying with port: ${newPort}...`);
|
|
63
|
+
return await this.allocatePort(newPort);
|
|
64
|
+
} else {
|
|
65
|
+
return port;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
getFlowServer() {
|
|
70
|
+
return this.flowServer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
getListeningPort() {
|
|
74
|
+
return this.flowServer.serverSettings.port;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async stop() {
|
|
78
|
+
await this.flowServer.stop();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The express application for HTTP Nodes
|
|
83
|
+
*/
|
|
84
|
+
get httpNode() {
|
|
85
|
+
return this.flowServer.httpNode.expressApp;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Pointer to the internal HTTP Server upon which all the express applications (Nodes and Admin) are deployed upon
|
|
90
|
+
*
|
|
91
|
+
* @readonly
|
|
92
|
+
*/
|
|
93
|
+
get server() {
|
|
94
|
+
return this.flowServer.server;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Access to internal runtime api
|
|
99
|
+
*/
|
|
100
|
+
get runtime() {
|
|
101
|
+
return this.flowServer.runtime;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* Returns the version of the runtime lib used internally
|
|
107
|
+
* @readonly
|
|
108
|
+
* @static
|
|
109
|
+
*/
|
|
110
|
+
static get version() {
|
|
111
|
+
return AbstractServerfulServer.version;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* This provides access to the internal settings module of the
|
|
116
|
+
* runtime.
|
|
117
|
+
* This is the object derived from the server settings.
|
|
118
|
+
*/
|
|
119
|
+
get settings() {
|
|
120
|
+
return this.flowServer._.settings;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* EventEmitter use to publish and subscribe to internal runtime events
|
|
125
|
+
* For example:
|
|
126
|
+
* runtime.events.on(
|
|
127
|
+
* 'runtime-event',
|
|
128
|
+
* (flowStarted = async data => {
|
|
129
|
+
* if (data.id === 'flow-started') {
|
|
130
|
+
* runtime.events.removeListener('runtime-event', flowStarted);
|
|
131
|
+
*
|
|
132
|
+
* @readonly
|
|
133
|
+
*/
|
|
134
|
+
get events() {
|
|
135
|
+
return this.flowServer.events;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
get eventTypes() {
|
|
139
|
+
return this.flowServer.runtimeEventTypes;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* This provides access to the internal nodes module of the
|
|
144
|
+
* runtime. The details of this API remain undocumented as they should not
|
|
145
|
+
* be used directly.
|
|
146
|
+
*
|
|
147
|
+
* Most administrative actions should be performed use the runtime api
|
|
148
|
+
* under [node.runtime]
|
|
149
|
+
*/
|
|
150
|
+
get nodes() {
|
|
151
|
+
return this.flowServer._.nodes;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
get log() {
|
|
155
|
+
return this.flowServer.log;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
get util() {
|
|
159
|
+
return this.flowServer.util;
|
|
160
|
+
}
|
|
162
161
|
}
|
|
163
162
|
|
|
164
163
|
module.exports = {
|
|
165
|
-
|
|
164
|
+
DesignerServer,
|
|
166
165
|
};
|