mockaton 8.10.0 → 8.11.0

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/README.md CHANGED
@@ -224,6 +224,24 @@ api/user.GET.200.json
224
224
  You can also use `.empty` or `.unknown` if you don’t
225
225
  want a `Content-Type` header in the response.
226
226
 
227
+ <details>
228
+ <summary>Supported Methods</summary>
229
+ <p>From Node.js <code>http.METHODS</code></p>
230
+ <p>
231
+ ACL, BIND, CHECKOUT,
232
+ CONNECT, COPY, DELETE,
233
+ GET, HEAD, LINK,
234
+ LOCK, M-SEARCH, MERGE,
235
+ MKACTIVITY, MKCALENDAR, MKCOL,
236
+ MOVE, NOTIFY, OPTIONS,
237
+ PATCH, POST, PROPFIND,
238
+ PROPPATCH, PURGE, PUT,
239
+ QUERY, REBIND, REPORT,
240
+ SEARCH, SOURCE, SUBSCRIBE,
241
+ TRACE, UNBIND, UNLINK,
242
+ UNLOCK, UNSUBSCRIBE
243
+ </p>
244
+ </details>
227
245
 
228
246
  ### Dynamic Parameters
229
247
  Anything within square brackets is always matched. For example, for this route
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "A deterministic server-side for developing and testing frontend clients",
4
4
  "type": "module",
5
- "version": "8.10.0",
5
+ "version": "8.11.0",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
8
8
  "license": "MIT",
package/src/Filename.js CHANGED
@@ -1,7 +1,16 @@
1
- const httpMethods = [
2
- 'CONNECT', 'DELETE', 'GET',
3
- 'HEAD', 'OPTIONS', 'PATCH',
4
- 'POST', 'PUT', 'TRACE'
1
+ const httpMethods = [ // node:http.METHODS
2
+ 'ACL', 'BIND', 'CHECKOUT',
3
+ 'CONNECT', 'COPY', 'DELETE',
4
+ 'GET', 'HEAD', 'LINK',
5
+ 'LOCK', 'M-SEARCH', 'MERGE',
6
+ 'MKACTIVITY', 'MKCALENDAR', 'MKCOL',
7
+ 'MOVE', 'NOTIFY', 'OPTIONS',
8
+ 'PATCH', 'POST', 'PROPFIND',
9
+ 'PROPPATCH', 'PURGE', 'PUT',
10
+ 'QUERY', 'REBIND', 'REPORT',
11
+ 'SEARCH', 'SOURCE', 'SUBSCRIBE',
12
+ 'TRACE', 'UNBIND', 'UNLINK',
13
+ 'UNLOCK', 'UNSUBSCRIBE'
5
14
  ]
6
15
 
7
16
  const reComments = /\(.*?\)/g // Anything within parentheses
@@ -106,6 +106,12 @@ const fixtures = [
106
106
  'Decodes URI'
107
107
  ],
108
108
 
109
+ [
110
+ '/api/uncommon-method',
111
+ '/api/uncommon-method.ACL.200.json',
112
+ 'node.js doesn’t support arbitrary HTTP methods, but it does support a few non-standard ones'
113
+ ],
114
+
109
115
 
110
116
  // Dynamic Params
111
117
  [