@kozojs/cli 0.1.17 → 0.1.18

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1495,14 +1495,9 @@ ${auth ? "JWT_SECRET=change-me-to-a-random-secret-at-least-32-chars\n" : ""}`;
1495
1495
  exclude: ["node_modules", "dist"]
1496
1496
  };
1497
1497
  await import_fs_extra.default.writeJSON(import_node_path.default.join(apiDir, "tsconfig.json"), tsconfig, { spaces: 2 });
1498
- const dbImport = hasDb ? `import { createDb } from './db/index.js';
1499
- ` : "";
1500
1498
  const authImport = auth ? `import { authenticateJWT } from '@kozojs/auth';
1501
1499
  ` : "";
1502
- const servicesSetup = hasDb ? `
1503
- const db = await createDb();
1504
- const services = { db };
1505
- ` : "\nconst services = {};\n";
1500
+ const servicesSetup = "\nconst services = {};\n";
1506
1501
  const authMiddleware = auth ? `
1507
1502
  // Protect resource routes with JWT (auth login route remains public)
1508
1503
  const JWT_SECRET = process.env.JWT_SECRET || 'change-me';
@@ -1512,7 +1507,7 @@ app.use('*', authenticateJWT(JWT_SECRET, { prefix: '/api/tasks' }));
1512
1507
  ` : "";
1513
1508
  await import_fs_extra.default.writeFile(import_node_path.default.join(apiDir, "src", "index.ts"), `import 'dotenv/config';
1514
1509
  import { createKozo } from '@kozojs/core';
1515
- ${dbImport}${authImport}import { registerRoutes } from './routes/index.js';
1510
+ ${authImport}import { registerRoutes } from './routes/index.js';
1516
1511
  ${servicesSetup}
1517
1512
  const app = createKozo({ port: 3000, services });
1518
1513
  ${authMiddleware}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kozojs/cli",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "CLI to scaffold new Kozo Framework projects - The next-gen TypeScript Backend Framework",
5
5
  "bin": {
6
6
  "create-kozo": "./lib/index.js",