kodingo-cli 1.0.18 → 1.0.20

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.
@@ -253,7 +253,9 @@ function registerInitCommand(program) {
253
253
  // ── Save config ──────────────────────────────────────────────────────
254
254
  const repoRoot = findRepoRoot(process.cwd());
255
255
  const apiUrl = API_BASE;
256
- (0, persistence_config_1.writeConfig)({ mode: "cloud", apiUrl, token: selectedProject.token });
256
+ // preserve existing workspaces, never overwrite global token
257
+ const existingConfig = (0, persistence_config_1.readConfig)();
258
+ (0, persistence_config_1.writeConfig)({ ...existingConfig, mode: "cloud", apiUrl });
257
259
  (0, persistence_config_1.writeWorkspaceConfig)(repoRoot, { mode: "cloud", apiUrl, token: selectedProject.token });
258
260
  ensureGitignoreEntry(repoRoot, ".kortex/");
259
261
  console.log(`✔ Connected. Token saved to ${persistence_config_1.CONFIG_PATH}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kodingo-cli",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Kodingo CLI",
5
5
  "license": "MIT",
6
6
  "private": false,