@hatchway/cli 0.50.61 → 0.50.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchway/cli",
3
- "version": "0.50.61",
3
+ "version": "0.50.63",
4
4
  "description": "Hatchway CLI - Build AI-powered apps with Claude. Just run: npx @hatchway/cli runner",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Banner-DL1Fpz_g.js","sources":["../../src/cli/utils/version-info.ts","../../src/cli/tui/components/Banner.tsx"],"sourcesContent":["/**\n * Version and git commit info utilities\n */\n\nimport { execSync } from 'node:child_process';\nimport { readFileSync, existsSync } from 'node:fs';\nimport { join, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Find the package root directory (apps/runner).\n * Works in both development (src/cli/utils/) and production (dist/cli/utils/) modes.\n */\nfunction findPackageRoot(): string {\n // Try multiple possible locations\n const possiblePaths = [\n // Development: src/cli/utils/ -> apps/runner (3 levels up)\n join(__dirname, '..', '..', '..'),\n // Production from dist/cli/utils/: -> apps/runner (3 levels up, same structure)\n join(__dirname, '..', '..', '..'),\n ];\n \n for (const path of possiblePaths) {\n const packageJsonPath = join(path, 'package.json');\n if (existsSync(packageJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n // Verify this is the runner package\n if (pkg.name === '@hatchway/cli') {\n return path;\n }\n } catch {\n // Continue to next path\n }\n }\n }\n \n // Fallback to the standard path\n return join(__dirname, '..', '..', '..');\n}\n\n// Cache the package root\nconst packageRoot = findPackageRoot();\n\n/**\n * Get the package version from package.json\n */\nexport function getPackageVersion(): string {\n try {\n const packageJsonPath = join(packageRoot, 'package.json');\n if (existsSync(packageJsonPath)) {\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n return packageJson.version || '0.0.0';\n }\n } catch {\n // Ignore errors\n }\n return '0.0.0';\n}\n\n/**\n * Get the short git commit hash\n */\nexport function getGitCommit(): string | null {\n try {\n // Try to get commit from git command\n const commit = execSync('git rev-parse --short HEAD', {\n cwd: packageRoot,\n encoding: 'utf-8',\n stdio: ['pipe', 'pipe', 'pipe'],\n }).trim();\n return commit || null;\n } catch {\n // Git not available or not a git repo\n return null;\n }\n}\n\n/**\n * Get combined version string with commit\n * Returns \"v0.19.1 (abc1234)\" or just \"v0.19.1\" if no commit\n */\nexport function getVersionString(): string {\n const version = getPackageVersion();\n const commit = getGitCommit();\n \n if (commit) {\n return `v${version} (${commit})`;\n }\n return `v${version}`;\n}\n\n/**\n * Version info object\n */\nexport interface VersionInfo {\n version: string;\n commit: string | null;\n display: string;\n}\n\n/**\n * Get all version info\n */\nexport function getVersionInfo(): VersionInfo {\n const version = getPackageVersion();\n const commit = getGitCommit();\n \n return {\n version,\n commit,\n display: commit ? `v${version} (${commit})` : `v${version}`,\n };\n}\n","import { Box, Text } from 'ink';\nimport { colors } from '../theme.js';\n\n/**\n * ASCII art banner component - centered with cyan/purple gradient\n * Each line is padded to exactly the same width for perfect alignment\n */\nexport function Banner() {\n // Full banner lines - HATCH in cyan, WAY in purple\n // All lines padded to same total width for consistent centering\n const lines = [\n { hatch: '██╗ ██╗ █████╗ ████████╗ ██████╗██╗ ██╗', way: '██╗ ██╗ █████╗ ██╗ ██╗' },\n { hatch: '██║ ██║██╔══██╗╚══██╔══╝██╔════╝██║ ██║', way: '██║ ██║██╔══██╗╚██╗ ██╔╝' },\n { hatch: '███████║███████║ ██║ ██║ ███████║', way: '██║ █╗ ██║███████║ ╚████╔╝ ' },\n { hatch: '██╔══██║██╔══██║ ██║ ██║ ██╔══██║', way: '██║███╗██║██╔══██║ ╚██╔╝ ' },\n { hatch: '██║ ██║██║ ██║ ██║ ╚██████╗██║ ██║', way: '╚███╔███╔╝██║ ██║ ██║ ' },\n { hatch: '╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝', way: ' ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ' },\n ];\n\n return (\n <Box flexDirection=\"column\" alignItems=\"center\">\n {lines.map((line, index) => (\n <Box key={index}>\n <Text color={colors.cyan}>{line.hatch}</Text>\n <Text color={colors.brightPurple}>{line.way}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n"],"names":["__filename","__dirname","_jsx","_jsxs"],"mappings":";;;;;;;;;;;AAAA;;AAEG;AAOH,MAAMA,YAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACjD,MAAMC,WAAS,GAAG,OAAO,CAACD,YAAU,CAAC;AAErC;;;AAGG;AACH,SAAS,eAAe,GAAA;;AAEtB,IAAA,MAAM,aAAa,GAAG;;QAEpB,IAAI,CAACC,WAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;;QAEjC,IAAI,CAACA,WAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;KAClC;AAED,IAAA,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE;QAChC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC;AAClD,QAAA,IAAI,UAAU,CAAC,eAAe,CAAC,EAAE;AAC/B,YAAA,IAAI;AACF,gBAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;;AAE9D,gBAAA,IAAI,GAAG,CAAC,IAAI,KAAK,eAAe,EAAE;AAChC,oBAAA,OAAO,IAAI;gBACb;YACF;AAAE,YAAA,MAAM;;YAER;QACF;IACF;;IAGA,OAAO,IAAI,CAACA,WAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAC1C;AAEA;AACA,MAAM,WAAW,GAAG,eAAe,EAAE;AAErC;;AAEG;SACa,iBAAiB,G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