profoundjs 7.22.1 → 7.23.0
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/htdocs/profoundui/proddata/css/profoundai.css +39 -9
- package/htdocs/profoundui/proddata/css/profoundui.css +20 -1
- package/htdocs/profoundui/proddata/js/atrium.js +500 -509
- package/htdocs/profoundui/proddata/js/atrium_api.js +6 -6
- package/htdocs/profoundui/proddata/js/designer.js +4937 -5056
- package/htdocs/profoundui/proddata/js/genie.js +3142 -3225
- package/htdocs/profoundui/proddata/js/profoundai.js +34 -31
- package/htdocs/profoundui/proddata/js/runtime.js +1867 -1898
- package/htdocs/profoundui/proddata/js/signon.js +102 -107
- package/index.js +1 -0
- package/package.json +2 -2
- package/profound.jse +1 -1
- package/setup/call.js +2 -0
- package/setup/completeInstall.js +3 -1
- package/setup/convertStartJS.js +2 -2
- package/setup/pjsdist.savf +0 -0
- package/setup/plugins/mathoperation.js +75 -79
- package/setup/start.js +3 -2
- package/setup/store_credentials.js +2 -0
- package/setup/store_options.js +2 -0
package/setup/call.js
CHANGED
package/setup/completeInstall.js
CHANGED
|
@@ -273,6 +273,7 @@ Valid arguments for --silent mode:
|
|
|
273
273
|
}
|
|
274
274
|
else {
|
|
275
275
|
let content = fs.readFileSync(path.join(iutils.getSetupDir(), "config.js"), "utf8");
|
|
276
|
+
// eslint-disable-next-line no-eval
|
|
276
277
|
eval("config = " + content.substring(content.indexOf("{")));
|
|
277
278
|
config.port = answers.port;
|
|
278
279
|
if (answers.connectorLibrary) {
|
|
@@ -316,7 +317,8 @@ Valid arguments for --silent mode:
|
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
installSamples = answers.installSamples == true;
|
|
319
|
-
}
|
|
320
|
+
}
|
|
321
|
+
else if (IBMi && args.silent === true && args.configure !== true && args.strtcpsvr_svrname) {
|
|
320
322
|
if (validateServer(args.strtcpsvr_svrname) === true) {
|
|
321
323
|
svrname = args.strtcpsvr_svrname;
|
|
322
324
|
autostart = args.strtcpsvr_autostart;
|
package/setup/convertStartJS.js
CHANGED
|
@@ -4,7 +4,7 @@ const acorn = require("acorn");
|
|
|
4
4
|
const estraverse = require("estraverse");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const moment = require("moment");
|
|
7
|
-
|
|
7
|
+
require("profoundjs");
|
|
8
8
|
|
|
9
9
|
module.exports = function(file) {
|
|
10
10
|
let content = fs.readFileSync(file, "utf8");
|
|
@@ -152,7 +152,6 @@ module.exports = function(file) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
const fn = fnStack[fnStack.length - 1];
|
|
155
|
-
const scope = scopeMap.get(scopeStack[scopeStack.length - 1]);
|
|
156
155
|
if (isFunction(node)) {
|
|
157
156
|
// Update function map entries with function name and name scope.
|
|
158
157
|
const fnInfo = fnMap.get(node);
|
|
@@ -195,6 +194,7 @@ module.exports = function(file) {
|
|
|
195
194
|
const internalName = "profound" + getCallName(calleeName.substring(pjsPrefix.length));
|
|
196
195
|
let fn;
|
|
197
196
|
try {
|
|
197
|
+
// eslint-disable-next-line no-eval
|
|
198
198
|
eval("fn = " + internalName);
|
|
199
199
|
}
|
|
200
200
|
catch (error) {}
|
package/setup/pjsdist.savf
CHANGED
|
Binary file
|
|
@@ -1,84 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
|
|
2
3
|
module.exports = {
|
|
3
|
-
|
|
4
|
-
name: "Math-Operation",
|
|
5
|
-
|
|
6
|
-
// The title that is displayed for this sample plugin on the plugin selection
|
|
7
|
-
text: "Math Operation",
|
|
8
|
-
|
|
9
|
-
// The plugin category that the sample plugin will be placed into.
|
|
10
|
-
// A category will be created if the category name does not currently exist
|
|
11
|
-
category: "Sample User Plugins",
|
|
12
|
-
|
|
13
|
-
// The help text that is displayed when the help icon is clicked on this plugin's menu
|
|
14
|
-
help: `This plugin does a math operation set by the user for 2 different numbers from 2 widget sources`,
|
|
15
|
-
|
|
16
|
-
// Specifies if the plugin is a client-side or server-side step. A plugin is server-side by default.
|
|
17
|
-
clientSide: true,
|
|
18
|
-
|
|
19
|
-
context: "rdf",
|
|
20
|
-
|
|
21
|
-
// An array used to generate the plugin questions and assign values set by the user.
|
|
22
|
-
questions: [
|
|
23
4
|
|
|
24
|
-
|
|
25
|
-
id: "firstNumber",
|
|
26
|
-
text: "ID of Widget containing the first number",
|
|
27
|
-
required: true,
|
|
28
|
-
insertDynamic: true,
|
|
29
|
-
dynamicSource: "widgets"
|
|
30
|
-
},
|
|
5
|
+
name: "Math-Operation",
|
|
31
6
|
|
|
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
|
-
|
|
7
|
+
// The title that is displayed for this sample plugin on the plugin selection
|
|
8
|
+
text: "Math Operation",
|
|
9
|
+
|
|
10
|
+
// The plugin category that the sample plugin will be placed into.
|
|
11
|
+
// A category will be created if the category name does not currently exist
|
|
12
|
+
category: "Sample User Plugins",
|
|
13
|
+
|
|
14
|
+
// The help text that is displayed when the help icon is clicked on this plugin's menu
|
|
15
|
+
help: `This plugin does a math operation set by the user for 2 different numbers from 2 widget sources`,
|
|
16
|
+
|
|
17
|
+
// Specifies if the plugin is a client-side or server-side step. A plugin is server-side by default.
|
|
18
|
+
clientSide: true,
|
|
19
|
+
|
|
20
|
+
context: "rdf",
|
|
21
|
+
|
|
22
|
+
// An array used to generate the plugin questions and assign values set by the user.
|
|
23
|
+
questions: [
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
id: "firstNumber",
|
|
27
|
+
text: "ID of Widget containing the first number",
|
|
28
|
+
required: true,
|
|
29
|
+
insertDynamic: true,
|
|
30
|
+
dynamicSource: "widgets"
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
{
|
|
34
|
+
id: "secondNumber",
|
|
35
|
+
text: "ID of Widget containing the second number",
|
|
36
|
+
required: true,
|
|
37
|
+
insertDynamic: true,
|
|
38
|
+
dynamicSource: "widgets"
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
{
|
|
42
|
+
id: "operation",
|
|
43
|
+
text: "Math operation",
|
|
44
|
+
required: true,
|
|
45
|
+
type: "dropdown",
|
|
46
|
+
source: ["+", "-", "*", "/"]
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
id: "result",
|
|
51
|
+
text: "ID of Widget where result will be stored",
|
|
52
|
+
required: true,
|
|
53
|
+
insertDynamic: true,
|
|
54
|
+
dynamicSource: "widgets"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
|
|
58
|
+
// This is where code is generated for the plugin once the questions are answered.
|
|
59
|
+
// You can also see this code via the "convert to code" plugin icon.
|
|
60
|
+
generator: function(answers) {
|
|
61
|
+
let code = "";
|
|
62
|
+
|
|
63
|
+
switch (answers["operation"]) {
|
|
64
|
+
case "+":
|
|
65
|
+
code = 'pui.set( "' + answers.result + '", parseInt( pui.get("' + answers.firstNumber + '") ) + parseInt( pui.get("' + answers.secondNumber + '") ) );';
|
|
66
|
+
break;
|
|
67
|
+
case "-":
|
|
68
|
+
code = 'pui.set( "' + answers.result + '", parseInt( pui.get("' + answers.firstNumber + '") ) - parseInt( pui.get("' + answers.secondNumber + '") ) );';
|
|
69
|
+
break;
|
|
70
|
+
case "*":
|
|
71
|
+
code = 'pui.set( "' + answers.result + '", parseInt( pui.get("' + answers.firstNumber + '") ) * parseInt( pui.get("' + answers.secondNumber + '") ) );';
|
|
72
|
+
break;
|
|
73
|
+
case "/":
|
|
74
|
+
code = 'pui.set( "' + answers.result + '", parseInt( pui.get("' + answers.firstNumber + '") ) / parseInt( pui.get("' + answers.secondNumber + '") ) );';
|
|
75
|
+
break;
|
|
83
76
|
}
|
|
84
|
-
|
|
77
|
+
|
|
78
|
+
return code;
|
|
79
|
+
}
|
|
80
|
+
};
|
package/setup/start.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
2
3
|
async function startPJS() {
|
|
3
4
|
const profoundjs = require("profoundjs");
|
|
4
5
|
await profoundjs.applyConfig();
|
|
5
6
|
await profoundjs.server.listen();
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const express = profoundjs.server.express;
|
|
8
|
+
const app = profoundjs.server.app;
|
|
8
9
|
app.use(express.json());
|
|
9
10
|
}
|
|
10
11
|
startPJS();
|