kodingo-cli 1.0.19 → 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.
- package/dist/commands/init.js +2 -2
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -253,9 +253,9 @@ function registerInitCommand(program) {
|
|
|
253
253
|
// ── Save config ──────────────────────────────────────────────────────
|
|
254
254
|
const repoRoot = findRepoRoot(process.cwd());
|
|
255
255
|
const apiUrl = API_BASE;
|
|
256
|
-
// preserve existing workspaces
|
|
256
|
+
// preserve existing workspaces, never overwrite global token
|
|
257
257
|
const existingConfig = (0, persistence_config_1.readConfig)();
|
|
258
|
-
(0, persistence_config_1.writeConfig)({ ...existingConfig, mode: "cloud", apiUrl
|
|
258
|
+
(0, persistence_config_1.writeConfig)({ ...existingConfig, mode: "cloud", apiUrl });
|
|
259
259
|
(0, persistence_config_1.writeWorkspaceConfig)(repoRoot, { mode: "cloud", apiUrl, token: selectedProject.token });
|
|
260
260
|
ensureGitignoreEntry(repoRoot, ".kortex/");
|
|
261
261
|
console.log(`✔ Connected. Token saved to ${persistence_config_1.CONFIG_PATH}`);
|