profoundjs 6.0.0-beta.7 → 6.0.0-beta.9
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 +4 -3
- package/profound.jse +1 -1
- package/setup/completeInstall.js +17 -3
- package/setup/config.js +4 -1
- package/setup/install_utils.js +6 -0
- package/setup/package.json +2 -2
- package/setup/pjsdist.savf +0 -0
- package/setup/setup.js +1 -1
- package/setup/start.js +4 -6
package/setup/completeInstall.js
CHANGED
|
@@ -21,7 +21,10 @@ const path = require("path");
|
|
|
21
21
|
const readline = require("readline");
|
|
22
22
|
const iutils = require("./install_utils.js");
|
|
23
23
|
|
|
24
|
-
const IBMi =
|
|
24
|
+
const IBMi = iutils.isIBMi();
|
|
25
|
+
|
|
26
|
+
const RED = "\x1b[31m";
|
|
27
|
+
const RESET = "\x1b[0m";
|
|
25
28
|
|
|
26
29
|
(async () => {
|
|
27
30
|
try {
|
|
@@ -71,15 +74,26 @@ If config.js is already present, installation proceeds silently by default.
|
|
|
71
74
|
console.error("Can't find deployment directory.");
|
|
72
75
|
process.exit(1);
|
|
73
76
|
}
|
|
77
|
+
|
|
78
|
+
const nodeMajorVersion = Number(process.versions.node.split(".")[0]);
|
|
79
|
+
const gitSupported = ["win32", "darwin", "linux"].includes(os.platform());
|
|
80
|
+
|
|
74
81
|
const configPath = iutils.getConfigPath();
|
|
75
82
|
let config = fileExists(configPath) ? require(configPath) : {};
|
|
76
83
|
|
|
77
84
|
let downloadStaticFiles;
|
|
78
85
|
let svrname, autostart, ccsid, nodePath;
|
|
79
86
|
|
|
87
|
+
|
|
80
88
|
// If config.js doesn't exist, or if --configure is passed, prompt and create/update config.js.
|
|
81
89
|
if (!fileExists(configPath) || args["configure"] === true) {
|
|
82
90
|
|
|
91
|
+
if (gitSupported && nodeMajorVersion >= 18) {
|
|
92
|
+
console.log("");
|
|
93
|
+
console.log(`${RED}WARNING: Git integration not supported on Node.js ${nodeMajorVersion}${RESET}`);
|
|
94
|
+
console.log("");
|
|
95
|
+
}
|
|
96
|
+
|
|
83
97
|
let staticFilesDirectory, port, gitSupport;
|
|
84
98
|
let profounduiLibrary, connectorLibrary, connectorIASP;
|
|
85
99
|
|
|
@@ -109,7 +123,7 @@ If config.js is already present, installation proceeds silently by default.
|
|
|
109
123
|
port = Number(await ask("Specify port number for Profound.js server", config.port || 8081, validatePort));
|
|
110
124
|
|
|
111
125
|
|
|
112
|
-
if (
|
|
126
|
+
if (gitSupported && nodeMajorVersion < 18) {
|
|
113
127
|
let answer = (await ask("Install with Git integration?", config.gitSupport === false ? "n" : "y" , validateYesNo)).toUpperCase();
|
|
114
128
|
gitSupport = (answer === "Y");
|
|
115
129
|
}
|
|
@@ -266,7 +280,7 @@ If config.js is already present, installation proceeds silently by default.
|
|
|
266
280
|
if (downloadStaticFiles) {
|
|
267
281
|
setupArgs.push("--static-files");
|
|
268
282
|
}
|
|
269
|
-
if (
|
|
283
|
+
if (gitSupported && config.gitSupport !== false && nodeMajorVersion < 18) {
|
|
270
284
|
setupArgs.push("--nodegit");
|
|
271
285
|
}
|
|
272
286
|
if (setupArgs.length === 0) {
|
package/setup/config.js
CHANGED
package/setup/install_utils.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const fs = require("fs");
|
|
9
|
+
const os = require("os");
|
|
9
10
|
const path = require("path");
|
|
10
11
|
|
|
11
12
|
exports.getConfigPath = function() {
|
|
@@ -121,3 +122,8 @@ exports.validateIBMiName = function(name) {
|
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
}
|
|
125
|
+
|
|
126
|
+
exports.isIBMi = function() {
|
|
127
|
+
// Node.js versions < 18 report os.platform() === "aix" on IBM i.
|
|
128
|
+
return (os.platform() === "os400" || (os.platform() === "aix" && os.type() === "OS400"));
|
|
129
|
+
}
|
package/setup/package.json
CHANGED
package/setup/pjsdist.savf
CHANGED
|
Binary file
|
package/setup/setup.js
CHANGED
package/setup/start.js
CHANGED
|
@@ -14,11 +14,9 @@ async function startPJS() {
|
|
|
14
14
|
process.exit(1);
|
|
15
15
|
}
|
|
16
16
|
profoundjs.applyConfig(config);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
app.use(express.json());
|
|
22
|
-
}
|
|
17
|
+
await profoundjs.server.listen();
|
|
18
|
+
var express = profoundjs.server.express;
|
|
19
|
+
var app = profoundjs.server.app;
|
|
20
|
+
app.use(express.json());
|
|
23
21
|
}
|
|
24
22
|
startPJS();
|