mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-02 13:29:23 -06:00
linting
This commit is contained in:
parent
7eb5f8cd32
commit
8a2db2e8cb
@ -39,29 +39,29 @@ run().catch(err => console.error(err))
|
|||||||
|
|
||||||
let accessToken: string
|
let accessToken: string
|
||||||
let client: { id: string, secret: string }
|
let client: { id: string, secret: string }
|
||||||
|
|
||||||
const processOptions = {
|
const processOptions = {
|
||||||
cwd: __dirname,
|
cwd: __dirname,
|
||||||
maxBuffer: Infinity
|
maxBuffer: Infinity
|
||||||
}
|
}
|
||||||
|
|
||||||
async function promptPassword () {
|
async function promptPassword () {
|
||||||
return new Promise ( (res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
prompt.start()
|
prompt.start()
|
||||||
const schema = {
|
const schema = {
|
||||||
properties: {
|
properties: {
|
||||||
password: {
|
password: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prompt.get(schema, function (err, result) {
|
prompt.get(schema, function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return rej(err);
|
return rej(err)
|
||||||
}
|
}
|
||||||
return res(result.password)
|
return res(result.password)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ async function run () {
|
|||||||
if (!user.password) {
|
if (!user.password) {
|
||||||
user.password = await promptPassword()
|
user.password = await promptPassword()
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getClient(program['url'])
|
const res = await getClient(program['url'])
|
||||||
client = {
|
client = {
|
||||||
id: res.body.client_id,
|
id: res.body.client_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user