threadlines 0.1.25 → 0.1.27

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.
@@ -49,16 +49,24 @@ const context_2 = require("../git/context");
49
49
  const fs = __importStar(require("fs"));
50
50
  const path = __importStar(require("path"));
51
51
  const chalk_1 = __importDefault(require("chalk"));
52
+ // Get CLI version from package.json
53
+ const packageJsonPath = path.join(__dirname, '../../package.json');
54
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
55
+ const CLI_VERSION = packageJson.version;
52
56
  async function checkCommand(options) {
53
57
  const repoRoot = process.cwd();
54
- console.log(chalk_1.default.blue('🔍 Threadline: Checking code against your threadlines...\n'));
58
+ console.log(chalk_1.default.blue(`🔍 Threadline CLI v${CLI_VERSION}: Checking code against your threadlines...\n`));
55
59
  // Pre-flight check: Validate ALL required environment variables at once
56
60
  const apiKey = (0, config_1.getThreadlineApiKey)();
57
61
  const account = (0, config_1.getThreadlineAccount)();
62
+ // Debug: Show what we got (masked for security)
63
+ console.log(chalk_1.default.gray(` [Debug] THREADLINE_API_KEY: ${apiKey ? `"${apiKey.substring(0, 4)}..."` : 'undefined'}`));
64
+ console.log(chalk_1.default.gray(` [Debug] THREADLINE_ACCOUNT: ${account ? `"${account.substring(0, 4)}..."` : 'undefined'}`));
58
65
  const missingVars = [];
59
- if (!apiKey)
66
+ // Check for undefined, empty string, or literal unexpanded variable
67
+ if (!apiKey || apiKey.startsWith('$'))
60
68
  missingVars.push('THREADLINE_API_KEY');
61
- if (!account)
69
+ if (!account || account.startsWith('$'))
62
70
  missingVars.push('THREADLINE_ACCOUNT');
63
71
  if (missingVars.length > 0) {
64
72
  console.error(chalk_1.default.red('❌ Error: Missing required environment variables:'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "threadlines",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Threadline CLI - AI-powered linter based on your natural language documentation",
5
5
  "main": "dist/index.js",
6
6
  "bin": {