@eventmodelers/node-kit 0.0.7 → 0.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/node-kit",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Real-time Claude agent that reacts to slice:changed events on an Eventmodelers board",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -123,6 +123,12 @@ program
123
123
  const configPath = join(configDir, 'config.json');
124
124
  mkdirSync(configDir, { recursive: true });
125
125
 
126
+ const hasExisting = await prompt('\nDo you have an existing config from app.eventmodelers.de/account? (y/n): ');
127
+ if (hasExisting.toLowerCase() === 'y' || hasExisting.toLowerCase() === 'yes') {
128
+ console.log(`\n Paste your config into:\n\n ${configPath}\n\n Then re-run this installer.\n`);
129
+ process.exit(0);
130
+ }
131
+
126
132
  let config = {};
127
133
  if (existsSync(configPath)) {
128
134
  try {
@@ -6,8 +6,19 @@ import { randomUUID } from 'crypto';
6
6
 
7
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
8
 
9
+ function findConfigPath(startDir) {
10
+ let dir = startDir;
11
+ while (true) {
12
+ const candidate = join(dir, '.eventmodelers', 'config.json');
13
+ if (existsSync(candidate)) return candidate;
14
+ const parent = dirname(dir);
15
+ if (parent === dir) throw new Error('No .eventmodelers/config.json found in current directory or any parent directory');
16
+ dir = parent;
17
+ }
18
+ }
19
+
9
20
  function loadLocalConfig() {
10
- const configPath = resolve(__dirname, '../../.eventmodelers/config.json');
21
+ const configPath = findConfigPath(process.cwd());
11
22
  const raw = readFileSync(configPath, 'utf-8');
12
23
  const cfg = JSON.parse(raw);
13
24