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