@chimerai/cli 0.2.83 → 0.2.86

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.
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,UAAU,aAAa;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA+CD,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,iBAuH9E"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,UAAU,aAAa;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA+CD,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,iBAyH9E"}
@@ -156,9 +156,11 @@ async function createCommand(projectName, options) {
156
156
  console.log(chalk_1.default.white(` cd ${projectName}`));
157
157
  console.log(chalk_1.default.white(' npm run dev'));
158
158
  console.log(chalk_1.default.gray('\n Server will run on http://localhost:3001\n'));
159
- console.log(chalk_1.default.yellow('Login with:'));
160
- console.log(chalk_1.default.white(' Email: admin@example.com'));
161
- console.log(chalk_1.default.white(' Password: admin123\n'));
159
+ if (selectedFeatures.includes('auth')) {
160
+ console.log(chalk_1.default.yellow('Login with:'));
161
+ console.log(chalk_1.default.white(' Email: admin@example.com'));
162
+ console.log(chalk_1.default.white(' Password: admin123\n'));
163
+ }
162
164
  }
163
165
  catch (error) {
164
166
  console.log(chalk_1.default.red('\n❌ Installation failed'));
@@ -220,7 +222,7 @@ async function createProject(targetDir, projectName, features, sqlite) {
220
222
  }
221
223
  // 9. Create install scripts
222
224
  spinner.text = 'Creating install scripts...';
223
- await createInstallScripts(targetDir, sqlite);
225
+ await createInstallScripts(targetDir, features, sqlite);
224
226
  // 10. Create README
225
227
  spinner.text = 'Creating documentation...';
226
228
  await createReadme(targetDir, projectName, features);
@@ -294,11 +296,18 @@ async function createPackageJson(targetDir, projectName, features) {
294
296
  react: '^18.3.1',
295
297
  'react-dom': '^18.3.1',
296
298
  '@prisma/client': '^5.22.0',
299
+ // Auth is core infrastructure — routes, middleware, and API handlers all depend on it
300
+ 'next-auth': '^4.24.10',
301
+ '@auth/prisma-adapter': '^2.11.1',
302
+ 'bcryptjs': '^2.4.3',
303
+ 'next-themes': '^0.4.4',
304
+ 'sonner': '^1.7.0',
297
305
  };
298
306
  const devDependencies = {
299
307
  '@types/node': '^20',
300
308
  '@types/react': '^18',
301
309
  '@types/react-dom': '^18',
310
+ '@types/bcryptjs': '^2.4.6',
302
311
  typescript: '^5',
303
312
  tailwindcss: '^3.4.0',
304
313
  postcss: '^8.5.10',
@@ -306,15 +315,6 @@ async function createPackageJson(targetDir, projectName, features) {
306
315
  prisma: '^5.22.0',
307
316
  tsx: '^4.20.6',
308
317
  };
309
- // Add feature-specific dependencies
310
- if (features.includes('auth')) {
311
- dependencies['next-auth'] = '^4.24.10';
312
- dependencies['@auth/prisma-adapter'] = '^2.11.1';
313
- dependencies['bcryptjs'] = '^2.4.3';
314
- dependencies['next-themes'] = '^0.4.4';
315
- dependencies['sonner'] = '^1.7.0';
316
- devDependencies['@types/bcryptjs'] = '^2.4.6';
317
- }
318
318
  // Note: ChimerAI workspace packages are not yet published to npm
319
319
  // For standalone projects, these features will need manual implementation
320
320
  // or you can use the complete starter kit with 'chimerai init'
@@ -1217,6 +1217,7 @@ async function getServerSessionWithPermissions() {
1217
1217
  }
1218
1218
  async function createSeedScript(targetDir, features, sqlite) {
1219
1219
  // Generate seed script with feature-specific configuration
1220
+ // next-auth / bcryptjs are always installed (core infrastructure)
1220
1221
  const seedScript = `import { PrismaClient } from '@prisma/client';
1221
1222
  import * as bcrypt from 'bcryptjs';
1222
1223
  import crypto from 'crypto';
@@ -1248,7 +1249,7 @@ function encrypt(text: string): string {
1248
1249
  async function main() {
1249
1250
  console.log('🌱 Seeding database...');
1250
1251
 
1251
- // Create default admin user
1252
+ // Create default admin user (next-auth is always a core dependency)
1252
1253
  const hashedPassword = await bcrypt.hash('admin123', 10);
1253
1254
  const admin = await prisma.user.upsert({
1254
1255
  where: { email: 'admin@example.com' },
@@ -1423,7 +1424,8 @@ main()
1423
1424
  async function createDockerCompose(targetDir) {
1424
1425
  await fs_extra_1.default.writeFile(path_1.default.join(targetDir, 'docker-compose.yml'), (0, index_js_1.generateDockerComposeDev)());
1425
1426
  }
1426
- async function createInstallScripts(targetDir, sqlite) {
1427
+ async function createInstallScripts(targetDir, features, sqlite) {
1428
+ // Windows install.bat
1427
1429
  // Windows install.bat
1428
1430
  const installBat = sqlite
1429
1431
  ? `@echo off
@@ -1724,13 +1726,13 @@ npm run dev
1724
1726
 
1725
1727
  Open [http://localhost:3001](http://localhost:3001) in your browser.
1726
1728
 
1727
- ### Default Admin Credentials
1729
+ ${features.includes('auth') ? `### Default Admin Credentials
1728
1730
 
1729
1731
  - Email: admin@example.com
1730
1732
  - Password: admin123
1731
1733
 
1732
1734
  ⚠️ Change these in production!
1733
-
1735
+ ` : ``}
1734
1736
  ## Available Scripts
1735
1737
 
1736
1738
  - \`pnpm dev\` - Start development server
@@ -1791,8 +1793,7 @@ Commercial License - See LICENSE file
1791
1793
  5. \`pnpm dev\`
1792
1794
 
1793
1795
  ## Default Login
1794
- - Email: admin@example.com
1795
- - Password: admin123
1796
+ ${features.includes('auth') ? `- Email: admin@example.com\n- Password: admin123` : `- No auth feature selected`}
1796
1797
 
1797
1798
  ## CLI Commands
1798
1799
  - \`chimerai add <component>\` — Add features
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,MAAM,CAS3C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CA6BzC;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAgB/C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAQ9C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAY3C"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/templates/config.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,MAAM,CAS3C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CA6BzC;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAyD/C;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAQ9C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAyD3C"}
@@ -46,7 +46,7 @@ function generateTsConfig() {
46
46
  `;
47
47
  }
48
48
  function generateTailwindConfig() {
49
- return `// @chimerai component=TailwindConfig version=1.0
49
+ return `// @chimerai component=TailwindConfig version=1.1
50
50
  /** @type {import('tailwindcss').Config} */
51
51
  module.exports = {
52
52
  darkMode: 'class',
@@ -56,7 +56,48 @@ module.exports = {
56
56
  './app/**/*.{js,ts,jsx,tsx,mdx}',
57
57
  ],
58
58
  theme: {
59
- extend: {},
59
+ extend: {
60
+ colors: {
61
+ background: 'hsl(var(--background))',
62
+ foreground: 'hsl(var(--foreground))',
63
+ primary: {
64
+ DEFAULT: 'hsl(var(--primary))',
65
+ foreground: 'hsl(var(--primary-foreground))',
66
+ },
67
+ secondary: {
68
+ DEFAULT: 'hsl(var(--secondary))',
69
+ foreground: 'hsl(var(--secondary-foreground))',
70
+ },
71
+ muted: {
72
+ DEFAULT: 'hsl(var(--muted))',
73
+ foreground: 'hsl(var(--muted-foreground))',
74
+ },
75
+ accent: {
76
+ DEFAULT: 'hsl(var(--accent))',
77
+ foreground: 'hsl(var(--accent-foreground))',
78
+ },
79
+ destructive: {
80
+ DEFAULT: 'hsl(var(--destructive))',
81
+ foreground: 'hsl(var(--destructive-foreground))',
82
+ },
83
+ border: 'hsl(var(--border))',
84
+ input: 'hsl(var(--input))',
85
+ ring: 'hsl(var(--ring))',
86
+ card: {
87
+ DEFAULT: 'hsl(var(--card))',
88
+ foreground: 'hsl(var(--card-foreground))',
89
+ },
90
+ popover: {
91
+ DEFAULT: 'hsl(var(--popover))',
92
+ foreground: 'hsl(var(--popover-foreground))',
93
+ },
94
+ },
95
+ borderRadius: {
96
+ lg: 'var(--radius)',
97
+ md: 'calc(var(--radius) - 2px)',
98
+ sm: 'calc(var(--radius) - 4px)',
99
+ },
100
+ },
60
101
  },
61
102
  plugins: [],
62
103
  };
@@ -72,12 +113,57 @@ function generatePostcssConfig() {
72
113
  `;
73
114
  }
74
115
  function generateGlobalsCss() {
75
- return `/* @chimerai component=GlobalsCss version=1.3 */
116
+ return `/* @chimerai component=GlobalsCss version=1.4 */
76
117
  @tailwind base;
77
118
  @tailwind components;
78
119
  @tailwind utilities;
79
120
 
80
121
  @layer base {
122
+ :root {
123
+ --background: 0 0% 100%;
124
+ --foreground: 222.2 84% 4.9%;
125
+ --card: 0 0% 100%;
126
+ --card-foreground: 222.2 84% 4.9%;
127
+ --popover: 0 0% 100%;
128
+ --popover-foreground: 222.2 84% 4.9%;
129
+ --primary: 222.2 47.4% 11.2%;
130
+ --primary-foreground: 210 40% 98%;
131
+ --secondary: 210 40% 96.1%;
132
+ --secondary-foreground: 222.2 47.4% 11.2%;
133
+ --muted: 210 40% 96.1%;
134
+ --muted-foreground: 215.4 16.3% 46.9%;
135
+ --accent: 210 40% 96.1%;
136
+ --accent-foreground: 222.2 47.4% 11.2%;
137
+ --destructive: 0 84.2% 60.2%;
138
+ --destructive-foreground: 210 40% 98%;
139
+ --border: 214.3 31.8% 91.4%;
140
+ --input: 214.3 31.8% 91.4%;
141
+ --ring: 222.2 84% 4.9%;
142
+ --radius: 0.5rem;
143
+ }
144
+
145
+ .dark {
146
+ --background: 222.2 84% 4.9%;
147
+ --foreground: 210 40% 98%;
148
+ --card: 222.2 84% 4.9%;
149
+ --card-foreground: 210 40% 98%;
150
+ --popover: 222.2 84% 4.9%;
151
+ --popover-foreground: 210 40% 98%;
152
+ --primary: 210 40% 98%;
153
+ --primary-foreground: 222.2 47.4% 11.2%;
154
+ --secondary: 217.2 32.6% 17.5%;
155
+ --secondary-foreground: 210 40% 98%;
156
+ --muted: 217.2 32.6% 17.5%;
157
+ --muted-foreground: 215 20.2% 65.1%;
158
+ --accent: 217.2 32.6% 17.5%;
159
+ --accent-foreground: 210 40% 98%;
160
+ --destructive: 0 62.8% 30.6%;
161
+ --destructive-foreground: 210 40% 98%;
162
+ --border: 217.2 32.6% 17.5%;
163
+ --input: 217.2 32.6% 17.5%;
164
+ --ring: 212.7 26.8% 83.9%;
165
+ }
166
+
81
167
  body {
82
168
  @apply bg-background text-foreground;
83
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chimerai/cli",
3
- "version": "0.2.83",
3
+ "version": "0.2.86",
4
4
  "description": "CLI wizard for ChimerAI starter kit — scaffold auth, RBAC, AI chat, billing and more into any Next.js project",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {