@chimerai/cli 1.2.8 → 1.2.9

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.
@@ -1183,13 +1183,13 @@ function stripAuthFromRoute(content) {
1183
1183
  return content
1184
1184
  .replace(/^import \{ getServerSession \} from 'next-auth';\n/m, '')
1185
1185
  .replace(/^import \{ authOptions \} from '@\/lib\/auth';\n/m, '')
1186
- .replace(/^ import \{ getServerSession \} from 'next-auth';\n/m, '')
1187
- .replace(/^ import \{ authOptions \} from '@\/lib\/auth';\n/m, '')
1188
- .replace(/\n const session = await getServerSession\(authOptions\);\n if \(!session\?\.user\?\.id\) \{\n return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n \}\n/g, '\n')
1189
- .replace(/\n const session = await getServerSession\(authOptions\);\n if \(!session\?\.user\) \{\n return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n \}\n/g, '\n')
1190
- .replace(/^ const session = await getServerSession\(authOptions\);\n/m, '')
1191
- .replace(/^ if \(!session\?\.user\?\.id\) \{\n return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n \}\n/m, '')
1192
- .replace(/^ if \(!session\?\.user\) \{\n return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n \}\n/m, '')
1186
+ .replace(/^ {2}import \{ getServerSession \} from 'next-auth';\n/m, '')
1187
+ .replace(/^ {2}import \{ authOptions \} from '@\/lib\/auth';\n/m, '')
1188
+ .replace(/\n {2}const session = await getServerSession\(authOptions\);\n {2}if \(!session\?\.user\?\.id\) \{\n {4}return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n {2}\}\n/g, '\n')
1189
+ .replace(/\n {2}const session = await getServerSession\(authOptions\);\n {2}if \(!session\?\.user\) \{\n {4}return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n {2}\}\n/g, '\n')
1190
+ .replace(/^ {2}const session = await getServerSession\(authOptions\);\n/m, '')
1191
+ .replace(/^ {2}if \(!session\?\.user\?\.id\) \{\n {4}return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n {2}\}\n/m, '')
1192
+ .replace(/^ {2}if \(!session\?\.user\) \{\n {4}return NextResponse\.json\(\{ error: 'Unauthorized' \}, \{ status: 401 \}\);\n {2}\}\n/m, '')
1193
1193
  .replace(/,?\n\s*user_id: session\.user\.id,?/g, '');
1194
1194
  }
1195
1195
  /**
@@ -889,7 +889,7 @@ OLLAMA_BASE_URL=http://localhost:11434
889
889
  # RAG / Embedding settings
890
890
  # Model used for generating embeddings (e.g. text-embedding-ada-002, nomic-embed-text)
891
891
  DEFAULT_EMBEDDING_MODEL=text-embedding-ada-002
892
- # Dimension must match the embedding model (OpenAI ada-002=1536, nomic-embed-text=768)
892
+ # Fallback dimension if auto-detection fails at startup (OpenAI ada-002=1536, nomic-embed-text=768)
893
893
  EMBEDDING_DIMENSION=1536
894
894
  # Default chat model for RAG responses (e.g. gpt-3.5-turbo, llama3.2)
895
895
  DEFAULT_CHAT_MODEL=gpt-3.5-turbo
@@ -1372,7 +1372,12 @@ async function getServerSessionWithPermissions() {
1372
1372
  await fs_extra_1.default.writeFile(path_1.default.join(aiDir, 'services', 'moderation_service.py'), templates.generateModerationService());
1373
1373
  await fs_extra_1.default.writeFile(path_1.default.join(aiDir, 'routes', 'chat_routes.py'), templates.generateChatRoutes());
1374
1374
  // Manifest
1375
- templates.writeAiManifest(targetDir, { modules: ragModules, tools: [], installedAt: new Date().toISOString().split('T')[0], cliVersion: '1.2.5' });
1375
+ templates.writeAiManifest(targetDir, {
1376
+ modules: ragModules,
1377
+ tools: [],
1378
+ installedAt: new Date().toISOString().split('T')[0],
1379
+ cliVersion: '1.2.5',
1380
+ });
1376
1381
  }
1377
1382
  }
1378
1383
  async function createSeedScript(targetDir, features, sqlite) {
@@ -1 +1 @@
1
- {"version":3,"file":"license.d.ts","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I,CAQhD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAGvD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAID,wBAAgB,UAAU,IAAI,OAAO,CAcpC;AAED,oEAAoE;AACpE,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAWrD;AAED,wGAAwG;AACxG,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA8BjF;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAID;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAyD7D;AAUD,wBAAgB,kBAAkB,IAAI,IAAI,CAuBzC"}
package/dist/license.js CHANGED
@@ -209,7 +209,7 @@ function assertComponentAccess(component) {
209
209
  console.log(chalk_1.default.bold('\n You have Enterprise — upgrade to unlock these features:'));
210
210
  console.log(chalk_1.default.bold('\n → Upgrade: ') + chalk_1.default.cyan('https://chimerai.dev/enterprise-pro'));
211
211
  console.log(chalk_1.default.bold(' → Contact: ') + chalk_1.default.cyan('sales@chimerai.dev\n'));
212
- throw new Error(`"${component}" requires an Enterprise Pro license.`);
212
+ process.exit(1);
213
213
  }
214
214
  else {
215
215
  // Free-Kunde will Enterprise- oder Enterprise-Pro-Feature
@@ -227,9 +227,7 @@ function assertComponentAccess(component) {
227
227
  console.log(chalk_1.default.bold(' → Enterprise Pro: ') + chalk_1.default.cyan('https://chimerai.dev/enterprise-pro'));
228
228
  console.log(chalk_1.default.bold(' → Activate: ') + chalk_1.default.white('chimerai activate <LICENSE-KEY>'));
229
229
  console.log(chalk_1.default.bold(' → Contact: ') + chalk_1.default.cyan('sales@chimerai.dev\n'));
230
- throw new Error(isEntPro
231
- ? `"${component}" requires an Enterprise Pro license.`
232
- : `"${component}" requires an Enterprise license.`);
230
+ process.exit(1);
233
231
  }
234
232
  }
235
233
  // ─── License Info (für chimerai license) ─────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chimerai/cli",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
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": {