chatroom-cli 1.38.8 → 1.39.0
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/index.js +21 -13
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74914,7 +74914,7 @@ async function getPRDiffByNumber(cwd, prNumber) {
|
|
|
74914
74914
|
return { status: "available", content: raw, truncated: false };
|
|
74915
74915
|
}
|
|
74916
74916
|
async function getRecentCommits(workingDir, count3 = 20, skip = 0) {
|
|
74917
|
-
const format4 = "%H%
|
|
74917
|
+
const format4 = "%H%x1f%h%x1f%s%x1f%b%x1f%an%x1f%aI%x1e";
|
|
74918
74918
|
const skipArg = skip > 0 ? ` --skip=${skip}` : "";
|
|
74919
74919
|
const result = await runGit(`log -${count3}${skipArg} --format=${format4}`, workingDir);
|
|
74920
74920
|
if ("error" in result) {
|
|
@@ -74924,16 +74924,16 @@ async function getRecentCommits(workingDir, count3 = 20, skip = 0) {
|
|
|
74924
74924
|
if (!output)
|
|
74925
74925
|
return [];
|
|
74926
74926
|
const commits = [];
|
|
74927
|
-
for (const
|
|
74928
|
-
|
|
74929
|
-
const trimmed = line.trim();
|
|
74927
|
+
for (const record of output.split("\x1E")) {
|
|
74928
|
+
const trimmed = record.trim();
|
|
74930
74929
|
if (!trimmed)
|
|
74931
74930
|
continue;
|
|
74932
|
-
const parts2 = trimmed.split("\
|
|
74933
|
-
if (parts2.length !==
|
|
74931
|
+
const parts2 = trimmed.split("\x1F");
|
|
74932
|
+
if (parts2.length !== 6)
|
|
74934
74933
|
continue;
|
|
74935
|
-
const [sha, shortSha, message, author, date] = parts2;
|
|
74936
|
-
|
|
74934
|
+
const [sha, shortSha, message, rawBody, author, date] = parts2;
|
|
74935
|
+
const body = rawBody.trim();
|
|
74936
|
+
commits.push({ sha, shortSha, message, ...body ? { body } : {}, author, date });
|
|
74937
74937
|
}
|
|
74938
74938
|
return commits;
|
|
74939
74939
|
}
|
|
@@ -74958,17 +74958,19 @@ async function getCommitDetail(workingDir, sha) {
|
|
|
74958
74958
|
return { status: "available", content: raw, truncated: false };
|
|
74959
74959
|
}
|
|
74960
74960
|
async function getCommitMetadata(workingDir, sha) {
|
|
74961
|
-
const format4 = "%s%
|
|
74961
|
+
const format4 = "%s%x1f%b%x1f%an%x1f%aI";
|
|
74962
74962
|
const result = await runGit(`log -1 --format=${format4} ${sha}`, workingDir);
|
|
74963
74963
|
if ("error" in result)
|
|
74964
74964
|
return null;
|
|
74965
74965
|
const output = result.stdout.trim();
|
|
74966
74966
|
if (!output)
|
|
74967
74967
|
return null;
|
|
74968
|
-
const parts2 = output.split("\
|
|
74969
|
-
if (parts2.length !==
|
|
74968
|
+
const parts2 = output.split("\x1F");
|
|
74969
|
+
if (parts2.length !== 4)
|
|
74970
74970
|
return null;
|
|
74971
|
-
|
|
74971
|
+
const [message, rawBody, author, date] = parts2;
|
|
74972
|
+
const body = rawBody.trim();
|
|
74973
|
+
return { message, ...body ? { body } : {}, author, date };
|
|
74972
74974
|
}
|
|
74973
74975
|
async function runCommand(command, cwd) {
|
|
74974
74976
|
try {
|
|
@@ -75367,6 +75369,7 @@ async function processCommitDetail(ctx, req) {
|
|
|
75367
75369
|
sha: req.sha,
|
|
75368
75370
|
status: "not_found",
|
|
75369
75371
|
message: metadata?.message,
|
|
75372
|
+
body: metadata?.body,
|
|
75370
75373
|
author: metadata?.author,
|
|
75371
75374
|
date: metadata?.date
|
|
75372
75375
|
});
|
|
@@ -75381,6 +75384,7 @@ async function processCommitDetail(ctx, req) {
|
|
|
75381
75384
|
status: "error",
|
|
75382
75385
|
errorMessage: result.message,
|
|
75383
75386
|
message: metadata?.message,
|
|
75387
|
+
body: metadata?.body,
|
|
75384
75388
|
author: metadata?.author,
|
|
75385
75389
|
date: metadata?.date
|
|
75386
75390
|
});
|
|
@@ -75398,6 +75402,7 @@ async function processCommitDetail(ctx, req) {
|
|
|
75398
75402
|
data: { compression: "gzip", content: diffContentCompressed },
|
|
75399
75403
|
truncated: result.truncated,
|
|
75400
75404
|
message: metadata?.message,
|
|
75405
|
+
body: metadata?.body,
|
|
75401
75406
|
author: metadata?.author,
|
|
75402
75407
|
date: metadata?.date,
|
|
75403
75408
|
diffStat
|
|
@@ -75758,6 +75763,7 @@ async function prefetchSingleCommit(ctx, workingDir, sha, commits) {
|
|
|
75758
75763
|
sha,
|
|
75759
75764
|
status: "not_found",
|
|
75760
75765
|
message: metadata?.message,
|
|
75766
|
+
body: metadata?.body,
|
|
75761
75767
|
author: metadata?.author,
|
|
75762
75768
|
date: metadata?.date
|
|
75763
75769
|
});
|
|
@@ -75772,6 +75778,7 @@ async function prefetchSingleCommit(ctx, workingDir, sha, commits) {
|
|
|
75772
75778
|
status: "error",
|
|
75773
75779
|
errorMessage: result.message,
|
|
75774
75780
|
message: metadata?.message,
|
|
75781
|
+
body: metadata?.body,
|
|
75775
75782
|
author: metadata?.author,
|
|
75776
75783
|
date: metadata?.date
|
|
75777
75784
|
});
|
|
@@ -75790,6 +75797,7 @@ async function prefetchSingleCommit(ctx, workingDir, sha, commits) {
|
|
|
75790
75797
|
data: { compression: "gzip", content: diffContentCompressed },
|
|
75791
75798
|
truncated: result.truncated,
|
|
75792
75799
|
message: metadata?.message,
|
|
75800
|
+
body: metadata?.body,
|
|
75793
75801
|
author: metadata?.author,
|
|
75794
75802
|
date: metadata?.date,
|
|
75795
75803
|
diffStat
|
|
@@ -79331,5 +79339,5 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
79331
79339
|
});
|
|
79332
79340
|
program2.parse();
|
|
79333
79341
|
|
|
79334
|
-
//# debugId=
|
|
79342
|
+
//# debugId=F3CC073413306D7A64756E2164756E21
|
|
79335
79343
|
//# sourceMappingURL=index.js.map
|