git-fish-log 1.0.4 โ 1.0.5
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 +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -949,6 +949,16 @@ function getTagCriticsFromDays(days) {
|
|
|
949
949
|
|
|
950
950
|
// src/index.ts
|
|
951
951
|
var program = new Command();
|
|
952
|
+
function getCliVersion() {
|
|
953
|
+
try {
|
|
954
|
+
const packageJson = JSON.parse(
|
|
955
|
+
fs2.readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
|
956
|
+
);
|
|
957
|
+
return packageJson.version || "0.0.0";
|
|
958
|
+
} catch {
|
|
959
|
+
return "0.0.0";
|
|
960
|
+
}
|
|
961
|
+
}
|
|
952
962
|
var SPINNER_FRAMES = ["\u{1F41F} ", " \u{1F420} ", " \u{1F421} ", " \u{1F988} ", " \u{1F419} ", " \u{1F991} "];
|
|
953
963
|
function showLoading(message) {
|
|
954
964
|
let frameIdx = 0;
|
|
@@ -1456,7 +1466,7 @@ async function runGhostReport(weeksAgo, source) {
|
|
|
1456
1466
|
console.log(chalk.red("\u547D\u662F\u81EA\u5DF1\u7684\uFF0C\u5927\u798F\u62A5\u7559\u7ED9\u8001\u677F\u5427\uFF01\u8D76\u7D27\u7761\u89C9\uFF0C\u4FDD\u547D\u8981\u7D27\uFF01\n"));
|
|
1457
1467
|
}
|
|
1458
1468
|
}
|
|
1459
|
-
program.name("fish").description("\u{1F41F} Git \u6478\u9C7C & \u7206\u809D\u5206\u6790\u5668 CLI").version(
|
|
1469
|
+
program.name("fish").description("\u{1F41F} Git \u6478\u9C7C & \u7206\u809D\u5206\u6790\u5668 CLI").version(getCliVersion()).option("-m, --month [monthsAgo]", "\u67E5\u770B\u6478\u9C7C/\u7206\u809D\u6708\u62A5 (\u9ED8\u8BA4 0 \u4E3A\u672C\u6708\uFF0C1 \u4E3A\u4E0A\u6708\uFF0C2 \u4E3A\u4E0A\u4E0A\u6708...)").option("-p, --project", "\u67E5\u770B\u9879\u76EE\u7206\u809D\u6392\u884C").option("-t, --time", "\u67E5\u770B\u9EC4\u91D1\u6478\u9C7C\u65F6\u95F4\u6BB5 analysis (24\u5C0F\u65F6\u5206\u5E03)").option("-g, --ghost", "\u68C0\u6D4B\u6DF1\u591C\u5E7D\u7075\u63D0\u4EA4").option("-w, --weeks-ago <number>", "\u67E5\u8BE2\u51E0\u5468\u524D/\u6708\u524D\u7684\u62A5\u544A (\u9ED8\u8BA4 0\uFF0C\u5373\u672C\u5468/\u672C\u6708)", "0").option("-s, --source <source>", "\u9009\u62E9\u8981\u67E5\u8BE2\u7684 GitLab \u6570\u636E\u6E90 (\u5E8F\u53F7\u6216\u522B\u540D/host)").action(async (options) => {
|
|
1460
1470
|
const weeksAgo = parseInt(options.weeksAgo || "0", 10);
|
|
1461
1471
|
const source = options.source;
|
|
1462
1472
|
if (options.month !== void 0 && options.project) {
|