create-fluxstack 1.0.16 → 1.0.19
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/core/templates/create-project.ts +11 -41
- package/create-fluxstack.ts +117 -1
- package/eslint.config.js +23 -0
- package/package.json +1 -1
- package/tailwind.config.js +34 -0
- package/vitest.config.live.ts +68 -0
- package/vitest.config.ts +42 -0
- package/workspace.json +6 -0
|
@@ -151,6 +151,8 @@ export class ProjectCreator {
|
|
|
151
151
|
"@types/bun": "latest",
|
|
152
152
|
"@types/react": "^18.2.0",
|
|
153
153
|
"@types/react-dom": "^18.2.0",
|
|
154
|
+
"@types/uuid": "^10.0.0",
|
|
155
|
+
"@types/ws": "^8.18.1",
|
|
154
156
|
"@testing-library/react": "^14.0.0",
|
|
155
157
|
"@testing-library/jest-dom": "^6.1.0",
|
|
156
158
|
"@testing-library/user-event": "^14.5.0",
|
|
@@ -164,10 +166,16 @@ export class ProjectCreator {
|
|
|
164
166
|
"@elysiajs/eden": "^1.3.2",
|
|
165
167
|
"@sinclair/typebox": "^0.34.41",
|
|
166
168
|
"@vitejs/plugin-react": "^4.0.0",
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
"chalk": "^5.3.0",
|
|
170
|
+
"chokidar": "^4.0.3",
|
|
171
|
+
"elysia": "latest",
|
|
172
|
+
"react": "^18.2.0",
|
|
169
173
|
"react-dom": "^18.2.0",
|
|
170
|
-
|
|
174
|
+
"react-icons": "^5.5.0",
|
|
175
|
+
"uuid": "^13.0.0",
|
|
176
|
+
"vite": "^5.0.0",
|
|
177
|
+
"ws": "^8.18.3",
|
|
178
|
+
"zustand": "^5.0.8"
|
|
171
179
|
}
|
|
172
180
|
}
|
|
173
181
|
|
|
@@ -527,44 +535,6 @@ Built with ❤️ using FluxStack framework.
|
|
|
527
535
|
`
|
|
528
536
|
|
|
529
537
|
await Bun.write(join(this.targetDir, "README.md"), readme)
|
|
530
|
-
|
|
531
|
-
// .gitignore
|
|
532
|
-
const gitignore = `# Dependencies
|
|
533
|
-
node_modules/
|
|
534
|
-
*.lockb
|
|
535
|
-
|
|
536
|
-
# Build outputs
|
|
537
|
-
dist/
|
|
538
|
-
build/
|
|
539
|
-
.next/
|
|
540
|
-
|
|
541
|
-
# Environment variables
|
|
542
|
-
.env.local
|
|
543
|
-
.env.production
|
|
544
|
-
|
|
545
|
-
# IDE
|
|
546
|
-
.vscode/
|
|
547
|
-
.idea/
|
|
548
|
-
*.swp
|
|
549
|
-
*.swo
|
|
550
|
-
|
|
551
|
-
# OS
|
|
552
|
-
.DS_Store
|
|
553
|
-
Thumbs.db
|
|
554
|
-
|
|
555
|
-
# Logs
|
|
556
|
-
*.log
|
|
557
|
-
logs/
|
|
558
|
-
|
|
559
|
-
# Runtime
|
|
560
|
-
.tmp/
|
|
561
|
-
.cache/
|
|
562
|
-
|
|
563
|
-
# Bun
|
|
564
|
-
bun.lockb
|
|
565
|
-
`
|
|
566
|
-
|
|
567
|
-
await Bun.write(join(this.targetDir, ".gitignore"), gitignore)
|
|
568
538
|
}
|
|
569
539
|
|
|
570
540
|
private async installDependencies() {
|
package/create-fluxstack.ts
CHANGED
|
@@ -62,7 +62,6 @@ program
|
|
|
62
62
|
'tsconfig.json',
|
|
63
63
|
'vite.config.ts',
|
|
64
64
|
'.env.example', // ✅ Use .env.example as template
|
|
65
|
-
'.gitignore', // ✅ Git ignore file for proper repository setup
|
|
66
65
|
'CLAUDE.md', // ✅ Project instructions for AI assistants
|
|
67
66
|
'README.md'
|
|
68
67
|
]
|
|
@@ -76,6 +75,123 @@ program
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
|
|
78
|
+
// Generate .gitignore using template (instead of copying)
|
|
79
|
+
const gitignoreContent = `# Dependencies
|
|
80
|
+
node_modules/
|
|
81
|
+
.pnp
|
|
82
|
+
.pnp.js
|
|
83
|
+
|
|
84
|
+
# Production builds
|
|
85
|
+
/dist
|
|
86
|
+
/build
|
|
87
|
+
/.next/
|
|
88
|
+
/out/
|
|
89
|
+
|
|
90
|
+
# Environment variables
|
|
91
|
+
.env
|
|
92
|
+
.env.local
|
|
93
|
+
.env.development.local
|
|
94
|
+
.env.test.local
|
|
95
|
+
.env.production.local
|
|
96
|
+
|
|
97
|
+
# Logs
|
|
98
|
+
npm-debug.log*
|
|
99
|
+
yarn-debug.log*
|
|
100
|
+
yarn-error.log*
|
|
101
|
+
lerna-debug.log*
|
|
102
|
+
.pnpm-debug.log*
|
|
103
|
+
|
|
104
|
+
# Runtime data
|
|
105
|
+
pids
|
|
106
|
+
*.pid
|
|
107
|
+
*.seed
|
|
108
|
+
*.pid.lock
|
|
109
|
+
|
|
110
|
+
# Coverage directory used by tools like istanbul
|
|
111
|
+
coverage/
|
|
112
|
+
*.lcov
|
|
113
|
+
|
|
114
|
+
# nyc test coverage
|
|
115
|
+
.nyc_output
|
|
116
|
+
|
|
117
|
+
# Dependency directories
|
|
118
|
+
jspm_packages/
|
|
119
|
+
|
|
120
|
+
# TypeScript cache
|
|
121
|
+
*.tsbuildinfo
|
|
122
|
+
|
|
123
|
+
# Optional npm cache directory
|
|
124
|
+
.npm
|
|
125
|
+
|
|
126
|
+
# Optional eslint cache
|
|
127
|
+
.eslintcache
|
|
128
|
+
|
|
129
|
+
# Optional stylelint cache
|
|
130
|
+
.stylelintcache
|
|
131
|
+
|
|
132
|
+
# Microbundle cache
|
|
133
|
+
.rpt2_cache/
|
|
134
|
+
.rts2_cache_cjs/
|
|
135
|
+
.rts2_cache_es/
|
|
136
|
+
.rts2_cache_umd/
|
|
137
|
+
|
|
138
|
+
# Optional REPL history
|
|
139
|
+
.node_repl_history
|
|
140
|
+
|
|
141
|
+
# Output of 'npm pack'
|
|
142
|
+
*.tgz
|
|
143
|
+
|
|
144
|
+
# Yarn Integrity file
|
|
145
|
+
.yarn-integrity
|
|
146
|
+
|
|
147
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
148
|
+
.cache
|
|
149
|
+
.parcel-cache
|
|
150
|
+
|
|
151
|
+
# Next.js build output
|
|
152
|
+
.next
|
|
153
|
+
|
|
154
|
+
# Nuxt.js build / generate output
|
|
155
|
+
.nuxt
|
|
156
|
+
dist
|
|
157
|
+
|
|
158
|
+
# Storybook build outputs
|
|
159
|
+
.out
|
|
160
|
+
.storybook-out
|
|
161
|
+
|
|
162
|
+
# Temporary folders
|
|
163
|
+
tmp/
|
|
164
|
+
temp/
|
|
165
|
+
|
|
166
|
+
# Editor directories and files
|
|
167
|
+
.vscode/*
|
|
168
|
+
!.vscode/extensions.json
|
|
169
|
+
.idea
|
|
170
|
+
*.suo
|
|
171
|
+
*.ntvs*
|
|
172
|
+
*.njsproj
|
|
173
|
+
*.sln
|
|
174
|
+
*.sw?
|
|
175
|
+
|
|
176
|
+
# OS generated files
|
|
177
|
+
.DS_Store
|
|
178
|
+
.DS_Store?
|
|
179
|
+
._*
|
|
180
|
+
.Spotlight-V100
|
|
181
|
+
.Trashes
|
|
182
|
+
ehthumbs.db
|
|
183
|
+
Thumbs.db
|
|
184
|
+
|
|
185
|
+
# FluxStack specific
|
|
186
|
+
uploads/
|
|
187
|
+
public/uploads/
|
|
188
|
+
.fluxstack/
|
|
189
|
+
|
|
190
|
+
# Bun
|
|
191
|
+
bun.lockb
|
|
192
|
+
`
|
|
193
|
+
writeFileSync(join(projectPath, '.gitignore'), gitignoreContent)
|
|
194
|
+
|
|
79
195
|
// Create package.json from template
|
|
80
196
|
const packageJsonPath = join(projectPath, 'package.json')
|
|
81
197
|
const templatePath = join(import.meta.dir, 'package-template.json')
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
import { globalIgnores } from 'eslint/config'
|
|
7
|
+
|
|
8
|
+
export default tseslint.config([
|
|
9
|
+
globalIgnores(['dist']),
|
|
10
|
+
{
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
extends: [
|
|
13
|
+
js.configs.recommended,
|
|
14
|
+
tseslint.configs.recommended,
|
|
15
|
+
reactHooks.configs['recommended-latest'],
|
|
16
|
+
reactRefresh.configs.vite,
|
|
17
|
+
],
|
|
18
|
+
languageOptions: {
|
|
19
|
+
ecmaVersion: 2020,
|
|
20
|
+
globals: globals.browser,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
])
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: [
|
|
4
|
+
"./app/client/index.html",
|
|
5
|
+
"./app/client/src/**/*.{js,ts,jsx,tsx}",
|
|
6
|
+
],
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
colors: {
|
|
10
|
+
// Custom colors for FluxStack branding
|
|
11
|
+
flux: {
|
|
12
|
+
50: '#f0f9ff',
|
|
13
|
+
100: '#e0f2fe',
|
|
14
|
+
200: '#bae6fd',
|
|
15
|
+
300: '#7dd3fc',
|
|
16
|
+
400: '#38bdf8',
|
|
17
|
+
500: '#0ea5e9',
|
|
18
|
+
600: '#0284c7',
|
|
19
|
+
700: '#0369a1',
|
|
20
|
+
800: '#075985',
|
|
21
|
+
900: '#0c4a6e',
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
fontFamily: {
|
|
25
|
+
sans: ['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'sans-serif'],
|
|
26
|
+
},
|
|
27
|
+
animation: {
|
|
28
|
+
'spin-slow': 'spin 3s linear infinite',
|
|
29
|
+
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
plugins: [],
|
|
34
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// 🧪 Vitest Configuration for Live Components Tests
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from 'vitest/config'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
name: 'live-components',
|
|
9
|
+
root: './core/server/live',
|
|
10
|
+
environment: 'node',
|
|
11
|
+
setupFiles: ['./__tests__/setup.ts'],
|
|
12
|
+
include: [
|
|
13
|
+
'**/__tests__/**/*.test.ts'
|
|
14
|
+
],
|
|
15
|
+
exclude: [
|
|
16
|
+
'**/node_modules/**',
|
|
17
|
+
'**/dist/**',
|
|
18
|
+
'**/.{idea,git,cache,output,temp}/**'
|
|
19
|
+
],
|
|
20
|
+
globals: true,
|
|
21
|
+
coverage: {
|
|
22
|
+
provider: 'v8',
|
|
23
|
+
reporter: ['text', 'json', 'html'],
|
|
24
|
+
reportsDirectory: './coverage/live-components',
|
|
25
|
+
include: [
|
|
26
|
+
'core/server/live/**/*.ts'
|
|
27
|
+
],
|
|
28
|
+
exclude: [
|
|
29
|
+
'core/server/live/**/__tests__/**',
|
|
30
|
+
'core/server/live/**/*.test.ts',
|
|
31
|
+
'core/server/live/**/*.spec.ts'
|
|
32
|
+
],
|
|
33
|
+
thresholds: {
|
|
34
|
+
global: {
|
|
35
|
+
branches: 80,
|
|
36
|
+
functions: 80,
|
|
37
|
+
lines: 80,
|
|
38
|
+
statements: 80
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
testTimeout: 10000,
|
|
43
|
+
hookTimeout: 10000,
|
|
44
|
+
teardownTimeout: 5000,
|
|
45
|
+
isolate: true,
|
|
46
|
+
pool: 'threads',
|
|
47
|
+
poolOptions: {
|
|
48
|
+
threads: {
|
|
49
|
+
singleThread: false,
|
|
50
|
+
minThreads: 1,
|
|
51
|
+
maxThreads: 4
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
reporter: ['verbose', 'json'],
|
|
55
|
+
outputFile: {
|
|
56
|
+
json: './test-results/live-components.json'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
resolve: {
|
|
60
|
+
alias: {
|
|
61
|
+
'@': path.resolve(__dirname, './core'),
|
|
62
|
+
'@tests': path.resolve(__dirname, './core/server/live/__tests__')
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
esbuild: {
|
|
66
|
+
target: 'node18'
|
|
67
|
+
}
|
|
68
|
+
})
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
/// <reference types="@testing-library/jest-dom" />
|
|
3
|
+
import { defineConfig } from 'vitest/config'
|
|
4
|
+
import react from '@vitejs/plugin-react'
|
|
5
|
+
import { resolve } from 'path'
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [react()],
|
|
9
|
+
test: {
|
|
10
|
+
globals: true,
|
|
11
|
+
environment: 'jsdom',
|
|
12
|
+
setupFiles: ['./app/client/src/test/setup.ts'],
|
|
13
|
+
include: [
|
|
14
|
+
'app/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
|
|
15
|
+
'core/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'
|
|
16
|
+
],
|
|
17
|
+
exclude: [
|
|
18
|
+
'node_modules',
|
|
19
|
+
'dist',
|
|
20
|
+
'.git',
|
|
21
|
+
'.cache'
|
|
22
|
+
],
|
|
23
|
+
coverage: {
|
|
24
|
+
provider: 'v8',
|
|
25
|
+
reporter: ['text', 'json', 'html'],
|
|
26
|
+
exclude: [
|
|
27
|
+
'node_modules/',
|
|
28
|
+
'app/client/src/test/',
|
|
29
|
+
'**/*.d.ts',
|
|
30
|
+
'**/*.config.*',
|
|
31
|
+
'**/coverage/**'
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
resolve: {
|
|
36
|
+
alias: {
|
|
37
|
+
'@': resolve(__dirname, './app/client/src'),
|
|
38
|
+
'@core': resolve(__dirname, './core'),
|
|
39
|
+
'@server': resolve(__dirname, './app/server')
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
})
|