profoundjs 5.8.2 → 6.0.0-beta.2
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/package.json +5 -5
- package/profound.jse +1 -1
- package/setup/modules/puiscreens.json +21 -88
- package/setup/package.json +1 -1
- package/setup/pjsdist.savf +0 -0
- package/setup/setup.js +11 -10
- package/setup/start.js +11 -18
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"screen": {
|
|
167
167
|
"record format name": "errscrn",
|
|
168
168
|
"disable enter key": "true",
|
|
169
|
-
"onload": "if ((window.puiMobileClient == null && window.device != null &&\n window.device.platform == \"iOS\") ||\n pui.genie != null) {\n\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphics button\");\n\n}\nif (pui.genie != null) {\n\n applyProperty(\"NewSessionButton\", \"value\", pui.getLanguageText(\"runtimeText\", \"ok\"));\n applyProperty(\"NewSessionButton\", \"onclick\", \"pui.click();\");\n\n}\npui.formatErrorText(); \npui.confirmOnClose = false; \npui.shutdownOnClose = false;\n\n// Activate download button if we have Job info\nif (
|
|
169
|
+
"onload": "if ((window.puiMobileClient == null && window.device != null &&\n window.device.platform == \"iOS\") ||\n pui.genie != null) {\n\n applyProperty(\"btnBack\", \"visibility\", \"hidden\");\n applyProperty(\"btnBack\", \"field type\", \"graphics button\");\n\n}\nif (pui.genie != null) {\n\n applyProperty(\"NewSessionButton\", \"value\", pui.getLanguageText(\"runtimeText\", \"ok\"));\n applyProperty(\"NewSessionButton\", \"onclick\", \"pui.click();\");\n\n}\npui.formatErrorText(); \npui.confirmOnClose = false; \npui.shutdownOnClose = false;\n\n// Activate download button if we have Job info\nif (pui[\"appJob\"] && typeof pui[\"appJob\"][\"appjoblogkey\"] === \"string\") {\n applyProperty(\"JobLogDownload\", \"visibility\", \"visible\");\n}\n"
|
|
170
170
|
},
|
|
171
171
|
"items": [
|
|
172
172
|
{
|
|
@@ -491,20 +491,6 @@
|
|
|
491
491
|
"layout": "ErrorPanel",
|
|
492
492
|
"container": "1"
|
|
493
493
|
},
|
|
494
|
-
{
|
|
495
|
-
"id": "appDwnld_icon",
|
|
496
|
-
"field type": "icon",
|
|
497
|
-
"icon": "material:file_download",
|
|
498
|
-
"left": "765px",
|
|
499
|
-
"top": "60px",
|
|
500
|
-
"cursor": "pointer",
|
|
501
|
-
"tool tip": "Script: pui.getLanguageText(\"runtimeText\",\"joblog download\")",
|
|
502
|
-
"visibility": "hidden",
|
|
503
|
-
"onclick": "\n// Get Application job and download the joblog\nvar appJob = get('ESAPPJOB').split('/');\nvar body = {name:appJob[2],user:appJob[1],number:appJob[0]};\n\nvar jobLogServer = get('ESPJSSRVR') + '/joblog';\n\nvar request = new XMLHttpRequest();\n\nrequest.onreadystatechange = function() {\n\n if (this.readyState == XMLHttpRequest.DONE && this.status == 200) {\n\n var response = JSON.parse(this.responseText);\n\n if (response[\"success\"] === true) {\n\n var job = {};\n\n job.data = response[\"jobLog\"][\"data\"];\n\n // Format the filename for download. You can override \n // this name if required.\n job.fileName = pui.getLanguageText(\"runtimeText\",\"app job\").replace(\" \", \"_\")\n + \"_\" + response[\"version\"] + \"_\" \n + response[\"jobLog\"][\"id\"] + \".txt\";\n\n pui.downloadJobLog(job);\n\n applyProperty(\"appDwnld_icon\", \"disabled\", \"true\");\n applyProperty(\"appDwnld_icon\", \"tool tip\", pui.getLanguageText(\"runtimeText\",\"upload finished text\"));\n }\n else {\n applyProperty(\"appDwnld_icon\", \"tool tip\", response[\"msg\"]);\n }\n }\n};\n\nrequest.open(\"POST\", jobLogServer, true);\nrequest.setRequestHeader(\"Content-type\", \"application/json;charset=UTF-8\");\n\nrequest.send(JSON.stringify(body));\n",
|
|
504
|
-
"color": "#659ABB",
|
|
505
|
-
"layout": "ErrorPanel",
|
|
506
|
-
"container": "1"
|
|
507
|
-
},
|
|
508
494
|
{
|
|
509
495
|
"id": "appJobLabel",
|
|
510
496
|
"field type": "output field",
|
|
@@ -546,7 +532,7 @@
|
|
|
546
532
|
"font weight": "bold",
|
|
547
533
|
"text align": "right",
|
|
548
534
|
"left": "320px",
|
|
549
|
-
"top": "
|
|
535
|
+
"top": "125px",
|
|
550
536
|
"width": "160px",
|
|
551
537
|
"layout": "ErrorPanel",
|
|
552
538
|
"container": "1"
|
|
@@ -555,7 +541,7 @@
|
|
|
555
541
|
"id": "ESCURRUSER",
|
|
556
542
|
"field type": "output field",
|
|
557
543
|
"left": "490px",
|
|
558
|
-
"top": "
|
|
544
|
+
"top": "125px",
|
|
559
545
|
"height": "15px",
|
|
560
546
|
"width": "130px",
|
|
561
547
|
"value": {
|
|
@@ -573,74 +559,6 @@
|
|
|
573
559
|
"layout": "ErrorPanel",
|
|
574
560
|
"container": "1"
|
|
575
561
|
},
|
|
576
|
-
{
|
|
577
|
-
"id": "remoteIpLabel",
|
|
578
|
-
"field type": "output field",
|
|
579
|
-
"value": "Script: pui.getLanguageText(\"runtimeText\",\"remote ip\") + ':'",
|
|
580
|
-
"font weight": "bold",
|
|
581
|
-
"text align": "right",
|
|
582
|
-
"left": "320px",
|
|
583
|
-
"top": "125px",
|
|
584
|
-
"width": "160px",
|
|
585
|
-
"layout": "ErrorPanel",
|
|
586
|
-
"container": "1"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"id": "ESRMTIP",
|
|
590
|
-
"field type": "output field",
|
|
591
|
-
"left": "490px",
|
|
592
|
-
"top": "125px",
|
|
593
|
-
"height": "15px",
|
|
594
|
-
"width": "130px",
|
|
595
|
-
"value": {
|
|
596
|
-
"fieldName": "esrmtip",
|
|
597
|
-
"dataLength": "10",
|
|
598
|
-
"trimLeading": "false",
|
|
599
|
-
"trimTrailing": "true",
|
|
600
|
-
"blankFill": "false",
|
|
601
|
-
"rjZeroFill": "false",
|
|
602
|
-
"dataType": "char",
|
|
603
|
-
"formatting": "Text",
|
|
604
|
-
"textTransform": "none",
|
|
605
|
-
"designValue": "[esrmtip]"
|
|
606
|
-
},
|
|
607
|
-
"layout": "ErrorPanel",
|
|
608
|
-
"container": "1"
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
"id": "remotePortLabel",
|
|
612
|
-
"field type": "output field",
|
|
613
|
-
"value": "Script: pui.getLanguageText(\"runtimeText\",\"remote port\") + ':'",
|
|
614
|
-
"font weight": "bold",
|
|
615
|
-
"text align": "right",
|
|
616
|
-
"left": "320px",
|
|
617
|
-
"top": "155px",
|
|
618
|
-
"width": "160px",
|
|
619
|
-
"layout": "ErrorPanel",
|
|
620
|
-
"container": "1"
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
"id": "ESRMTPORT",
|
|
624
|
-
"field type": "output field",
|
|
625
|
-
"left": "490px",
|
|
626
|
-
"top": "155px",
|
|
627
|
-
"height": "15px",
|
|
628
|
-
"width": "130px",
|
|
629
|
-
"value": {
|
|
630
|
-
"fieldName": "esrmtport",
|
|
631
|
-
"dataLength": "10",
|
|
632
|
-
"trimLeading": "false",
|
|
633
|
-
"trimTrailing": "true",
|
|
634
|
-
"blankFill": "false",
|
|
635
|
-
"rjZeroFill": "false",
|
|
636
|
-
"dataType": "char",
|
|
637
|
-
"formatting": "Text",
|
|
638
|
-
"textTransform": "none",
|
|
639
|
-
"designValue": "[esrmtport]"
|
|
640
|
-
},
|
|
641
|
-
"layout": "ErrorPanel",
|
|
642
|
-
"container": "1"
|
|
643
|
-
},
|
|
644
562
|
{
|
|
645
563
|
"id": "NewSessionButton",
|
|
646
564
|
"field type": "graphic button",
|
|
@@ -714,13 +632,28 @@
|
|
|
714
632
|
"designValue": "[espjssrvr]"
|
|
715
633
|
},
|
|
716
634
|
"text align": "right",
|
|
717
|
-
"left": "
|
|
718
|
-
"top": "
|
|
635
|
+
"left": "15px",
|
|
636
|
+
"top": "525px",
|
|
719
637
|
"height": "15px",
|
|
720
|
-
"width": "
|
|
638
|
+
"width": "70px",
|
|
721
639
|
"visibility": "hidden",
|
|
722
640
|
"layout": "ErrorPanel",
|
|
723
641
|
"container": "1"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"id": "JobLogDownload",
|
|
645
|
+
"field type": "html container",
|
|
646
|
+
"html": "Script: \"<span class=\\\"pui-material-icons\\\">file_download</span><span id=\\\"JobLogDownload_fb\\\">\" + pui.getLanguageText(\"runtimeText\",\"joblog download\") + \"</span>\"",
|
|
647
|
+
"left": "490px",
|
|
648
|
+
"top": "85px",
|
|
649
|
+
"height": "15px",
|
|
650
|
+
"width": "255px",
|
|
651
|
+
"visibility": "hidden",
|
|
652
|
+
"onclick": "var filename = pui.getLanguageText(\"runtimeText\",\"app job\");\nfilename.replace(\" \", \"_\");\nif (pui[\"appJob\"]){\n if (typeof pui[\"appJob\"][\"id\"] === \"string\"){\n var jobParts = pui[\"appJob\"][\"id\"].split(\"/\");\n if (jobParts.length == 3){\n filename += \"_\" + jobParts[0]+\"_\"+jobParts[1]+\"_\"+jobParts[2];\n }\n }\n else {\n filename += \"_\" + (pui[\"appJob\"][\"number\"] ? pui[\"appJob\"][\"number\"] : \"\");\n filename += \"_\" + (pui[\"appJob\"][\"user\"] ? pui[\"appJob\"][\"user\"] : \"\");\n filename += \"_\" + (pui[\"appJob\"][\"name\"] ? pui[\"appJob\"][\"name\"] : \"\");\n }\n}\nfilename += \".txt\";\n\ntry {\n // 1. Job; 2. The server with the job logs; 3. filename prefx; 4. element to get feedback text. (output)\n pui.downloadJobLog(\n pui[\"appJob\"][\"appjoblogkey\"],\n null,\n filename,\n getObj(\"JobLogDownload_fb\") );\n}\ncatch(exc){\n console.log(exc);\n}",
|
|
653
|
+
"tool tip": "Script: pui.getLanguageText(\"runtimeText\",\"joblog download\")",
|
|
654
|
+
"css class": "joblogDL",
|
|
655
|
+
"layout": "ErrorPanel",
|
|
656
|
+
"container": "1"
|
|
724
657
|
}
|
|
725
658
|
]
|
|
726
659
|
},
|
package/setup/package.json
CHANGED
package/setup/pjsdist.savf
CHANGED
|
Binary file
|
package/setup/setup.js
CHANGED
|
@@ -174,15 +174,12 @@ function createPackageFile() {
|
|
|
174
174
|
|
|
175
175
|
function createStart(callback) {
|
|
176
176
|
if (fileExists(deployDir + dirSep + "start.js")) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
console.log("start.js file converted to Promises.");
|
|
184
|
-
}
|
|
185
|
-
}
|
|
177
|
+
console.log("start.js file exists.");
|
|
178
|
+
const convertStartJS = require("./convertStartJS.js");
|
|
179
|
+
const changed = convertStartJS(deployDir + dirSep + "start.js");
|
|
180
|
+
if (changed) {
|
|
181
|
+
console.log("start.js file converted to Promises.");
|
|
182
|
+
}
|
|
186
183
|
callback();
|
|
187
184
|
}
|
|
188
185
|
else {
|
|
@@ -306,7 +303,11 @@ function createPuiscreens() {
|
|
|
306
303
|
break;
|
|
307
304
|
|
|
308
305
|
case "2becc968e9db1acc1ffd6e3885d95c153d678468e69a4fdef0df725c06897b7f6ddcff82d703cb76724774729b18b56307445e728521311dbf256b97e17538d8":
|
|
309
|
-
|
|
306
|
+
copyFileOldVersionIs("5.2.0");
|
|
307
|
+
break;
|
|
308
|
+
|
|
309
|
+
case "af04803ac52709fd25f6fc87ff3ea309ad03ee6a9631f32511a5aa32c5ae50f34fd0e38e0d47dea223ac0c5dfb595199c623a83772af830edd21378055403e5c":
|
|
310
|
+
console.log("Found Standard puiscreens.json file version >= 6.0.0, no need for update.");
|
|
310
311
|
break;
|
|
311
312
|
|
|
312
313
|
default:
|
package/setup/start.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
profoundjs.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (isWorker) {
|
|
13
|
-
|
|
14
|
-
// This is the top-level Express Application.
|
|
15
|
-
// Custom Express coding can be added here.
|
|
16
|
-
var express = profoundjs.server.express;
|
|
17
|
-
var app = profoundjs.server.app;
|
|
18
|
-
app.use(express.json()); // default to use JSON-encoded post data
|
|
19
|
-
|
|
2
|
+
async function startPJS() {
|
|
3
|
+
var profoundjs = require("profoundjs");
|
|
4
|
+
var config = require("./config.js");
|
|
5
|
+
profoundjs.applyConfig(config);
|
|
6
|
+
var isWorker = await profoundjs.server.listen();
|
|
7
|
+
if (isWorker) {
|
|
8
|
+
var express = profoundjs.server.express;
|
|
9
|
+
var app = profoundjs.server.app;
|
|
10
|
+
app.use(express.json());
|
|
11
|
+
}
|
|
20
12
|
}
|
|
13
|
+
startPJS();
|