orator 3.0.4 → 3.0.6
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": "orator",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "Unopinionated restful web API server container",
|
|
5
5
|
"main": "source/Orator.js",
|
|
6
6
|
"scripts": {
|
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"mocha": "10.2.0",
|
|
59
59
|
"nyc": "^15.1.0",
|
|
60
60
|
"vinyl-buffer": "^1.0.1",
|
|
61
|
-
"vinyl-source-stream": "^2.0.0"
|
|
61
|
+
"vinyl-source-stream": "^2.0.0",
|
|
62
|
+
"orator-serviceserver-restify": "^1.0.1"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
65
|
"async": "^3.2.4",
|
|
@@ -9,7 +9,7 @@ const libOratorServiceServerIPCCustomConstrainer = require('./Orator-ServiceServ
|
|
|
9
9
|
const libFindMyWay = require('find-my-way');
|
|
10
10
|
//const libAsync = require('async');
|
|
11
11
|
const libAsyncWaterfall = require("async/waterfall");
|
|
12
|
-
const libAsyncEachOfSeries = require('async/
|
|
12
|
+
const libAsyncEachOfSeries = require('async/eachOfSeries')
|
|
13
13
|
|
|
14
14
|
class OratorServiceServerIPC extends libOratorServiceServerBase
|
|
15
15
|
{
|
|
@@ -214,7 +214,7 @@ class OratorServiceServerIPC extends libOratorServiceServerBase
|
|
|
214
214
|
invoke(pMethod, pRoute, pData, fCallback)
|
|
215
215
|
{
|
|
216
216
|
// If the data is skipped and a callback is parameter 3, do the right thing
|
|
217
|
-
let tmpCallback = (typeof(fCallback) == 'function') ? fCallback :
|
|
217
|
+
let tmpCallback = (typeof(fCallback) == 'function') ? fCallback :
|
|
218
218
|
(typeof(pData) == 'function') ? pData :
|
|
219
219
|
// This is here in case the developer passed no callback and just wants to fire and forget the IPC call which might not be async safe
|
|
220
220
|
()=>{};
|
|
@@ -240,7 +240,7 @@ class OratorServiceServerIPC extends libOratorServiceServerBase
|
|
|
240
240
|
this.log.error(`IPC Request Error Request GUID [${tmpRequest.guid}] handling route [${pRoute}]: ${pError}`, {Error: pError, Route: pRoute, Data: pData});
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
// by default, send data back through
|
|
243
|
+
// by default, send data back through
|
|
244
244
|
return tmpCallback(pError, tmpSynthesizedResponseData.responseData, tmpSynthesizedResponseData, pResults);
|
|
245
245
|
});
|
|
246
246
|
}
|
package/source/Orator.js
CHANGED
|
@@ -179,7 +179,7 @@ suite
|
|
|
179
179
|
(fStageComplete) =>
|
|
180
180
|
{
|
|
181
181
|
let tmpURI = `/MagicEndpoint/BippityBoppityBoo`;
|
|
182
|
-
tmpOrator.invoke('GET', tmpURI, null,
|
|
182
|
+
tmpOrator.invoke('GET', tmpURI, null,
|
|
183
183
|
(pError, pResponseData) =>
|
|
184
184
|
{
|
|
185
185
|
let tmpResponseObject = JSON.parse(pResponseData);
|
|
@@ -187,7 +187,7 @@ suite
|
|
|
187
187
|
Expect(tmpResponseObject.MagicWords).to.equal('BippityBoppityBoo');
|
|
188
188
|
Expect(tmpResponseObject).to.have.a.property('MagicIngredients');
|
|
189
189
|
Expect(tmpResponseObject.MagicIngredients).to.be.an('array');
|
|
190
|
-
Expect(tmpResponseObject.MagicIngredients[0]).to.equal('Magic Outcomes
|
|
190
|
+
Expect(tmpResponseObject.MagicIngredients[0]).to.equal('Magic Outcomes');
|
|
191
191
|
tmpOrator.log.info(`Response to [${tmpURI}] came back from IPC resulting in [${pResponseData}] which is type ${typeof(pResponseData)}!`);
|
|
192
192
|
return fStageComplete();
|
|
193
193
|
});
|
|
@@ -195,7 +195,7 @@ suite
|
|
|
195
195
|
],
|
|
196
196
|
(pError) =>
|
|
197
197
|
{
|
|
198
|
-
fDone();
|
|
198
|
+
return fDone();
|
|
199
199
|
})
|
|
200
200
|
}
|
|
201
201
|
);
|