chore: Format code.
This commit is contained in:
parent
41013f46bb
commit
9d7c24a813
4 changed files with 15 additions and 9 deletions
|
@ -57,19 +57,22 @@ const backends: Record<number, BackendBaseClass> = {};
|
||||||
const loggerEnv = {
|
const loggerEnv = {
|
||||||
development: {
|
development: {
|
||||||
transport: {
|
transport: {
|
||||||
target: 'pino-pretty',
|
target: "pino-pretty",
|
||||||
options: {
|
options: {
|
||||||
translateTime: 'HH:MM:ss Z',
|
translateTime: "HH:MM:ss Z",
|
||||||
ignore: 'pid,hostname,time',
|
ignore: "pid,hostname,time",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
production: true,
|
production: true,
|
||||||
test: false,
|
test: false,
|
||||||
}
|
};
|
||||||
|
|
||||||
const fastify = Fastify({
|
const fastify = Fastify({
|
||||||
logger: (process.env.NODE_ENV != "production" ? loggerEnv.development : loggerEnv.production),
|
logger:
|
||||||
|
process.env.NODE_ENV == "production"
|
||||||
|
? loggerEnv.production
|
||||||
|
: loggerEnv.development,
|
||||||
trustProxy: Boolean(process.env.IS_BEHIND_PROXY),
|
trustProxy: Boolean(process.env.IS_BEHIND_PROXY),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,10 @@ export async function run(
|
||||||
"Asks for a password. Hides output",
|
"Asks for a password. Hides output",
|
||||||
);
|
);
|
||||||
|
|
||||||
addCommand.option("-s, --service-account, --service", "Turns the user into a service account");
|
addCommand.option(
|
||||||
|
"-s, --service-account, --service",
|
||||||
|
"Turns the user into a service account",
|
||||||
|
);
|
||||||
|
|
||||||
addCommand.action(
|
addCommand.action(
|
||||||
async (
|
async (
|
||||||
|
@ -93,7 +96,7 @@ export async function run(
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
|
|
||||||
allowUnsafeGlobalTokens: options.isServiceAccount
|
allowUnsafeGlobalTokens: options.isServiceAccount,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.status != 200) {
|
if (response.status != 200) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export async function runCopyID(
|
||||||
stream.write(
|
stream.write(
|
||||||
"Hey there! I think you're using ssh-copy-id. If this is an error, you may close this terminal.\n",
|
"Hey there! I think you're using ssh-copy-id. If this is an error, you may close this terminal.\n",
|
||||||
);
|
);
|
||||||
|
|
||||||
stream.write("Please wait...\n");
|
stream.write("Please wait...\n");
|
||||||
|
|
||||||
const keyData = await readFromKeyboard(stream, true);
|
const keyData = await readFromKeyboard(stream, true);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
import { readFile, writeFile, mkdir } from "node:fs/promises";
|
||||||
import { format } from "node:util";
|
|
||||||
import { timingSafeEqual } from "node:crypto";
|
import { timingSafeEqual } from "node:crypto";
|
||||||
|
import { format } from "node:util";
|
||||||
|
|
||||||
import parseArgsStringToArgv from "string-argv";
|
import parseArgsStringToArgv from "string-argv";
|
||||||
import baseAxios from "axios";
|
import baseAxios from "axios";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue