@artempoletsky/install-kurgandb-admin
Advanced tools
Comparing version 1.0.3 to 1.0.4
19
cli.js
@@ -50,3 +50,3 @@ #! /usr/bin/env node | ||
"@artempoletsky/easyrpc", "@artempoletsky/kurgandb", | ||
"@mantine/core", "@mantine/hooks", "@mantine/dates", "@mantine/form", | ||
"@mantine/core", "@mantine/hooks", "@mantine/dates", "@mantine/form", "mantine-form-zod-resolver", | ||
"tabler-icons-react", "zod" | ||
@@ -94,2 +94,16 @@ ]; | ||
function modifyGlobalsCSS() { | ||
const filePath = `${CWD}/app/globals.css`; | ||
let fileContents = fs.readFileSync(filePath, { encoding: "utf8" }); | ||
fileContents = fileContents.replace("@tailwind base;", `@import '@mantine/dates/styles.css'; | ||
@import '@mantine/core/styles.css'; | ||
@layer tailwind { | ||
@tailwind base; | ||
}`); | ||
fs.writeFileSync(filePath, fileContents); | ||
} | ||
function main() { | ||
@@ -107,3 +121,3 @@ const sourceDir = `${__dirname}/install/adminroute/`; | ||
editGitignore([`/app/${ADMIN_ROOT}/`]); | ||
// editGitignore([`/app/${ADMIN_ROOT}/`]); | ||
@@ -117,2 +131,3 @@ editEnvFile(); | ||
modifyGlobalsCSS(); | ||
installDependencies(); | ||
@@ -119,0 +134,0 @@ } |
@@ -6,3 +6,3 @@ | ||
export async function isAdmin(): Promise<boolean> { | ||
return true; | ||
} | ||
@@ -13,5 +13,5 @@ | ||
export async function login(user: string, password: string): Promise<boolean> { | ||
// if (process.env.KURGANB_ADMIN_USER === user && process.env.KURGANB_ADMIN_PASSWORD === password) { | ||
authorized = true; | ||
// } | ||
if (process.env.KURGANB_ADMIN_USER == user && process.env.KURGANB_ADMIN_PASSWORD == password) { | ||
authorized = true; | ||
} | ||
@@ -18,0 +18,0 @@ return authorized; |
{ | ||
"name": "@artempoletsky/install-kurgandb-admin", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "KurganDB admin panel for next.js", | ||
@@ -5,0 +5,0 @@ "main": "cli.js", |
84581
2150