linny-r 1.1.16 → 1.1.17
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/server.js +7 -4
package/package.json
CHANGED
package/server.js
CHANGED
@@ -75,10 +75,12 @@ function getVersionInfo() {
|
|
75
75
|
console.log('This indicates that Linny-R is not installed properly.');
|
76
76
|
process.exit();
|
77
77
|
}
|
78
|
+
console.log('\nNode.js server for Linny-R version', info.current);
|
79
|
+
console.log('Looking for newer version on https://npmjs.com');
|
78
80
|
try {
|
79
81
|
const
|
80
|
-
json = child_process.execSync(
|
81
|
-
'npm show linny-r time version --json', {timeout:
|
82
|
+
json = child_process.execSync(
|
83
|
+
'npm show linny-r time version --json', {timeout: 5000}),
|
82
84
|
obj = JSON.parse(json);
|
83
85
|
info.latest = obj.version;
|
84
86
|
info.latest_time = new Date(Date.parse(obj.time[info.latest]));
|
@@ -88,12 +90,13 @@ function getVersionInfo() {
|
|
88
90
|
// `latest` = 0 indicates that version check failed
|
89
91
|
info.latest = 0;
|
90
92
|
}
|
91
|
-
console.log('\nNode.js server for Linny-R version', info.current);
|
92
93
|
if(!info.latest) {
|
93
|
-
console.log('
|
94
|
+
console.log(connectionErrorText('Could not connect to https://nodejs.com'));
|
94
95
|
} else if(!info.up_to_date) {
|
95
96
|
console.log('UPDATE: Version ' + info.latest + ' was released on ' +
|
96
97
|
info.latest_time.toString());
|
98
|
+
} else {
|
99
|
+
console.log('Linny-R software is up-to-date');
|
97
100
|
}
|
98
101
|
return info;
|
99
102
|
}
|