@lotics/cli 0.96.3 → 0.96.4
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/README.md +2 -0
- package/dist/src/cli.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,6 +72,8 @@ lotics org use acme # switch active org by name (or org id)
|
|
|
72
72
|
lotics org use "Acme Corp" # names are case-insensitive
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
The org **id** is the identity; the name is a label cached when the key was saved. Rename an org in the app and the cached label goes stale — the old name still works, the new one matches nothing — until `lotics auth whoami` refreshes it. A name matching two saved orgs is refused rather than guessed; use the id.
|
|
76
|
+
|
|
75
77
|
### Working in parallel (worktrees)
|
|
76
78
|
|
|
77
79
|
Pin a directory to its own org/workspace so a global `org use` elsewhere never disturbs it. The pin is a pointer — the key still comes from the global store, so there's nothing to paste:
|
package/dist/src/cli.js
CHANGED
|
@@ -91630,6 +91630,11 @@ async function main() {
|
|
|
91630
91630
|
const info = await client2.whoami();
|
|
91631
91631
|
const existing = loadGlobalConfig() ?? {};
|
|
91632
91632
|
saveGlobalConfig({ ...existing, email: info.email });
|
|
91633
|
+
const cached2 = existing.profiles?.[info.organization_id];
|
|
91634
|
+
if (cached2 && cached2.org_name !== info.organization_name) {
|
|
91635
|
+
upsertProfile(info.organization_id, { api_key: cached2.api_key, org_name: info.organization_name });
|
|
91636
|
+
console.error(`Renamed since this key was saved: "${cached2.org_name}" \u2192 "${info.organization_name}" (updated locally)`);
|
|
91637
|
+
}
|
|
91633
91638
|
const viewAs = flags.viewAs ?? process.env.LOTICS_VIEW_AS;
|
|
91634
91639
|
if (flags.json) {
|
|
91635
91640
|
console.log(JSON.stringify({ ...info, workspace_id: ctx2.workspaceId ?? null, source: ctx2.source, view_as: viewAs ?? null }, null, 2));
|