mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add polar as better-auth plugin (#578)
This commit is contained in:
@@ -60,54 +60,54 @@ describe("Database and ORM Combinations", () => {
|
||||
orm: ORM;
|
||||
error: string;
|
||||
}> = [
|
||||
// MongoDB with Drizzle (not supported)
|
||||
{
|
||||
database: "mongodb" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
error: "Drizzle ORM does not support MongoDB",
|
||||
},
|
||||
// MongoDB with Drizzle (not supported)
|
||||
{
|
||||
database: "mongodb" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
error: "Drizzle ORM does not support MongoDB",
|
||||
},
|
||||
|
||||
// Mongoose with non-MongoDB
|
||||
{
|
||||
database: "sqlite" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
{
|
||||
database: "postgres" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
{
|
||||
database: "mysql" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
// Mongoose with non-MongoDB
|
||||
{
|
||||
database: "sqlite" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
{
|
||||
database: "postgres" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
{
|
||||
database: "mysql" as Database,
|
||||
orm: "mongoose" as ORM,
|
||||
error: "Mongoose ORM requires MongoDB database",
|
||||
},
|
||||
|
||||
// Database without ORM
|
||||
{
|
||||
database: "sqlite" as Database,
|
||||
orm: "none" as ORM,
|
||||
error: "Database selection requires an ORM",
|
||||
},
|
||||
{
|
||||
database: "postgres" as Database,
|
||||
orm: "none" as ORM,
|
||||
error: "Database selection requires an ORM",
|
||||
},
|
||||
// Database without ORM
|
||||
{
|
||||
database: "sqlite" as Database,
|
||||
orm: "none" as ORM,
|
||||
error: "Database selection requires an ORM",
|
||||
},
|
||||
{
|
||||
database: "postgres" as Database,
|
||||
orm: "none" as ORM,
|
||||
error: "Database selection requires an ORM",
|
||||
},
|
||||
|
||||
// ORM without database
|
||||
{
|
||||
database: "none" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
error: "ORM selection requires a database",
|
||||
},
|
||||
{
|
||||
database: "none" as Database,
|
||||
orm: "prisma" as ORM,
|
||||
error: "ORM selection requires a database",
|
||||
},
|
||||
];
|
||||
// ORM without database
|
||||
{
|
||||
database: "none" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
error: "ORM selection requires a database",
|
||||
},
|
||||
{
|
||||
database: "none" as Database,
|
||||
orm: "prisma" as ORM,
|
||||
error: "ORM selection requires a database",
|
||||
},
|
||||
];
|
||||
|
||||
for (const { database, orm, error } of invalidCombinations) {
|
||||
it(`should fail with ${database} + ${orm}`, async () => {
|
||||
|
||||
@@ -456,16 +456,16 @@ describe("Deployment Configurations", () => {
|
||||
webDeploy: TestConfig["webDeploy"];
|
||||
serverDeploy: TestConfig["serverDeploy"];
|
||||
}> = [
|
||||
{ webDeploy: "wrangler", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "wrangler", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "wrangler", serverDeploy: "none" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "none" },
|
||||
{ webDeploy: "none", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "none", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "none", serverDeploy: "none" },
|
||||
];
|
||||
{ webDeploy: "wrangler", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "wrangler", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "wrangler", serverDeploy: "none" },
|
||||
{ webDeploy: "alchemy", serverDeploy: "none" },
|
||||
{ webDeploy: "none", serverDeploy: "wrangler" },
|
||||
{ webDeploy: "none", serverDeploy: "alchemy" },
|
||||
{ webDeploy: "none", serverDeploy: "none" },
|
||||
];
|
||||
|
||||
for (const { webDeploy, serverDeploy } of deployOptions) {
|
||||
it(`should work with webDeploy: ${webDeploy}, serverDeploy: ${serverDeploy}`, async () => {
|
||||
|
||||
@@ -98,19 +98,19 @@ export async function runTRPCTest(config: TestConfig): Promise<TestResult> {
|
||||
const coreStackDefaults = willUseYesFlag
|
||||
? {}
|
||||
: {
|
||||
frontend: ["tanstack-router"] as Frontend[],
|
||||
backend: "hono" as Backend,
|
||||
runtime: "bun" as Runtime,
|
||||
api: "trpc" as API,
|
||||
database: "sqlite" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
auth: "none" as Auth,
|
||||
addons: ["none"] as Addons[],
|
||||
examples: ["none"] as Examples[],
|
||||
dbSetup: "none" as DatabaseSetup,
|
||||
webDeploy: "none" as WebDeploy,
|
||||
serverDeploy: "none" as ServerDeploy,
|
||||
};
|
||||
frontend: ["tanstack-router"] as Frontend[],
|
||||
backend: "hono" as Backend,
|
||||
runtime: "bun" as Runtime,
|
||||
api: "trpc" as API,
|
||||
database: "sqlite" as Database,
|
||||
orm: "drizzle" as ORM,
|
||||
auth: "none" as Auth,
|
||||
addons: ["none"] as Addons[],
|
||||
examples: ["none"] as Examples[],
|
||||
dbSetup: "none" as DatabaseSetup,
|
||||
webDeploy: "none" as WebDeploy,
|
||||
serverDeploy: "none" as ServerDeploy,
|
||||
};
|
||||
|
||||
// Build options object - let the CLI handle all validation
|
||||
const options: CreateInput = {
|
||||
|
||||
Reference in New Issue
Block a user