mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add cloudflare workers support (#326)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { cancel, isCancel, select } from "@clack/prompts";
|
||||
import pc from "picocolors";
|
||||
import { DEFAULT_CONFIG } from "../constants";
|
||||
import type { Backend, Database, ORM } from "../types";
|
||||
import type { Backend, Database, ORM, Runtime } from "../types";
|
||||
|
||||
const ormOptions = {
|
||||
prisma: {
|
||||
@@ -26,6 +26,7 @@ export async function getORMChoice(
|
||||
hasDatabase: boolean,
|
||||
database?: Database,
|
||||
backend?: Backend,
|
||||
runtime?: Runtime,
|
||||
): Promise<ORM> {
|
||||
if (backend === "convex") {
|
||||
return "none";
|
||||
@@ -34,6 +35,10 @@ export async function getORMChoice(
|
||||
if (!hasDatabase) return "none";
|
||||
if (orm !== undefined) return orm;
|
||||
|
||||
if (runtime === "workers") {
|
||||
return "drizzle";
|
||||
}
|
||||
|
||||
const options = [
|
||||
...(database === "mongodb"
|
||||
? [ormOptions.prisma, ormOptions.mongoose]
|
||||
|
||||
Reference in New Issue
Block a user