create-better-t-stack 2.0.3 → 2.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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",
@@ -1,7 +1,7 @@
1
+ import "dotenv/config";
1
2
  {{#if (eq runtime "node")}}
2
3
  import { node } from "@elysiajs/node";
3
4
  {{/if}}
4
- import "dotenv/config";
5
5
  import { Elysia } from "elysia";
6
6
  import { cors } from "@elysiajs/cors";
7
7
  {{#if (eq api "trpc")}}
@@ -69,4 +69,4 @@ const app = new Elysia()
69
69
  .get("/", () => "OK")
70
70
  .listen(3000, () => {
71
71
  console.log(`Server is running on http://localhost:3000`);
72
- });
72
+ });
@@ -1,3 +1,4 @@
1
+ import "dotenv/config";
1
2
  {{#if (eq api "orpc")}}
2
3
  import { RPCHandler } from "@orpc/server/fetch";
3
4
  import { createContext } from "./lib/context";
@@ -9,7 +10,6 @@ import { auth } from "./lib/auth";
9
10
  {{#if (eq api "trpc")}}
10
11
  import { trpcServer } from "@hono/trpc-server";
11
12
  {{/if}}
12
- import "dotenv/config";
13
13
  import { Hono } from "hono";
14
14
  import { cors } from "hono/cors";
15
15
  import { logger } from "hono/logger";
@@ -74,7 +74,7 @@ app.use("/trpc/*", trpcServer({
74
74
  app.post("/ai", async (c) => {
75
75
  const body = await c.req.json();
76
76
  const messages = body.messages || [];
77
-
77
+
78
78
  const result = streamText({
79
79
  model: google("gemini-1.5-flash"),
80
80
  messages,
@@ -82,7 +82,7 @@ app.post("/ai", async (c) => {
82
82
 
83
83
  c.header("X-Vercel-AI-Data-Stream", "v1");
84
84
  c.header("Content-Type", "text/plain; charset=utf-8");
85
-
85
+
86
86
  return stream(c, (stream) => stream.pipe(result.toDataStream()));
87
87
  });
88
88
  {{/if}}
@@ -102,4 +102,4 @@ serve({
102
102
  });
103
103
  {{else}}
104
104
  export default app;
105
- {{/if}}
105
+ {{/if}}
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "verbatimModuleSyntax": true,
7
+ "strict": true,
8
+ "skipLibCheck": true,
9
+ "baseUrl": "./",
10
+ "paths": {
11
+ "@/*": ["./src/*"]
12
+ },
13
+ "outDir": "./dist",
14
+ "types": [
15
+ {{#if (eq runtime 'node')}}
16
+ "node"
17
+ {{else if (eq runtime 'bun')}}
18
+ "bun"
19
+ {{else}}
20
+ "node", "bun"
21
+ {{/if}}
22
+ ],
23
+ "jsx": "react-jsx"{{#if (eq backend 'hono')}},
24
+ "jsxImportSource": "hono/jsx"{{/if}}
25
+ },
26
+ "tsc-alias": {
27
+ "resolveFullPaths": true
28
+ }
29
+ }
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "verbatimModuleSyntax": true,
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "baseUrl": "./",
10
- "outDir": "./dist",
11
- "types": ["node", "bun"],
12
- "jsx": "react-jsx",
13
- "jsxImportSource": "hono/jsx"
14
- },
15
- "tsc-alias": {
16
- "resolveFullPaths": true
17
- }
18
- }