feat(cli): add prisma create-db setup (#419)

This commit is contained in:
Aman Varshney
2025-07-23 23:35:28 +05:30
committed by GitHub
parent 2543c5317b
commit 0c26578e8e
15 changed files with 139 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
import { execa } from "execa";
export async function commandExists(command: string): Promise<boolean> {
export async function commandExists(command: string) {
try {
const isWindows = process.platform === "win32";
if (isWindows) {

View File

@@ -3,11 +3,11 @@ import pc from "picocolors";
import type { Database } from "../types";
import { commandExists } from "./command-exists";
export async function isDockerInstalled(): Promise<boolean> {
export async function isDockerInstalled() {
return commandExists("docker");
}
export async function isDockerRunning(): Promise<boolean> {
export async function isDockerRunning() {
try {
const { $ } = await import("execa");
await $`docker info`;