[no publish] update npm packages
This commit is contained in:
parent
58c390fc61
commit
19b74cdcda
44
index.js
44
index.js
@ -29,7 +29,7 @@ module.exports = function main (
|
||||
const regex = /(?<method>.*?)-(?<url>.*?)\.js/u;
|
||||
const { groups } = regex.exec (f);
|
||||
|
||||
if ('undefined' === typeof subdir)
|
||||
if (typeof subdir === 'undefined')
|
||||
groups.url = `/${groups.url}/`;
|
||||
else
|
||||
groups.url = `/${subdir}/${groups.url}/`;
|
||||
@ -58,28 +58,28 @@ module.exports = function main (
|
||||
console.log (`[requestor info] redirecting ${groups.url} to ${f}`);
|
||||
|
||||
switch (groups.method) {
|
||||
case 'post':
|
||||
app.post (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'get':
|
||||
app.get (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'put':
|
||||
app.put (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'delete':
|
||||
app.delete (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'all':
|
||||
app.all (groups.url, requestor_handler);
|
||||
break;
|
||||
default:
|
||||
if (verbose)
|
||||
console.warn (
|
||||
`'${groups.method}' did not match any request method, ignoring`
|
||||
);
|
||||
case 'post':
|
||||
app.post (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'get':
|
||||
app.get (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'put':
|
||||
app.put (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'delete':
|
||||
app.delete (groups.url, requestor_handler);
|
||||
break;
|
||||
case 'all':
|
||||
app.all (groups.url, requestor_handler);
|
||||
break;
|
||||
default:
|
||||
if (verbose)
|
||||
console.warn (
|
||||
`'${groups.method}' did not match any request method, ignoring`
|
||||
);
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -25,13 +25,14 @@
|
||||
}
|
||||
},
|
||||
"@scode/eslint-config": {
|
||||
"version": "1.0.21",
|
||||
"resolved": "https://npm.scode.ovh/@scode%2feslint-config/-/eslint-config-1.0.21.tgz",
|
||||
"integrity": "sha512-v5oF/hFM5qvoUSVJtVGBou3Uu7NDqc91c28YtGUcMXwtRsj0ZjEE+rC4Nd08OhApYHU7rwczqRG06x0/ecVhYQ==",
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://npm.scode.ovh/@scode%2feslint-config/-/eslint-config-1.1.8.tgz",
|
||||
"integrity": "sha512-xpHPxlGugwOdWZVwhbjwRJhxh7V84GvSdTHSkuiBVW6siBcu66uV2Wd41pJUlpZuBr4j14nq8hyZGPNW8eyOTQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-plugin-jsdoc": "^18.4.4",
|
||||
"eslint-plugin-vue": "^6.0.1"
|
||||
"eslint-plugin-import": "^2.19.1",
|
||||
"eslint-plugin-jsdoc": "^20.0.0",
|
||||
"eslint-plugin-vue": "^6.1.2"
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
@ -591,9 +592,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jsdoc": {
|
||||
"version": "18.11.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-18.11.0.tgz",
|
||||
"integrity": "sha512-24J2+eK2ZHZ1KvpKcoOEir2k4xJKfPzZ1JC9PToi8y8Tn59T8TVVSNRTTRzsDdiaQeIbehApB3KxqIfJG8o7hg==",
|
||||
"version": "20.0.5",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-20.0.5.tgz",
|
||||
"integrity": "sha512-hSGCKkrydrwfwlSo+6BEHZ8tUm4SwJ+96dINdDGn5jYwmiQOkAq+aYVOusVjVGWSJ/kKqDJCWVp99jt8K6Prkw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"comment-parser": "^0.7.2",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"author": "Timo Hocker",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"@scode/eslint-config": "^1.0.21",
|
||||
"@scode/eslint-config": "^1.1.8",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
|
Reference in New Issue
Block a user