@fractary/faber-cli 1.4.0 → 1.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAehD;AAwYD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAM3C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BpC;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAehD;AA6ZD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAM3C"}
@@ -102,27 +102,46 @@ async function runSetup(options) {
102
102
  }
103
103
  process.exit(1);
104
104
  }
105
- console.log('Opening GitHub App creation page in your browser...\n');
106
- // Open HTML file in default browser (safe - we control the path)
105
+ // Convert WSL path to Windows path if needed
106
+ let displayPath = htmlPath;
107
+ if (isWsl && htmlPath.startsWith('/mnt/')) {
108
+ // Convert /mnt/c/... to C:\...
109
+ const match = htmlPath.match(/^\/mnt\/([a-z])(\/.*)/);
110
+ if (match) {
111
+ const driveLetter = match[1].toUpperCase();
112
+ const windowsPath = match[2].replace(/\//g, '\\');
113
+ displayPath = `${driveLetter}:${windowsPath}`;
114
+ }
115
+ }
116
+ console.log(chalk.bold('šŸ“„ Manifest file created!\n'));
117
+ console.log(chalk.cyan('Open this file in your browser (copy the full path):\n'));
118
+ console.log(chalk.bold(` ${displayPath}\n`));
119
+ if (isWsl) {
120
+ console.log(chalk.gray('šŸ’” Tip: From Windows, you can also open it with:'));
121
+ console.log(chalk.gray(` - Press Win+R, paste the path above, press Enter`));
122
+ console.log(chalk.gray(` - Or open File Explorer and paste the path\n`));
123
+ }
124
+ // Try to open automatically, but don't block if it fails
107
125
  const { execFile } = await import('child_process');
108
126
  const { promisify } = await import('util');
109
127
  const execFileAsync = promisify(execFile);
110
128
  try {
111
129
  if (process.platform === 'darwin') {
112
130
  await execFileAsync('open', [htmlPath]);
131
+ console.log(chalk.gray('(Opened in default browser)\n'));
113
132
  }
114
133
  else if (process.platform === 'win32') {
115
- // Windows requires cmd /c start for file associations
116
134
  await execFileAsync('cmd', ['/c', 'start', '', htmlPath]);
135
+ console.log(chalk.gray('(Opened in default browser)\n'));
117
136
  }
118
- else {
119
- // Linux/Unix
137
+ else if (!isWsl) {
138
+ // Only try xdg-open on native Linux, not WSL
120
139
  await execFileAsync('xdg-open', [htmlPath]);
140
+ console.log(chalk.gray('(Opened in default browser)\n'));
121
141
  }
122
142
  }
123
143
  catch (error) {
124
- console.log(chalk.yellow('\nāš ļø Could not open browser automatically.'));
125
- console.log(chalk.yellow(`Please open this file manually:\n ${htmlPath}\n`));
144
+ // Silently fail - we already printed the path above
126
145
  }
127
146
  console.log(chalk.bold('In your browser:'));
128
147
  console.log(' 1. Review the app permissions');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {