Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
19
node_modules/nise/lib/fake-server/index.js
generated
vendored
19
node_modules/nise/lib/fake-server/index.js
generated
vendored
|
|
@ -150,7 +150,6 @@ var fakeServer = {
|
|||
fakeHTTPMethods: true,
|
||||
logger: true,
|
||||
unsafeHeadersEnabled: true,
|
||||
legacyRoutes: true,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
|
|
@ -214,8 +213,6 @@ var fakeServer = {
|
|||
|
||||
log: log,
|
||||
|
||||
legacyRoutes: true,
|
||||
|
||||
respondWith: function respondWith(method, url, body) {
|
||||
if (arguments.length === 1 && typeof method !== "function") {
|
||||
this.response = responseArray(method);
|
||||
|
|
@ -250,22 +247,18 @@ var fakeServer = {
|
|||
url = url.replace("://", "\\://");
|
||||
}
|
||||
if (/\*/.test(url)) {
|
||||
// Uses the new syntax for repeating parameters in path-to-regexp,
|
||||
// see https://github.com/pillarjs/path-to-regexp#unexpected--or-
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
url = url.replace(/\/\*/g, "/(.*)");
|
||||
}
|
||||
|
||||
if (this.legacyRoutes) {
|
||||
if (url.includes("?")) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
url = url.replace("?", "\\?");
|
||||
}
|
||||
url = url.replace(/\/\*/g, "/*path");
|
||||
}
|
||||
}
|
||||
|
||||
push.call(this.responses, {
|
||||
method: method,
|
||||
url:
|
||||
typeof url === "string" && url !== "" ? pathToRegexp(url) : url,
|
||||
typeof url === "string" && url !== ""
|
||||
? pathToRegexp(url).regexp
|
||||
: url,
|
||||
response: typeof body === "function" ? body : responseArray(body),
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue