orator-serviceserver-restify 2.0.3 → 2.0.5
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-serviceserver-restify",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Restify Service Server for Orator",
|
|
5
5
|
"main": "source/Orator-ServiceServer-Restify.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/stevenvelozo/orator-serviceserver-restify#readme",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"orator-serviceserver-base": "^1.0.
|
|
45
|
+
"orator-serviceserver-base": "^1.0.2",
|
|
46
46
|
"restify": "^11.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
const libOratorServiceServerBase = require('orator-serviceserver-base');
|
|
2
2
|
const libRestify = require('restify');
|
|
3
3
|
|
|
4
|
+
const _DefaultRestifyConfiguration =
|
|
5
|
+
{
|
|
6
|
+
maxParamLength: Number.MAX_SAFE_INTEGER,
|
|
7
|
+
};
|
|
4
8
|
class OratorServiceServerRestify extends libOratorServiceServerBase
|
|
5
9
|
{
|
|
6
10
|
constructor(pFable, pOptions, pServiceHash)
|
|
@@ -13,7 +17,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
|
|
|
13
17
|
(this.fable.settings.hasOwnProperty('RestifyConfiguration')) ? this.fable.settings.RestifyConfiguration :
|
|
14
18
|
{};
|
|
15
19
|
|
|
16
|
-
this.server = libRestify.createServer(tmpRestifyConfiguration);
|
|
20
|
+
this.server = libRestify.createServer(Object.assign({}, _DefaultRestifyConfiguration, tmpRestifyConfiguration));
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
/*
|
|
@@ -54,6 +58,17 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
|
|
|
54
58
|
this.server.use(fHandlerFunction);
|
|
55
59
|
}
|
|
56
60
|
|
|
61
|
+
pre(fHandlerFunction)
|
|
62
|
+
{
|
|
63
|
+
if (!super.pre(fHandlerFunction))
|
|
64
|
+
{
|
|
65
|
+
this.log.error(`RESTIFY provider failed to map PRE handler function!`);
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
this.server.pre(fHandlerFunction);
|
|
70
|
+
}
|
|
71
|
+
|
|
57
72
|
bodyParser()
|
|
58
73
|
{
|
|
59
74
|
// Restify has a built-in bodyParser plugin that returns a standard
|