retold-data-service 2.0.1 → 2.0.4

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": "retold-data-service",
3
- "version": "2.0.1",
3
+ "version": "2.0.4",
4
4
  "description": "Serve up a whole model!",
5
5
  "main": "source/Retold-Data-Service.js",
6
6
  "scripts": {
@@ -54,7 +54,7 @@
54
54
  "meadow": "^2.0.15",
55
55
  "meadow-connection-mysql": "^1.0.4",
56
56
  "meadow-endpoints": "^4.0.5",
57
- "orator": "^4.0.2",
58
- "orator-serviceserver-restify": "^2.0.2"
57
+ "orator": "^4.0.3",
58
+ "orator-serviceserver-restify": "^2.0.3"
59
59
  }
60
60
  }
@@ -117,7 +117,7 @@ class RetoldDataService extends libFableServiceProviderBase
117
117
  this._MeadowEndpoints[tmpDALEntityName] = libMeadowEndpoints.new(this._DAL[tmpDALEntityName]);
118
118
  // 8. Expose the meadow endpoints on Orator
119
119
  _Fable.log.info(`...mapping the ${tmpDALEntityName} Meadow Endpoints to Orator`);
120
- this._MeadowEndpoints[tmpDALEntityName].connectRoutes(this.fable.Orator.webServer);
120
+ this._MeadowEndpoints[tmpDALEntityName].connectRoutes(this.fable.OratorServiceServer);
121
121
  }
122
122
 
123
123
  return fCallback();
@@ -137,7 +137,19 @@ class RetoldDataService extends libFableServiceProviderBase
137
137
 
138
138
  tmpAnticipate.anticipate(this.onBeforeInitialize.bind(this));
139
139
 
140
- tmpAnticipate.anticipate(this.fable.Orator.startWebServer.bind(this.fable.Orator));
140
+ tmpAnticipate.anticipate(
141
+ (fCallback) =>
142
+ {
143
+ if (this.options.AutoStartOrator)
144
+ {
145
+ this.fable.Orator.startWebServer(fCallback);
146
+ }
147
+ else
148
+ {
149
+ return fCallback();
150
+ }
151
+ });
152
+
141
153
  tmpAnticipate.anticipate(this.initializePersistenceEngine.bind(this));
142
154
 
143
155
  tmpAnticipate.anticipate(this.onInitialize.bind(this));
@@ -154,7 +166,7 @@ class RetoldDataService extends libFableServiceProviderBase
154
166
  this.log.error(`Error initializing Retold Data Service: ${pError}`);
155
167
  return fCallback(pError);
156
168
  }
157
-
169
+ this.fable.Orator.startWebServer.bind(this.fable.Orator);
158
170
  this.serviceInitialized = true;
159
171
  return fCallback();
160
172
  });