orator-serviceserver-restify 2.0.9 → 2.0.11

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/docs/README.md CHANGED
@@ -51,10 +51,10 @@ npm install orator-serviceserver-restify
51
51
  The Restify service server creates a Restify server instance in its constructor and delegates all route and middleware registration directly to it:
52
52
 
53
53
  ```
54
- Orator serviceServer.get('/path', handler)
55
- OratorServiceServerBase.get() [validates route]
56
- OratorServiceServerRestify.doGet() [calls this.server.get()]
57
- Restify server handles the route
54
+ Orator -> serviceServer.get('/path', handler)
55
+ -> OratorServiceServerBase.get() [validates route]
56
+ -> OratorServiceServerRestify.doGet() [calls this.server.get()]
57
+ -> Restify server handles the route
58
58
  ```
59
59
 
60
60
  ## Accessing the Raw Restify Server
package/docs/_cover.md CHANGED
@@ -1,4 +1,4 @@
1
- # Orator ServiceServer Restify <small>2</small>
1
+ # Orator ServiceServer Restify
2
2
 
3
3
  > Production HTTP service server for Orator, powered by Restify
4
4
 
@@ -0,0 +1,7 @@
1
+ {
2
+ "Name": "orator-serviceserver-restify",
3
+ "Version": "2.0.10",
4
+ "Description": "Restify Service Server for Orator",
5
+ "GeneratedAt": "2026-04-10T17:23:14.866Z",
6
+ "GitCommit": "1a47ef0"
7
+ }
@@ -1,73 +1,327 @@
1
1
  /* ============================================================================
2
- Pict Docuserve - Base Styles
2
+ Pict Docuserve - Base Styles & Theme Variables
3
3
  ============================================================================ */
4
4
 
5
- /* Reset and base */
6
- *, *::before, *::after {
5
+ /* ----------------------------------------------------------------------------
6
+ Theme variables light defaults on :root.
7
+ Dark mode applies when either:
8
+ (a) the user explicitly selected dark via <html data-theme="dark">
9
+ (b) the user hasn't chosen anything AND the system prefers dark
10
+ An explicit <html data-theme="light"> pins the light palette regardless.
11
+ ---------------------------------------------------------------------------- */
12
+
13
+ :root
14
+ {
15
+ /* Surfaces */
16
+ --docuserve-bg: #FDFBF7;
17
+ --docuserve-bg-elevated: #FFFFFF;
18
+ --docuserve-border: #DDD6CA;
19
+ --docuserve-border-soft: #EAE3D8;
20
+
21
+ /* Text */
22
+ --docuserve-text: #2A241E;
23
+ --docuserve-text-strong: #3D3229;
24
+ --docuserve-text-muted: #5E5549;
25
+ --docuserve-text-dim: #8A7F72;
26
+
27
+ /* Accent / links */
28
+ --docuserve-accent: #2E7D74;
29
+ --docuserve-accent-hover: #236660;
30
+
31
+ /* Top bar */
32
+ --docuserve-topbar-bg: #3D3229;
33
+ --docuserve-topbar-text: #E8E0D4;
34
+ --docuserve-topbar-text-muted: #B5AA9A;
35
+ --docuserve-topbar-text-dim: #8A7F72;
36
+ --docuserve-topbar-hover-bg: #524438;
37
+ --docuserve-topbar-version-bg: rgba(255, 255, 255, 0.06);
38
+ --docuserve-topbar-version-border: rgba(255, 255, 255, 0.08);
39
+ --docuserve-topbar-version-text: #B5AA9A;
40
+
41
+ /* Sidebar */
42
+ --docuserve-sidebar-bg: #FAF7F1;
43
+ --docuserve-sidebar-border: #DDD6CA;
44
+ --docuserve-sidebar-border-soft: #E5DED1;
45
+ --docuserve-sidebar-text: #423D37;
46
+ --docuserve-sidebar-group-title: #3D3229;
47
+ --docuserve-sidebar-module-text: #5E5549;
48
+ --docuserve-sidebar-hover-bg: #EAE3D8;
49
+ --docuserve-sidebar-hover-text: #2E7D74;
50
+ --docuserve-sidebar-active-bg: #E5DED1;
51
+ --docuserve-sidebar-active-text: #2E7D74;
52
+ --docuserve-sidebar-search-bg: #FFFFFF;
53
+ --docuserve-sidebar-search-border: #DDD6CA;
54
+
55
+ /* Inline code */
56
+ --docuserve-inline-code-bg: #F0ECE4;
57
+ --docuserve-inline-code-text: #9E3A50;
58
+
59
+ /* Code block panel */
60
+ --docuserve-code-bg: #F6F3EE;
61
+ --docuserve-code-border: #E5DED1;
62
+ --docuserve-code-gutter-bg: #EFEAE0;
63
+ --docuserve-code-gutter-border: #DDD6CA;
64
+ --docuserve-code-gutter-text: #A59986;
65
+ --docuserve-code-text: #2A241E;
66
+
67
+ /* Syntax tokens — low-chroma dark-on-light palette */
68
+ --docuserve-tok-keyword: #A03472;
69
+ --docuserve-tok-string: #1A6640;
70
+ --docuserve-tok-number: #B25A00;
71
+ --docuserve-tok-comment: #8A7F72;
72
+ --docuserve-tok-operator: #2E7D74;
73
+ --docuserve-tok-punctuation: #2A241E;
74
+ --docuserve-tok-function: #2A5DB0;
75
+ --docuserve-tok-property: #9E3A50;
76
+ --docuserve-tok-tag: #9E3A50;
77
+ --docuserve-tok-attr-name: #B25A00;
78
+ --docuserve-tok-attr-value: #1A6640;
79
+
80
+ /* Tables, blockquotes, mermaid */
81
+ --docuserve-table-header-bg: #F5F0E8;
82
+ --docuserve-table-row-alt-bg: #F9F6F0;
83
+ --docuserve-blockquote-bg: #F7F5F0;
84
+ --docuserve-blockquote-border: #2E7D74;
85
+ --docuserve-blockquote-text: #5E5549;
86
+ --docuserve-mermaid-bg: #FFFFFF;
87
+
88
+ /* Scrollbars */
89
+ --docuserve-scrollbar-track: #F5F0E8;
90
+ --docuserve-scrollbar-thumb: #D4CCBE;
91
+ --docuserve-scrollbar-thumb-hover: #B5AA9A;
92
+ }
93
+
94
+ @media (prefers-color-scheme: dark)
95
+ {
96
+ :root:not([data-theme="light"])
97
+ {
98
+ --docuserve-bg: #15120F;
99
+ --docuserve-bg-elevated: #1B1814;
100
+ --docuserve-border: #2F2823;
101
+ --docuserve-border-soft: #26211C;
102
+
103
+ --docuserve-text: #E8E0D4;
104
+ --docuserve-text-strong: #F2ECE0;
105
+ --docuserve-text-muted: #B5AA9A;
106
+ --docuserve-text-dim: #7A6F62;
107
+
108
+ --docuserve-accent: #5DB8A8;
109
+ --docuserve-accent-hover: #7FCCB8;
110
+
111
+ --docuserve-topbar-bg: #1A1612;
112
+ --docuserve-topbar-text: #E8E0D4;
113
+ --docuserve-topbar-text-muted: #B5AA9A;
114
+ --docuserve-topbar-text-dim: #7A6F62;
115
+ --docuserve-topbar-hover-bg: #2A241E;
116
+ --docuserve-topbar-version-bg: rgba(255, 255, 255, 0.05);
117
+ --docuserve-topbar-version-border: rgba(255, 255, 255, 0.09);
118
+ --docuserve-topbar-version-text: #B5AA9A;
119
+
120
+ --docuserve-sidebar-bg: #1B1814;
121
+ --docuserve-sidebar-border: #2F2823;
122
+ --docuserve-sidebar-border-soft: #26211C;
123
+ --docuserve-sidebar-text: #C9C0B3;
124
+ --docuserve-sidebar-group-title: #F2ECE0;
125
+ --docuserve-sidebar-module-text: #B5AA9A;
126
+ --docuserve-sidebar-hover-bg: #2A241E;
127
+ --docuserve-sidebar-hover-text: #7FCCB8;
128
+ --docuserve-sidebar-active-bg: #2F2823;
129
+ --docuserve-sidebar-active-text: #7FCCB8;
130
+ --docuserve-sidebar-search-bg: #26211C;
131
+ --docuserve-sidebar-search-border: #2F2823;
132
+
133
+ --docuserve-inline-code-bg: #2A241E;
134
+ --docuserve-inline-code-text: #E8B07A;
135
+
136
+ --docuserve-code-bg: #1E1A17;
137
+ --docuserve-code-border: #2F2823;
138
+ --docuserve-code-gutter-bg: #17130F;
139
+ --docuserve-code-gutter-border: #2F2823;
140
+ --docuserve-code-gutter-text: #6A6052;
141
+ --docuserve-code-text: #E8E0D4;
142
+
143
+ --docuserve-tok-keyword: #C678DD;
144
+ --docuserve-tok-string: #98C379;
145
+ --docuserve-tok-number: #D19A66;
146
+ --docuserve-tok-comment: #7F848E;
147
+ --docuserve-tok-operator: #56B6C2;
148
+ --docuserve-tok-punctuation: #E8E0D4;
149
+ --docuserve-tok-function: #61AFEF;
150
+ --docuserve-tok-property: #E06C75;
151
+ --docuserve-tok-tag: #E06C75;
152
+ --docuserve-tok-attr-name: #D19A66;
153
+ --docuserve-tok-attr-value: #98C379;
154
+
155
+ --docuserve-table-header-bg: #26211C;
156
+ --docuserve-table-row-alt-bg: #1F1B17;
157
+ --docuserve-blockquote-bg: #1F1B17;
158
+ --docuserve-blockquote-border: #5DB8A8;
159
+ --docuserve-blockquote-text: #C9C0B3;
160
+ --docuserve-mermaid-bg: #E8E0D4;
161
+
162
+ --docuserve-scrollbar-track: #1B1814;
163
+ --docuserve-scrollbar-thumb: #3A322B;
164
+ --docuserve-scrollbar-thumb-hover: #524438;
165
+ }
166
+ }
167
+
168
+ :root[data-theme="dark"]
169
+ {
170
+ --docuserve-bg: #15120F;
171
+ --docuserve-bg-elevated: #1B1814;
172
+ --docuserve-border: #2F2823;
173
+ --docuserve-border-soft: #26211C;
174
+
175
+ --docuserve-text: #E8E0D4;
176
+ --docuserve-text-strong: #F2ECE0;
177
+ --docuserve-text-muted: #B5AA9A;
178
+ --docuserve-text-dim: #7A6F62;
179
+
180
+ --docuserve-accent: #5DB8A8;
181
+ --docuserve-accent-hover: #7FCCB8;
182
+
183
+ --docuserve-topbar-bg: #1A1612;
184
+ --docuserve-topbar-text: #E8E0D4;
185
+ --docuserve-topbar-text-muted: #B5AA9A;
186
+ --docuserve-topbar-text-dim: #7A6F62;
187
+ --docuserve-topbar-hover-bg: #2A241E;
188
+ --docuserve-topbar-version-bg: rgba(255, 255, 255, 0.05);
189
+ --docuserve-topbar-version-border: rgba(255, 255, 255, 0.09);
190
+ --docuserve-topbar-version-text: #B5AA9A;
191
+
192
+ --docuserve-sidebar-bg: #1B1814;
193
+ --docuserve-sidebar-border: #2F2823;
194
+ --docuserve-sidebar-border-soft: #26211C;
195
+ --docuserve-sidebar-text: #C9C0B3;
196
+ --docuserve-sidebar-group-title: #F2ECE0;
197
+ --docuserve-sidebar-module-text: #B5AA9A;
198
+ --docuserve-sidebar-hover-bg: #2A241E;
199
+ --docuserve-sidebar-hover-text: #7FCCB8;
200
+ --docuserve-sidebar-active-bg: #2F2823;
201
+ --docuserve-sidebar-active-text: #7FCCB8;
202
+ --docuserve-sidebar-search-bg: #26211C;
203
+ --docuserve-sidebar-search-border: #2F2823;
204
+
205
+ --docuserve-inline-code-bg: #2A241E;
206
+ --docuserve-inline-code-text: #E8B07A;
207
+
208
+ --docuserve-code-bg: #1E1A17;
209
+ --docuserve-code-border: #2F2823;
210
+ --docuserve-code-gutter-bg: #17130F;
211
+ --docuserve-code-gutter-border: #2F2823;
212
+ --docuserve-code-gutter-text: #6A6052;
213
+ --docuserve-code-text: #E8E0D4;
214
+
215
+ --docuserve-tok-keyword: #C678DD;
216
+ --docuserve-tok-string: #98C379;
217
+ --docuserve-tok-number: #D19A66;
218
+ --docuserve-tok-comment: #7F848E;
219
+ --docuserve-tok-operator: #56B6C2;
220
+ --docuserve-tok-punctuation: #E8E0D4;
221
+ --docuserve-tok-function: #61AFEF;
222
+ --docuserve-tok-property: #E06C75;
223
+ --docuserve-tok-tag: #E06C75;
224
+ --docuserve-tok-attr-name: #D19A66;
225
+ --docuserve-tok-attr-value: #98C379;
226
+
227
+ --docuserve-table-header-bg: #26211C;
228
+ --docuserve-table-row-alt-bg: #1F1B17;
229
+ --docuserve-blockquote-bg: #1F1B17;
230
+ --docuserve-blockquote-border: #5DB8A8;
231
+ --docuserve-blockquote-text: #C9C0B3;
232
+ --docuserve-mermaid-bg: #E8E0D4;
233
+
234
+ --docuserve-scrollbar-track: #1B1814;
235
+ --docuserve-scrollbar-thumb: #3A322B;
236
+ --docuserve-scrollbar-thumb-hover: #524438;
237
+ }
238
+
239
+ /* ----------------------------------------------------------------------------
240
+ Reset and base
241
+ ---------------------------------------------------------------------------- */
242
+
243
+ *, *::before, *::after
244
+ {
7
245
  box-sizing: border-box;
8
246
  }
9
247
 
10
- html, body {
248
+ html, body
249
+ {
11
250
  margin: 0;
12
251
  padding: 0;
13
252
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
14
253
  font-size: 16px;
15
254
  line-height: 1.5;
16
- color: #423D37;
17
- background-color: #fff;
255
+ color: var(--docuserve-text);
256
+ background-color: var(--docuserve-bg);
18
257
  -webkit-font-smoothing: antialiased;
19
258
  -moz-osx-font-smoothing: grayscale;
259
+ transition: background-color 0.15s ease, color 0.15s ease;
20
260
  }
21
261
 
22
262
  /* Typography */
23
- h1, h2, h3, h4, h5, h6 {
263
+ h1, h2, h3, h4, h5, h6
264
+ {
24
265
  margin-top: 0;
25
266
  line-height: 1.3;
267
+ color: var(--docuserve-text-strong);
26
268
  }
27
269
 
28
- a {
29
- color: #2E7D74;
270
+ a
271
+ {
272
+ color: var(--docuserve-accent);
30
273
  text-decoration: none;
31
274
  }
32
275
 
33
- a:hover {
34
- color: #256861;
276
+ a:hover
277
+ {
278
+ color: var(--docuserve-accent-hover);
35
279
  }
36
280
 
37
281
  /* Application container */
38
- #Docuserve-Application-Container {
282
+ #Docuserve-Application-Container
283
+ {
39
284
  min-height: 100vh;
40
285
  }
41
286
 
42
287
  /* Utility: scrollbar styling */
43
- ::-webkit-scrollbar {
288
+ ::-webkit-scrollbar
289
+ {
44
290
  width: 8px;
291
+ height: 8px;
45
292
  }
46
293
 
47
- ::-webkit-scrollbar-track {
48
- background: #F5F0E8;
294
+ ::-webkit-scrollbar-track
295
+ {
296
+ background: var(--docuserve-scrollbar-track);
49
297
  }
50
298
 
51
- ::-webkit-scrollbar-thumb {
52
- background: #D4CCBE;
299
+ ::-webkit-scrollbar-thumb
300
+ {
301
+ background: var(--docuserve-scrollbar-thumb);
53
302
  border-radius: 4px;
54
303
  }
55
304
 
56
- ::-webkit-scrollbar-thumb:hover {
57
- background: #B5AA9A;
305
+ ::-webkit-scrollbar-thumb:hover
306
+ {
307
+ background: var(--docuserve-scrollbar-thumb-hover);
58
308
  }
59
309
 
60
310
  /* Responsive adjustments */
61
- @media (max-width: 768px) {
62
- html {
311
+ @media (max-width: 768px)
312
+ {
313
+ html
314
+ {
63
315
  font-size: 14px;
64
316
  }
65
317
 
66
- #Docuserve-Sidebar-Container {
318
+ #Docuserve-Sidebar-Container
319
+ {
67
320
  display: none;
68
321
  }
69
322
 
70
- .docuserve-body {
323
+ .docuserve-body
324
+ {
71
325
  flex-direction: column;
72
326
  }
73
327
  }
package/docs/index.html CHANGED
@@ -4,9 +4,9 @@
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
- <meta name="description" content="Documentation powered by pict-docuserve">
7
+ <meta name="description" content="Orator ServiceServer Restify v2.0.10 Documentation Restify Service Server for Orator">
8
8
 
9
- <title>Documentation</title>
9
+ <title>Orator ServiceServer Restify v2.0.10 Documentation</title>
10
10
 
11
11
  <!-- Application Stylesheet -->
12
12
  <link href="css/docuserve.css" rel="stylesheet">
@@ -1,5 +1,5 @@
1
1
  {
2
- "Generated": "2026-02-18T03:40:29.984Z",
2
+ "Generated": "2026-04-10T17:23:14.604Z",
3
3
  "GitHubOrg": "stevenvelozo",
4
4
  "DefaultBranch": "master",
5
5
  "Groups": [
@@ -36,6 +36,25 @@
36
36
  "DocFiles": []
37
37
  }
38
38
  ]
39
+ },
40
+ {
41
+ "Name": "Docs",
42
+ "Key": "docs",
43
+ "Description": "",
44
+ "Modules": [
45
+ {
46
+ "Name": "css",
47
+ "Repo": "css",
48
+ "Group": "docs",
49
+ "Branch": "master",
50
+ "HasDocs": true,
51
+ "HasCover": false,
52
+ "Sidebar": [],
53
+ "DocFiles": [
54
+ "css/docuserve.css"
55
+ ]
56
+ }
57
+ ]
39
58
  }
40
59
  ]
41
60
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "Generated": "2026-02-18T03:40:30.063Z",
2
+ "Generated": "2026-04-10T17:23:14.844Z",
3
3
  "DocumentCount": 0,
4
4
  "LunrIndex": {
5
5
  "version": "2.3.9",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orator-serviceserver-restify",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "description": "Restify Service Server for Orator",
5
5
  "main": "source/Orator-ServiceServer-Restify.js",
6
6
  "scripts": {
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/stevenvelozo/orator-serviceserver-restify#readme",
48
48
  "dependencies": {
49
- "orator-serviceserver-base": "^1.0.6",
49
+ "orator-serviceserver-base": "^1.0.8",
50
50
  "restify": "^11.1.0"
51
51
  },
52
52
  "devDependencies": {
@@ -54,12 +54,14 @@
54
54
  "@types/jquery": "^3.5.33",
55
55
  "@types/mocha": "^10.0.10",
56
56
  "@types/node": "^16.18.126",
57
+ "@types/restify": "^8.5.12",
57
58
  "@types/sinon": "^17.0.4",
58
59
  "eslint": "^9.39.1",
59
- "fable": "^3.1.61",
60
+ "fable": "^3.1.71",
60
61
  "globals": "^16.5.0",
61
- "orator": "^6.0.2",
62
- "quackage": "^1.0.58",
62
+ "orator": "^6.1.1",
63
+ "pict-docuserve": "^0.1.5",
64
+ "quackage": "^1.2.3",
63
65
  "typescript": "^5.9.3"
64
66
  }
65
67
  }
@@ -5,6 +5,9 @@ const _DefaultRestifyConfiguration =
5
5
  {
6
6
  maxParamLength: Number.MAX_SAFE_INTEGER,
7
7
  };
8
+ /**
9
+ * @extends {libOratorServiceServerBase<import('restify').Request, import('restify').Response, import('restify').Server>}
10
+ */
8
11
  class OratorServiceServerRestify extends libOratorServiceServerBase
9
12
  {
10
13
  /**
@@ -22,7 +25,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
22
25
  (this.fable.settings.hasOwnProperty('RestifyConfiguration')) ? this.fable.settings.RestifyConfiguration :
23
26
  {};
24
27
 
25
- /** @type {libRestify} */
28
+ /** @type {import('restify').Server} */
26
29
  this.server = libRestify.createServer(Object.assign({}, _DefaultRestifyConfiguration, tmpRestifyConfiguration));
27
30
  }
28
31
 
@@ -68,7 +71,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
68
71
  /**
69
72
  * Registers a global handler function to be used by the Orator service server.
70
73
  *
71
- * @param {import('orator-serviceserver-base').RequestHandler} fHandlerFunction - The handler function to be registered. It should have the prototype function(Request, Response, Next).
74
+ * @param {import('orator-serviceserver-base').RequestHandler<import('restify').Request, import('restify').Response>} fHandlerFunction - The handler function to be registered. It should have the prototype function(Request, Response, Next).
72
75
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
73
76
  */
74
77
  use(fHandlerFunction)
@@ -85,7 +88,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
85
88
  /**
86
89
  * Registers a global handler function to be used by the Orator service server that runs before routing.
87
90
  *
88
- * @param {function} fHandlerFunction - The handler function to be registered. It should have the prototype function(Request, Response, Next).
91
+ * @param {import('orator-serviceserver-base').RequestHandler<import('restify').Request, import('restify').Response>} fHandlerFunction - The handler function to be registered. It should have the prototype function(Request, Response, Next).
89
92
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
90
93
  */
91
94
  pre(fHandlerFunction)
@@ -103,7 +106,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
103
106
  * Middleware function for parsing the request body.
104
107
  *
105
108
  * @param {Record<string, any>} [pOptions] - The options for the body parser.
106
- * @return {import('orator-serviceserver-base').RequestHandler} - The middleware function.
109
+ * @return {import('restify').RequestHandler[]} - The middleware function.
107
110
  */
108
111
  bodyParser(pOptions)
109
112
  {
@@ -143,7 +146,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
143
146
  * Handles HTTP GET requests -- this is a base function that does nothing; override by the serviceserver is expected.
144
147
  *
145
148
  * @param {string} pRoute - The route of the request.
146
- * @param {...Function} fRouteProcessingFunctions - The processing functions for the route.
149
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions for the route.
147
150
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
148
151
  */
149
152
  doGet(pRoute, ...fRouteProcessingFunctions)
@@ -155,7 +158,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
155
158
  * Handles HTTP PUT requests -- this is a base function that does nothing; override by the serviceserver is expected.
156
159
  *
157
160
  * @param {string} pRoute - The route to handle.
158
- * @param {...Function} fRouteProcessingFunctions - The processing functions to execute for the route.
161
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
159
162
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
160
163
  */
161
164
  doPut(pRoute, ...fRouteProcessingFunctions)
@@ -167,7 +170,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
167
170
  * Handles the HTTP POST request for a specific route.
168
171
  *
169
172
  * @param {string} pRoute - The route to handle the POST request for.
170
- * @param {...Function} fRouteProcessingFunctions - The processing functions to execute for the route.
173
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
171
174
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
172
175
  */
173
176
  doPost(pRoute, ...fRouteProcessingFunctions)
@@ -179,7 +182,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
179
182
  * Handles HTTP DELETE requests -- this is a base function that does nothing; override by the serviceserver is expected.
180
183
  *
181
184
  * @param {string} pRoute - The route of the resource to delete.
182
- * @param {...Function} fRouteProcessingFunctions - The processing functions to be executed to delete the resource.
185
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to be executed to delete the resource.
183
186
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
184
187
  */
185
188
  doDel(pRoute, ...fRouteProcessingFunctions)
@@ -191,7 +194,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
191
194
  * Handles HTTP PATCH requests -- this is a base function that does nothing; override by the serviceserver is expected.
192
195
  *
193
196
  * @param {string} pRoute - The route to send the PATCH request to.
194
- * @param {...Function} fRouteProcessingFunctions - The processing functions to apply to the route.
197
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to apply to the route.
195
198
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
196
199
  */
197
200
  doPatch(pRoute, ...fRouteProcessingFunctions)
@@ -203,7 +206,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
203
206
  * Handles HTTP OPT requests -- this is a base function that does nothing; override by the serviceserver is expected.
204
207
  *
205
208
  * @param {string} pRoute - The route.
206
- * @param {...Function} fRouteProcessingFunctions - The processing functions to apply to the route.
209
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to apply to the route.
207
210
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
208
211
  */
209
212
  doOpts(pRoute, ...fRouteProcessingFunctions)
@@ -215,7 +218,7 @@ class OratorServiceServerRestify extends libOratorServiceServerBase
215
218
  * Handles HTTP HEAD requests -- this is a base function that does nothing; override by the serviceserver is expected.
216
219
  *
217
220
  * @param {string} pRoute - The route to handle the HEAD request for.
218
- * @param {...Function} fRouteProcessingFunctions - The processing functions to execute for the route.
221
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
219
222
  * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
220
223
  */
221
224
  doHead(pRoute, ...fRouteProcessingFunctions)
@@ -637,10 +637,7 @@ suite
637
637
  tmpHarness.orator.startService(
638
638
  () =>
639
639
  {
640
- // Note: The base class head() method has a known issue where it
641
- // returns true without calling doHead(), so we call doHead directly
642
- // on the restify service server to register the HEAD route.
643
- tmpHarness.orator.serviceServer.doHead('/api/status',
640
+ tmpHarness.orator.serviceServer.head('/api/status',
644
641
  (pRequest, pResponse, fNext) =>
645
642
  {
646
643
  pResponse.header('X-Custom-Header', 'TestValue');
@@ -1,7 +1,80 @@
1
1
  export = OratorServiceServerRestify;
2
- declare class OratorServiceServerRestify extends libOratorServiceServerBase {
3
- /** @type {libRestify} */
4
- server: libRestify;
2
+ /**
3
+ * @extends {libOratorServiceServerBase<import('restify').Request, import('restify').Response, import('restify').Server>}
4
+ */
5
+ declare class OratorServiceServerRestify extends libOratorServiceServerBase<libRestify.Request, libRestify.Response, libRestify.Server> {
6
+ /**
7
+ * @param {import('fable')|Record<string, any>} [pFable] - (optional) The fable instance, or the options object if there is no fable
8
+ * @param {Record<string, any>|string} [pOptions] - (optional) The options object, or the service hash if there is no fable
9
+ * @param {string} [pServiceHash] - (optional) The service hash to identify this service instance
10
+ */
11
+ constructor(pFable?: any | Record<string, any>, pOptions?: Record<string, any> | string, pServiceHash?: string);
12
+ /** @type {import('restify').Server} */
13
+ server: import("restify").Server;
14
+ /**
15
+ * Middleware function for parsing the request body.
16
+ *
17
+ * @param {Record<string, any>} [pOptions] - The options for the body parser.
18
+ * @return {import('restify').RequestHandler[]} - The middleware function.
19
+ */
20
+ bodyParser(pOptions?: Record<string, any>): import("restify").RequestHandler[];
21
+ /**
22
+ * Handles HTTP GET requests -- this is a base function that does nothing; override by the serviceserver is expected.
23
+ *
24
+ * @param {string} pRoute - The route of the request.
25
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions for the route.
26
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
27
+ */
28
+ doGet(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
29
+ /**
30
+ * Handles HTTP PUT requests -- this is a base function that does nothing; override by the serviceserver is expected.
31
+ *
32
+ * @param {string} pRoute - The route to handle.
33
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
34
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
35
+ */
36
+ doPut(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
37
+ /**
38
+ * Handles the HTTP POST request for a specific route.
39
+ *
40
+ * @param {string} pRoute - The route to handle the POST request for.
41
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
42
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
43
+ */
44
+ doPost(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
45
+ /**
46
+ * Handles HTTP DELETE requests -- this is a base function that does nothing; override by the serviceserver is expected.
47
+ *
48
+ * @param {string} pRoute - The route of the resource to delete.
49
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to be executed to delete the resource.
50
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
51
+ */
52
+ doDel(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
53
+ /**
54
+ * Handles HTTP PATCH requests -- this is a base function that does nothing; override by the serviceserver is expected.
55
+ *
56
+ * @param {string} pRoute - The route to send the PATCH request to.
57
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to apply to the route.
58
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
59
+ */
60
+ doPatch(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
61
+ /**
62
+ * Handles HTTP OPT requests -- this is a base function that does nothing; override by the serviceserver is expected.
63
+ *
64
+ * @param {string} pRoute - The route.
65
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to apply to the route.
66
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
67
+ */
68
+ doOpts(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
69
+ /**
70
+ * Handles HTTP HEAD requests -- this is a base function that does nothing; override by the serviceserver is expected.
71
+ *
72
+ * @param {string} pRoute - The route to handle the HEAD request for.
73
+ * @param {...import('restify').RequestHandlerType} fRouteProcessingFunctions - The processing functions to execute for the route.
74
+ * @returns {any} - The result of adding the route to the concrete service provider (ex. a route object, a boolean).
75
+ */
76
+ doHead(pRoute: string, ...fRouteProcessingFunctions: import("restify").RequestHandlerType[]): any;
5
77
  }
78
+ import libRestify = require("restify");
6
79
  import libOratorServiceServerBase = require("orator-serviceserver-base");
7
80
  //# sourceMappingURL=Orator-ServiceServer-Restify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Orator-ServiceServer-Restify.d.ts","sourceRoot":"","sources":["../source/Orator-ServiceServer-Restify.js"],"names":[],"mappings":";AAOA;IAiBE,yBAAyB;IACzB,QADW,UAAU,CAC0F;CA0MhH"}
1
+ {"version":3,"file":"Orator-ServiceServer-Restify.d.ts","sourceRoot":"","sources":["../source/Orator-ServiceServer-Restify.js"],"names":[],"mappings":";AAOA;;GAEG;AACH;IAEC;;;;OAIG;IACH,qBAJW,GAAe,GAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,aACnC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAC,MAAM,iBAC1B,MAAM,EAchB;IAFA,uCAAuC;IACvC,QADW,OAAO,SAAS,EAAE,MAAM,CAC4E;IA4EhH;;;;;OAKG;IACH,sBAHW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClB,OAAO,SAAS,EAAE,cAAc,EAAE,CA+B7C;IAKD;;;;;;OAMG;IACH,cAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,cAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,eAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,cAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,gBAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,eAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;IAED;;;;;;OAMG;IACH,eAJW,MAAM,gCACH,OAAO,SAAS,EAAE,kBAAkB,EAAA,GACrC,GAAG,CAKf;CAID"}