profoundjs 6.0.0 → 6.0.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 +1 -1
- package/profound.jse +1 -1
- package/setup/complete_install.js +4 -2
- package/setup/package.json +1 -1
- package/setup/pjsdist.savf +0 -0
- package/setup/setup.js +34 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
const child_process = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
3
4
|
|
|
4
5
|
let args = process.argv.slice(2);
|
|
5
6
|
if (args.length > 0) {
|
|
@@ -11,9 +12,10 @@ else {
|
|
|
11
12
|
|
|
12
13
|
try {
|
|
13
14
|
child_process.execSync(
|
|
14
|
-
`npm run
|
|
15
|
+
`npm run completeInstall ${args}`,
|
|
15
16
|
{
|
|
16
|
-
stdio: "inherit"
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
cwd: path.join(__dirname, "node_modules", "profoundjs")
|
|
17
19
|
}
|
|
18
20
|
);
|
|
19
21
|
}
|
package/setup/package.json
CHANGED
package/setup/pjsdist.savf
CHANGED
|
Binary file
|
package/setup/setup.js
CHANGED
|
@@ -36,6 +36,8 @@ const logDir = path.join(os.tmpdir(), "profoundjs-" + uuidv4());
|
|
|
36
36
|
const logPath = path.join(logDir, "setup.log");
|
|
37
37
|
let logFile;
|
|
38
38
|
|
|
39
|
+
let SILENT_MODE = false;
|
|
40
|
+
|
|
39
41
|
(async () => {
|
|
40
42
|
try {
|
|
41
43
|
|
|
@@ -103,12 +105,15 @@ let logFile;
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
if (args.silent === true) {
|
|
108
|
+
SILENT_MODE = true;
|
|
106
109
|
RED = CYAN = RESET = "";
|
|
107
110
|
}
|
|
108
111
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
if (!SILENT_MODE) {
|
|
113
|
+
// Initialize log file.
|
|
114
|
+
fs.mkdirSync(logDir);
|
|
115
|
+
logFile = fs.openSync(logPath, "w");
|
|
116
|
+
}
|
|
112
117
|
|
|
113
118
|
// Validate arguments.
|
|
114
119
|
if (args._.length > 0) {
|
|
@@ -184,7 +189,11 @@ let logFile;
|
|
|
184
189
|
`npm install idb-connector@"${idb_connector_version}"`,
|
|
185
190
|
{
|
|
186
191
|
cwd: iutils.getDeployDir(),
|
|
187
|
-
stdio: [
|
|
192
|
+
stdio: [
|
|
193
|
+
"ignore",
|
|
194
|
+
SILENT_MODE ? process.stdout : logFile,
|
|
195
|
+
SILENT_MODE ? process.stderr : logFile
|
|
196
|
+
]
|
|
188
197
|
}
|
|
189
198
|
);
|
|
190
199
|
}
|
|
@@ -194,7 +203,11 @@ let logFile;
|
|
|
194
203
|
`npm install --save-optional profoundjs-node-pty@"${node_pty_version}"`,
|
|
195
204
|
{
|
|
196
205
|
cwd: iutils.getDeployDir(),
|
|
197
|
-
stdio: [
|
|
206
|
+
stdio: [
|
|
207
|
+
"ignore",
|
|
208
|
+
SILENT_MODE ? process.stdout : logFile,
|
|
209
|
+
SILENT_MODE ? process.stderr : logFile
|
|
210
|
+
]
|
|
198
211
|
}
|
|
199
212
|
);
|
|
200
213
|
}
|
|
@@ -219,7 +232,11 @@ let logFile;
|
|
|
219
232
|
`npm install nodegit@"${version}"`,
|
|
220
233
|
{
|
|
221
234
|
cwd: iutils.getDeployDir(),
|
|
222
|
-
stdio: [
|
|
235
|
+
stdio: [
|
|
236
|
+
"ignore",
|
|
237
|
+
SILENT_MODE ? process.stdout : logFile,
|
|
238
|
+
SILENT_MODE ? process.stderr : logFile
|
|
239
|
+
]
|
|
223
240
|
}
|
|
224
241
|
);
|
|
225
242
|
}
|
|
@@ -376,11 +393,6 @@ let logFile;
|
|
|
376
393
|
}
|
|
377
394
|
}
|
|
378
395
|
log(`\n${CYAN}Profound.js installation complete.${RESET}\n`);
|
|
379
|
-
if (args.silent === true) {
|
|
380
|
-
// GUI installer hunts for this message in the output to determine log file location.
|
|
381
|
-
// Don't change formatting of this message without corresponding update to GUI.
|
|
382
|
-
console.log(`See installation log: ${logPath}\n`);
|
|
383
|
-
}
|
|
384
396
|
|
|
385
397
|
}
|
|
386
398
|
catch (error) {
|
|
@@ -400,6 +412,9 @@ function logError(...args) {
|
|
|
400
412
|
}
|
|
401
413
|
|
|
402
414
|
function logToFile(...args) {
|
|
415
|
+
if (SILENT_MODE) {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
403
418
|
let output = `${util.format(...args)}\n`; // Mimic console.log().
|
|
404
419
|
output = output.replace(/\x1b\[[0-9]+m/g, ""); // Strip terminal escape codes for colors.
|
|
405
420
|
fs.writeFileSync(logFile, output, { flag: "a" });
|
|
@@ -407,9 +422,9 @@ function logToFile(...args) {
|
|
|
407
422
|
|
|
408
423
|
function die() {
|
|
409
424
|
logError(`\n${RED}Profound.js installation failed.${RESET}`);
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
425
|
+
if (!SILENT_MODE) {
|
|
426
|
+
console.error(`${RED}See installation log:${RESET} ${logPath}\n`);
|
|
427
|
+
}
|
|
413
428
|
process.exit(1);
|
|
414
429
|
}
|
|
415
430
|
|
|
@@ -599,7 +614,11 @@ function runCommand(command, switches) {
|
|
|
599
614
|
}
|
|
600
615
|
|
|
601
616
|
const options = {
|
|
602
|
-
stdio: [
|
|
617
|
+
stdio: [
|
|
618
|
+
"ignore",
|
|
619
|
+
SILENT_MODE ? process.stdout : logFile,
|
|
620
|
+
SILENT_MODE ? process.stderr : logFile
|
|
621
|
+
],
|
|
603
622
|
cwd: __dirname,
|
|
604
623
|
env: {
|
|
605
624
|
QIBM_USE_DESCRIPTOR_STDIO: "Y",
|