linny-r 1.1.16 → 1.1.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linny-r",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Executable graphical language with WYSIWYG editor for MILP models",
5
5
  "main": "server.js",
6
6
  "scripts": {
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: 1000}),
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('WARNING: Could not check for updates');
94
+ console.log(connectionErrorText('Could not connect to https://registry.npmjs.org/'));
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
  }
@@ -8065,7 +8065,8 @@ class Repository {
8065
8065
  if(include) {
8066
8066
  // Include module into current model
8067
8067
  REPOSITORY_BROWSER.promptForInclusion(
8068
- this.name, this.module_names[n], parseXML(data));
8068
+ this.name, this.module_names[n],
8069
+ parseXML(data.replace(/%23/g, '#')));
8069
8070
  } else {
8070
8071
  if(UI.loadModelFromXML(data)) {
8071
8072
  UI.notify(`Model <tt>${this.module_names[n]}</tt> ` +
@@ -7265,7 +7265,7 @@ class Link {
7265
7265
  IO_CONTEXT.addedLink(this);
7266
7266
  // Contextualize the rate and delay expressions
7267
7267
  IO_CONTEXT.rewrite(this.relative_rate);
7268
- IO_CONTEXT.rewrite(this.delay);
7268
+ IO_CONTEXT.rewrite(this.flow_delay);
7269
7269
  }
7270
7270
  }
7271
7271