kachow 0.1.0 → 0.1.1
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/_server/dist/server.js +5 -2
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/_server/dist/server.js
CHANGED
|
@@ -18,8 +18,11 @@ const PORT = Number(process.env.PORT) || 3000;
|
|
|
18
18
|
// Initialise DB (creates file + runs migrations) before accepting traffic
|
|
19
19
|
(0, index_js_1.getDb)();
|
|
20
20
|
// Pre-fill with demo data if the DB is empty (first-run experience)
|
|
21
|
-
|
|
22
|
-
(
|
|
21
|
+
// Skip when CLI launches server — a real repo scan is coming
|
|
22
|
+
if (process.env.SKIP_DEMO_SEED !== 'true') {
|
|
23
|
+
const defaultTeamId = process.env.DEFAULT_TEAM_ID;
|
|
24
|
+
(0, demoSeed_js_1.seedDemoData)(defaultTeamId);
|
|
25
|
+
}
|
|
23
26
|
// Start background BullMQ worker
|
|
24
27
|
(0, ingestWorker_js_1.startIngestWorker)();
|
|
25
28
|
const server = app_js_1.app.listen(PORT, () => {
|
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ function getServerDir() {
|
|
|
76
76
|
return mono; // will fail later with a helpful message
|
|
77
77
|
}
|
|
78
78
|
const program = new commander_1.Command();
|
|
79
|
-
program.name('kachow').description('⚡ KA-CHOW — Living knowledge graph').version('0.1.
|
|
79
|
+
program.name('kachow').description('⚡ KA-CHOW — Living knowledge graph').version('0.1.1');
|
|
80
80
|
// ── Helpers ───────────────────────────────────────────────────────────────────
|
|
81
81
|
function apiGet(port, apiPath) {
|
|
82
82
|
return new Promise((resolve, reject) => {
|
|
@@ -254,6 +254,8 @@ program.command('init')
|
|
|
254
254
|
...process.env,
|
|
255
255
|
PORT: String(port),
|
|
256
256
|
DB_PATH: path_1.default.join(dataDir, 'kachow.db'),
|
|
257
|
+
SKIP_DEMO_SEED: 'true',
|
|
258
|
+
DISABLE_REDIS: 'true',
|
|
257
259
|
};
|
|
258
260
|
if (fs_1.default.existsSync(envPath)) {
|
|
259
261
|
const envContent = fs_1.default.readFileSync(envPath, 'utf-8');
|
|
@@ -369,6 +371,7 @@ program.command('serve')
|
|
|
369
371
|
dotenv_1.default.config({ path: envPath, override: true });
|
|
370
372
|
process.env.PORT = String(port);
|
|
371
373
|
process.env.DB_PATH = process.env.DB_PATH ?? path_1.default.join(dataDir, 'kachow.db');
|
|
374
|
+
process.env.DISABLE_REDIS = process.env.DISABLE_REDIS ?? 'true';
|
|
372
375
|
console.log(`🚀 KA-CHOW server on :${port}`);
|
|
373
376
|
const serverPkg = getServerDir();
|
|
374
377
|
const entry = path_1.default.join(serverPkg, 'dist/server.js');
|
package/package.json
CHANGED