mirror of
https://github.com/diced/zipline.git
synced 2025-04-04 23:21:17 -05:00
* fix: Less debug info for login. That stuff's sacred * notFix: increase plugin timeout, perhaps this is enough time to let zipline start * fix: Some dependency upgrades to fix a bug. * remove console log
This commit is contained in:
parent
1be47b4d36
commit
956fafb826
5 changed files with 370 additions and 605 deletions
22
package.json
22
package.json
|
@ -30,15 +30,15 @@
|
|||
"dependencies": {
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/server": "^11.11.0",
|
||||
"@mantine/core": "^6.0.21",
|
||||
"@mantine/dropzone": "^6.0.21",
|
||||
"@mantine/form": "^6.0.21",
|
||||
"@mantine/hooks": "^6.0.21",
|
||||
"@mantine/modals": "^6.0.21",
|
||||
"@mantine/next": "^6.0.21",
|
||||
"@mantine/notifications": "^6.0.21",
|
||||
"@mantine/prism": "^6.0.21",
|
||||
"@mantine/spotlight": "^6.0.21",
|
||||
"@mantine/core": "6.x",
|
||||
"@mantine/dropzone": "6.x",
|
||||
"@mantine/form": "6.x",
|
||||
"@mantine/hooks": "6.x",
|
||||
"@mantine/modals": "6.x",
|
||||
"@mantine/next": "6.x",
|
||||
"@mantine/notifications": "6.x",
|
||||
"@mantine/prism": "6.x",
|
||||
"@mantine/spotlight": "6.x",
|
||||
"@prisma/client": "^5.1.1",
|
||||
"@prisma/internals": "^5.1.1",
|
||||
"@prisma/migrate": "^5.1.1",
|
||||
|
@ -68,10 +68,10 @@
|
|||
"qrcode": "^1.5.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-markdown": "^8.0.6",
|
||||
"react-markdown": "^9.0.3",
|
||||
"recharts": "^2.10.1",
|
||||
"recoil": "^0.7.7",
|
||||
"remark-gfm": "^4.0.0",
|
||||
"remark-gfm": "^4.0.1",
|
||||
"sharp": "^0.32.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -7,16 +7,23 @@ import { Language } from 'prism-react-renderer';
|
|||
export default function Markdown({ code, ...props }) {
|
||||
return (
|
||||
<ReactMarkdown
|
||||
remarkPlugins={[remarkGfm]}
|
||||
remarkPlugins={[[remarkGfm, { singleTilde: false }]]}
|
||||
components={{
|
||||
code({ inline, className, children, ...props }) {
|
||||
const match = /language-(\w+)/.exec(className || '');
|
||||
return !inline && match ? (
|
||||
<Prism language={match[1] as Language} {...props}>
|
||||
{String(children).replace(/\n$/, '')}
|
||||
code({ children }) {
|
||||
return <Code>{children}</Code>;
|
||||
},
|
||||
pre({ children }) {
|
||||
// @ts-expect-error someone find the type for this :sob:
|
||||
const match = /language-(\w+)/.exec(children.props?.className || '');
|
||||
// @ts-ignore
|
||||
if (!children.props?.children) return code;
|
||||
return (
|
||||
<Prism language={match ? (match[1] as Language) : 'markdown'}>
|
||||
{
|
||||
// @ts-expect-error
|
||||
String(children.props?.children).replace(/\n$/, '')
|
||||
}
|
||||
</Prism>
|
||||
) : (
|
||||
<Code {...props}>{children}</Code>
|
||||
);
|
||||
},
|
||||
img(props) {
|
||||
|
|
|
@ -41,7 +41,9 @@ async function handler(req: NextApiReq, res: NextApiRes) {
|
|||
else if (await checkPassword(password, user.password)) valid = true;
|
||||
else valid = false;
|
||||
|
||||
logger.debug(`body(${JSON.stringify(req.body)}): checkPassword(${password}, argon2-str) => ${valid}`);
|
||||
logger.debug(
|
||||
`body(${JSON.stringify(Object.keys(req.body))}): checkPassword(password, argon2-str) => ${valid}`,
|
||||
);
|
||||
|
||||
if (!valid) return res.unauthorized('Wrong password');
|
||||
|
||||
|
@ -50,7 +52,7 @@ async function handler(req: NextApiReq, res: NextApiRes) {
|
|||
|
||||
const success = verify_totp_code(user.totpSecret, code);
|
||||
logger.debug(
|
||||
`body(${JSON.stringify(req.body)}): verify_totp_code(${user.totpSecret}, ${code}) => ${success}`,
|
||||
`body(${JSON.stringify(Object.keys(req.body))}): verify_totp_code(totpSecret, ${code}) => ${success}`,
|
||||
);
|
||||
if (!success) return res.badRequest('Invalid code', { totp: true });
|
||||
}
|
||||
|
|
|
@ -281,7 +281,9 @@ async function thumbs(this: FastifyInstance) {
|
|||
}
|
||||
|
||||
function genFastifyOpts(): FastifyServerOptions {
|
||||
const opts = {};
|
||||
const opts: FastifyServerOptions = {
|
||||
pluginTimeout: 25000,
|
||||
};
|
||||
|
||||
if (config.ssl?.cert && config.ssl?.key) {
|
||||
opts['https'] = {
|
||||
|
|
Loading…
Add table
Reference in a new issue