@staff0rd/assist 0.180.0 → 0.181.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 +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.181.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -3643,7 +3643,7 @@ async function notify() {
|
|
|
3643
3643
|
// src/commands/activity/activityChart.ts
|
|
3644
3644
|
import blessed from "blessed";
|
|
3645
3645
|
import contrib from "blessed-contrib";
|
|
3646
|
-
function activityChart(data) {
|
|
3646
|
+
function activityChart(data, range) {
|
|
3647
3647
|
const screen = blessed.screen({
|
|
3648
3648
|
smartCSR: true,
|
|
3649
3649
|
title: "Commit Activity"
|
|
@@ -3652,7 +3652,7 @@ function activityChart(data) {
|
|
|
3652
3652
|
const labels = data.map((d) => d.date.slice(5));
|
|
3653
3653
|
const values = data.map((d) => d.count);
|
|
3654
3654
|
const line = grid.set(0, 0, 1, 1, contrib.line, {
|
|
3655
|
-
label:
|
|
3655
|
+
label: ` Commits per week \xB7 ${range.since} \u2192 ${range.until} (press q to close) `,
|
|
3656
3656
|
showLegend: true,
|
|
3657
3657
|
legend: { width: 12 },
|
|
3658
3658
|
xLabelPadding: 3,
|
|
@@ -3727,7 +3727,8 @@ async function activity(options2) {
|
|
|
3727
3727
|
weekly.set(weekStart, (weekly.get(weekStart) ?? 0) + count);
|
|
3728
3728
|
}
|
|
3729
3729
|
const weeklyData = [...weekly.entries()].map(([date, count]) => ({ date, count })).sort((a, b) => a.date.localeCompare(b.date));
|
|
3730
|
-
|
|
3730
|
+
const until = data[data.length - 1].date;
|
|
3731
|
+
activityChart(weeklyData, { since, until });
|
|
3731
3732
|
}
|
|
3732
3733
|
|
|
3733
3734
|
// src/commands/registerActivity.ts
|