team-toon-tack 3.6.0 → 3.6.3

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.
@@ -23,19 +23,18 @@ export async function initLinear(options, paths) {
23
23
  // Mirror into LINEAR_API_KEY so getLinearClient() picks it up regardless
24
24
  // of which env var name the user selected.
25
25
  process.env.LINEAR_API_KEY = apiKey;
26
- // Offer to persist to .ttt/.env. Default yes for freshly entered keys,
27
- // no for keys already in the system env (user already has them set).
26
+ // Offer to persist to project-root .env so dotenv-aware tools (and future
27
+ // ttt runs) can reuse it without relying on the user's shell profile.
28
+ console.log("\nšŸ” Local .env file:");
29
+ console.log(` Path: ${paths.envPath}${fromSystemEnv ? " (you already have this key in your shell — this just pins it per-project)" : ""}`);
28
30
  let saveToEnvFile = false;
29
31
  if (options.interactive) {
30
32
  saveToEnvFile = await confirm({
31
- message: fromSystemEnv
32
- ? `Save ${envName} to ${paths.envPath} for this project?`
33
- : `Save ${envName} to ${paths.envPath}?`,
34
- default: !fromSystemEnv,
33
+ message: `Write ${envName} to ${paths.envPath}?`,
34
+ default: true,
35
35
  });
36
36
  }
37
37
  if (saveToEnvFile) {
38
- await fs.mkdir(paths.baseDir, { recursive: true });
39
38
  await writeDotEnv(paths.envPath, { [envName]: apiKey });
40
39
  console.log(` āœ“ Wrote ${envName} to ${paths.envPath}`);
41
40
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Linear-specific prompt functions for init
3
3
  */
4
- import { checkbox, input, password, select } from "@inquirer/prompts";
4
+ import { checkbox, confirm, input, password, select } from "@inquirer/prompts";
5
5
  import { LinearClient } from "@linear/sdk";
6
6
  import { getDefaultStatusTransitions, } from "../config-builder.js";
7
7
  import { getFirstTodoStatus } from "../status-helpers.js";
@@ -87,12 +87,19 @@ export async function promptForApiKey(options) {
87
87
  if (chosen !== "__new__") {
88
88
  const picked = valid.find((c) => c.envName === chosen);
89
89
  if (picked) {
90
- return {
91
- apiKey: picked.apiKey,
92
- envName: picked.envName,
93
- fromSystemEnv: true,
94
- organizationName: picked.orgName,
95
- };
90
+ const useExisting = await confirm({
91
+ message: `Use the existing key from ${picked.envName}? (no = enter a new key instead)`,
92
+ default: true,
93
+ });
94
+ if (useExisting) {
95
+ return {
96
+ apiKey: picked.apiKey,
97
+ envName: picked.envName,
98
+ fromSystemEnv: true,
99
+ organizationName: picked.orgName,
100
+ };
101
+ }
102
+ // fall through to password prompt
96
103
  }
97
104
  }
98
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "team-toon-tack",
3
- "version": "3.6.0",
3
+ "version": "3.6.3",
4
4
  "description": "Linear & Trello task sync & management CLI with TOON format",
5
5
  "type": "module",
6
6
  "bin": {