@xcelera/cli 2.2.0 → 2.2.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.
- package/dist/action.js +7 -2
- package/dist/action.js.map +1 -1
- package/dist/cli.js +7 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/action.js
CHANGED
|
@@ -36539,14 +36539,15 @@ async function isGitRepository() {
|
|
|
36539
36539
|
}
|
|
36540
36540
|
async function getCommit(hash = 'HEAD') {
|
|
36541
36541
|
// format: %H: commit hash, %s: subject, %an: author name, %ae: author email, %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
|
|
36546
|
+
'--format=%H%x00%s%x00%an%x00%ae%x00%ai'
|
|
36546
36547
|
]);
|
|
36547
36548
|
const [resolvedHash, message, author_name, author_email, date] = commit
|
|
36548
36549
|
.trim()
|
|
36549
|
-
.split('
|
|
36550
|
+
.split('\0');
|
|
36550
36551
|
if (!resolvedHash) {
|
|
36551
36552
|
throw new Error(`No commit found for ${hash}`);
|
|
36552
36553
|
}
|
|
@@ -36611,6 +36612,10 @@ async function runAuditCommand(url, token) {
|
|
|
36611
36612
|
catch (error) {
|
|
36612
36613
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
36613
36614
|
errors.push(`❌ ${errorMessage}`);
|
|
36615
|
+
if (error instanceof Error && error.stack) {
|
|
36616
|
+
errors.push('');
|
|
36617
|
+
errors.push(error.stack);
|
|
36618
|
+
}
|
|
36614
36619
|
return { exitCode: 1, output, errors };
|
|
36615
36620
|
}
|
|
36616
36621
|
}
|