create-fluxstack 1.0.19 → 1.0.20

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.
@@ -145,8 +145,15 @@ export const vitePlugin: Plugin = {
145
145
  },
146
146
 
147
147
  onBeforeRoute: async (requestContext: RequestContext) => {
148
- // Skip API routes and swagger - let them be handled by backend
149
- if (requestContext.path.startsWith("/api") || requestContext.path.startsWith("/swagger")) {
148
+ // Skip API routes, swagger, and ALL Vite internal routes
149
+ if (requestContext.path.startsWith("/api") ||
150
+ requestContext.path.startsWith("/swagger") ||
151
+ requestContext.path.startsWith("/@") || // All Vite internal routes (/@vite/, /@fs/, /@react-refresh, etc.)
152
+ requestContext.path.startsWith("/__vite") || // Vite HMR and dev routes
153
+ requestContext.path.startsWith("/node_modules") || // Direct node_modules access
154
+ requestContext.path.includes("/.vite/") || // Vite cache and deps
155
+ requestContext.path.endsWith(".js.map") || // Source maps
156
+ requestContext.path.endsWith(".css.map")) { // CSS source maps
150
157
  return
151
158
  }
152
159
 
@@ -157,6 +157,18 @@ export class EnhancedErrorHandler {
157
157
  return true
158
158
  }
159
159
 
160
+ // Skip logging for Vite internal routes (even if NOT_FOUND logging is enabled)
161
+ if (error.code === 'NOT_FOUND' && error.metadata?.path) {
162
+ const path = error.metadata.path
163
+ if (path.startsWith('/@') ||
164
+ path.startsWith('/__vite') ||
165
+ path.includes('/.vite/') ||
166
+ path.endsWith('.js.map') ||
167
+ path.endsWith('.css.map')) {
168
+ return true
169
+ }
170
+ }
171
+
160
172
  // Skip logging for rate limit errors to prevent log spam
161
173
  if (error.code === 'RATE_LIMIT_EXCEEDED' && !process.env.ENABLE_RATE_LIMIT_LOGS) {
162
174
  return true
@@ -59,6 +59,7 @@ program
59
59
  'app',
60
60
  'ai-context', // ✅ CRITICAL: Copy AI documentation for users
61
61
  'bun.lock', // ✅ CRITICAL: Copy lockfile to maintain working versions
62
+ 'package.json', // ✅ Copy real package.json from framework
62
63
  'tsconfig.json',
63
64
  'vite.config.ts',
64
65
  '.env.example', // ✅ Use .env.example as template
@@ -192,37 +193,18 @@ bun.lockb
192
193
  `
193
194
  writeFileSync(join(projectPath, '.gitignore'), gitignoreContent)
194
195
 
195
- // Create package.json from template
196
+ // Customize package.json with project name
196
197
  const packageJsonPath = join(projectPath, 'package.json')
197
- const templatePath = join(import.meta.dir, 'package-template.json')
198
-
199
- if (existsSync(templatePath)) {
200
- const templateContent = readFileSync(templatePath, 'utf-8')
201
- const packageTemplate = templateContent.replace(/PROJECT_NAME/g, projectName)
202
- writeFileSync(packageJsonPath, packageTemplate)
203
- } else {
204
- // Fallback template if package-template.json doesn't exist
205
- const fallbackPackageJson = {
206
- "name": projectName,
207
- "version": "1.0.0",
208
- "description": `${projectName} - FluxStack application`,
209
- "keywords": ["fluxstack", "bun", "typescript", "full-stack", "elysia", "react", "vite"],
210
- "author": "Your Name",
211
- "license": "MIT",
212
- "type": "module",
213
- "scripts": {
214
- "dev": "bun core/cli/index.ts dev",
215
- "dev:clean": "bun run-clean.ts",
216
- "dev:backend": "bun core/cli/index.ts dev:backend",
217
- "dev:frontend": "bun core/cli/index.ts dev:frontend",
218
- "build": "bun core/cli/index.ts build",
219
- "build:backend": "bun core/cli/index.ts build:backend",
220
- "build:frontend": "bun core/cli/index.ts build:frontend",
221
- "start": "NODE_ENV=production bun app/server/index.ts",
222
- "typecheck": "bunx tsc --noEmit"
223
- }
224
- }
225
- writeFileSync(packageJsonPath, JSON.stringify(fallbackPackageJson, null, 2))
198
+ if (existsSync(packageJsonPath)) {
199
+ const packageContent = readFileSync(packageJsonPath, 'utf-8')
200
+ const packageJson = JSON.parse(packageContent)
201
+
202
+ // Update project-specific fields
203
+ packageJson.name = projectName
204
+ packageJson.description = `${projectName} - FluxStack application`
205
+ packageJson.version = "1.0.0"
206
+
207
+ writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))
226
208
  }
227
209
 
228
210
  // Create .env from .env.example and set development mode + project name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fluxstack",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "⚡ Modern full-stack TypeScript framework with Elysia + React + Bun",
5
5
  "keywords": [
6
6
  "framework",
@@ -1,67 +0,0 @@
1
- {
2
- "name": "PROJECT_NAME",
3
- "version": "1.0.0",
4
- "description": "PROJECT_NAME - Modern full-stack TypeScript application built with FluxStack",
5
- "keywords": ["fluxstack", "bun", "typescript", "full-stack", "elysia", "react", "vite"],
6
- "author": "Your Name",
7
- "license": "MIT",
8
- "type": "module",
9
- "scripts": {
10
- "dev": "bun core/cli/index.ts dev",
11
- "dev:clean": "bun run-clean.ts",
12
- "dev:backend": "bun core/cli/index.ts dev:backend",
13
- "dev:frontend": "bun core/cli/index.ts dev:frontend",
14
- "build": "bun core/cli/index.ts build",
15
- "build:backend": "bun core/cli/index.ts build:backend",
16
- "build:frontend": "bun core/cli/index.ts build:frontend",
17
- "start": "NODE_ENV=production bun app/server/index.ts",
18
- "start:backend": "NODE_ENV=production bun app/server/backend-only.ts",
19
- "start:frontend": "NODE_ENV=production bun app/client/frontend-only.ts",
20
- "typecheck": "bunx tsc --noEmit",
21
- "test": "vitest",
22
- "test:ui": "vitest --ui",
23
- "test:coverage": "vitest --coverage"
24
- },
25
- "devDependencies": {
26
- "@eslint/js": "^9.30.1",
27
- "@tailwindcss/vite": "^4.1.13",
28
- "@testing-library/jest-dom": "^6.6.4",
29
- "@testing-library/react": "^16.3.0",
30
- "@testing-library/user-event": "^14.6.1",
31
- "@types/bun": "latest",
32
- "@types/node": "^24.5.2",
33
- "@types/react": "^19.1.8",
34
- "@types/react-dom": "^19.1.6",
35
- "@vitest/coverage-v8": "^3.2.4",
36
- "@vitest/ui": "^3.2.4",
37
- "concurrently": "^9.2.0",
38
- "eslint": "^9.30.1",
39
- "eslint-plugin-react-hooks": "^5.2.0",
40
- "eslint-plugin-react-refresh": "^0.4.20",
41
- "globals": "^16.3.0",
42
- "jsdom": "^26.1.0",
43
- "tailwindcss": "^4.1.13",
44
- "typescript": "^5.8.3",
45
- "typescript-eslint": "^8.35.1",
46
- "vitest": "^3.2.4"
47
- },
48
- "dependencies": {
49
- "@elysiajs/eden": "^1.3.2",
50
- "@elysiajs/swagger": "^1.3.1",
51
- "@types/http-proxy-middleware": "^1.0.0",
52
- "@vitejs/plugin-react": "^4.6.0",
53
- "chokidar": "^4.0.3",
54
- "elysia": "^1.4.6",
55
- "http-proxy-middleware": "^3.0.5",
56
- "lightningcss": "^1.30.1",
57
- "lucide-react": "^0.544.0",
58
- "react": "^19.1.0",
59
- "react-dom": "^19.1.0",
60
- "vite": "^7.0.4"
61
- },
62
- "engines": {
63
- "bun": ">=1.2.0"
64
- },
65
- "preferredPackageManager": "bun",
66
- "trustedDependencies": ["esbuild"]
67
- }