@xcelera/cli 2.2.0 → 2.2.2

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/dist/action.js CHANGED
@@ -36538,23 +36538,21 @@ async function isGitRepository() {
36538
36538
  return simpleGit().checkIsRepo();
36539
36539
  }
36540
36540
  async function getCommit(hash = 'HEAD') {
36541
- // format: %H: commit hash, %s: subject, %an: author name, %ae: author email, %ai: author date
36541
+ // format: %H: commit hash, %s: subject, %an: author name, %ai: author date
36542
+ // Use null byte (%x00) as delimiter - cannot appear in commit data
36542
36543
  const commit = await simpleGit().show([
36543
36544
  hash,
36544
36545
  '--no-patch',
36545
- '--format=%H|%s|%an|%ae|%ai'
36546
+ '--format=%H%x00%s%x00%an%x00%ai'
36546
36547
  ]);
36547
- const [resolvedHash, message, author_name, author_email, date] = commit
36548
- .trim()
36549
- .split('|');
36548
+ const [resolvedHash, message, author_name, date] = commit.trim().split('\0');
36550
36549
  if (!resolvedHash) {
36551
36550
  throw new Error(`No commit found for ${hash}`);
36552
36551
  }
36553
36552
  return {
36554
36553
  hash: resolvedHash,
36555
36554
  message: message,
36556
- author: author_name || 'Unknown',
36557
- email: author_email || '',
36555
+ author: author_name || 'Unknown Author',
36558
36556
  date: date ? new Date(date).toISOString() : new Date().toISOString()
36559
36557
  };
36560
36558
  }
@@ -36611,6 +36609,10 @@ async function runAuditCommand(url, token) {
36611
36609
  catch (error) {
36612
36610
  const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
36613
36611
  errors.push(`❌ ${errorMessage}`);
36612
+ if (error instanceof Error && error.stack) {
36613
+ errors.push('');
36614
+ errors.push(error.stack);
36615
+ }
36614
36616
  return { exitCode: 1, output, errors };
36615
36617
  }
36616
36618
  }