Pre-render ReDoc
redoc-cliはexpandResponsesは200のみとすると数値と認識されてしまい設定できないため202,204という指定にしています
This commit is contained in:
parent
9e9d378bf1
commit
795fb0eb60
11 changed files with 885 additions and 112 deletions
|
@ -6,22 +6,26 @@ async function main(acct: string): Promise<any> {
|
|||
await resolveUser(username, host, {}, true);
|
||||
}
|
||||
|
||||
// get args
|
||||
const args = process.argv.slice(2);
|
||||
let acct = args[0];
|
||||
|
||||
// normalize args
|
||||
acct = acct.replace(/^@/, '');
|
||||
|
||||
// check args
|
||||
if (!acct.match(/^\w+@\w/)) {
|
||||
throw `Invalid acct format. Valid format are user@host`;
|
||||
export default () => {
|
||||
// get args
|
||||
const args = process.argv.slice(3);
|
||||
let acct = args[0];
|
||||
|
||||
// normalize args
|
||||
acct = acct.replace(/^@/, '');
|
||||
|
||||
// check args
|
||||
if (!acct.match(/^\w+@\w/)) {
|
||||
throw `Invalid acct format. Valid format are user@host`;
|
||||
}
|
||||
|
||||
console.log(`resync ${acct}`);
|
||||
|
||||
main(acct).then(() => {
|
||||
console.log('Done');
|
||||
process.exit(0);
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
console.log(`resync ${acct}`);
|
||||
|
||||
main(acct).then(() => {
|
||||
console.log('Done');
|
||||
}).catch(e => {
|
||||
console.warn(e);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue