ikanban 0.4.8 → 0.4.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.
Files changed (2) hide show
  1. package/lib/roadmap.js +5 -1
  2. package/package.json +1 -1
package/lib/roadmap.js CHANGED
@@ -84,9 +84,13 @@ function localSettings(dir) {
84
84
 
85
85
  function connection(opts, file) {
86
86
  const s = localSettings(path.dirname(file));
87
+ // IKA-2467: a key goes with the server it came with. When settings-local.json names the server,
88
+ // its api_key wins over a shell VIBE_API_TOKEN, which may be another server's key (a laptop with
89
+ // a prod key in its shell sent it to dev). --token always wins.
90
+ const serverFromFile = !opts["base-url"] && !process.env.IKANBAN_BASE_URL && Boolean(s.api_url);
87
91
  return {
88
92
  base: apiOrigin(opts["base-url"] || process.env.IKANBAN_BASE_URL || s.api_url || "https://api.i-kanban.com"),
89
- token: opts.token || process.env.VIBE_API_TOKEN || s.api_key || "",
93
+ token: opts.token || (serverFromFile ? s.api_key || process.env.VIBE_API_TOKEN : process.env.VIBE_API_TOKEN || s.api_key) || "",
90
94
  team: process.env.IKANBAN_TEAM_ID || s.team || "",
91
95
  project: s.project,
92
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikanban",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "iKanban CLI: AI and security scans of your own repo, with results filed into iKanban",
5
5
  "bin": { "ikanban": "bin/ikanban.js" },
6
6
  "files": ["bin", "lib", "hooks", "scanners", "README.md", "LICENSE.md"],