mirror of
https://github.com/Dokploy/cli.git
synced 2026-06-30 03:25:20 +02:00
refactor: add commands
This commit is contained in:
@@ -9,9 +9,12 @@ const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const configPath = path.join(__dirname, "..", "..", "config.json");
|
||||
|
||||
export const readAuthConfig = async (
|
||||
command: Command,
|
||||
): Promise<{ token: string; url: string }> => {
|
||||
export type AuthConfig = {
|
||||
token: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
export const readAuthConfig = async (command: Command): Promise<AuthConfig> => {
|
||||
if (!fs.existsSync(configPath)) {
|
||||
command.error(
|
||||
chalk.red(
|
||||
|
||||
Reference in New Issue
Block a user