create-better-t-stack 2.16.2 → 2.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1517,23 +1517,6 @@ async function executeNeonCommand(packageManager, commandArgsString, spinnerText
|
|
|
1517
1517
|
throw error;
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
|
-
async function isNeonAuthenticated(packageManager) {
|
|
1521
|
-
try {
|
|
1522
|
-
const commandArgsString = "neonctl projects list";
|
|
1523
|
-
const result = await executeNeonCommand(packageManager, commandArgsString);
|
|
1524
|
-
return !result.stdout.includes("not authenticated") && !result.stdout.includes("error");
|
|
1525
|
-
} catch {
|
|
1526
|
-
return false;
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
async function authenticateWithNeon(packageManager) {
|
|
1530
|
-
try {
|
|
1531
|
-
await executeNeonCommand(packageManager, "neonctl auth", "Authenticating with Neon...");
|
|
1532
|
-
return true;
|
|
1533
|
-
} catch (_error) {
|
|
1534
|
-
consola$1.error(pc.red("Failed to authenticate with Neon"));
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
1520
|
async function createNeonProject(projectName, regionId, packageManager) {
|
|
1538
1521
|
try {
|
|
1539
1522
|
const commandArgsString = `neonctl projects create --name ${projectName} --region-id ${regionId} --output json`;
|
|
@@ -1578,15 +1561,7 @@ DATABASE_URL="your_connection_string"`);
|
|
|
1578
1561
|
}
|
|
1579
1562
|
async function setupNeonPostgres(config) {
|
|
1580
1563
|
const { packageManager, projectDir } = config;
|
|
1581
|
-
const setupSpinner = spinner();
|
|
1582
|
-
setupSpinner.start("Checking Neon authentication...");
|
|
1583
1564
|
try {
|
|
1584
|
-
const isAuthenticated = await isNeonAuthenticated(packageManager);
|
|
1585
|
-
setupSpinner.stop("Neon authentication checked");
|
|
1586
|
-
if (!isAuthenticated) {
|
|
1587
|
-
log.info("Please authenticate with Neon to continue:");
|
|
1588
|
-
await authenticateWithNeon(packageManager);
|
|
1589
|
-
}
|
|
1590
1565
|
const suggestedProjectName = path.basename(projectDir);
|
|
1591
1566
|
const projectName = await text({
|
|
1592
1567
|
message: "Enter a name for your Neon project:",
|
|
@@ -1610,7 +1585,6 @@ async function setupNeonPostgres(config) {
|
|
|
1610
1585
|
await writeEnvFile(projectDir, config$1);
|
|
1611
1586
|
finalSpinner.stop("Neon database configured!");
|
|
1612
1587
|
} catch (error) {
|
|
1613
|
-
setupSpinner.stop(pc.red("Neon authentication check failed"));
|
|
1614
1588
|
if (error instanceof Error) consola$1.error(pc.red(error.message));
|
|
1615
1589
|
await writeEnvFile(projectDir);
|
|
1616
1590
|
displayManualSetupInstructions();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.3",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -3,7 +3,7 @@ import Loader from "@/components/loader";
|
|
|
3
3
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
4
4
|
import { Toaster } from "@/components/ui/sonner";
|
|
5
5
|
{{#if (eq api "orpc")}}
|
|
6
|
-
import { link, orpc
|
|
6
|
+
import { link, orpc } from "@/utils/orpc";
|
|
7
7
|
import type { QueryClient } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
9
9
|
import { useState } from "react";
|