@staff0rd/assist 0.483.6 → 0.483.8
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/README.md +1 -1
- package/dist/commands/sessions/web/bundle.js +411 -411
- package/dist/index.js +28 -18
- 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.483.
|
|
9
|
+
version: "0.483.8",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -7967,9 +7967,9 @@ function groupActivityRefs(refs, commitLimit = ACTIVITY_COMMIT_LIMIT) {
|
|
|
7967
7967
|
return {
|
|
7968
7968
|
branches: newestFirst("branch"),
|
|
7969
7969
|
commits: commits2.slice(0, commitLimit),
|
|
7970
|
+
overflowCommits: commits2.slice(commitLimit),
|
|
7970
7971
|
prs: newestFirst("pr"),
|
|
7971
|
-
slacks: newestFirst("slack")
|
|
7972
|
-
hiddenCommits: Math.max(0, commits2.length - commitLimit)
|
|
7972
|
+
slacks: newestFirst("slack")
|
|
7973
7973
|
};
|
|
7974
7974
|
}
|
|
7975
7975
|
|
|
@@ -7978,9 +7978,10 @@ function printRef(label2, text17, ref) {
|
|
|
7978
7978
|
const url = ref.url ? ` ${chalk51.dim(ref.url)}` : "";
|
|
7979
7979
|
console.log(` ${chalk51.cyan(label2)} ${text17}${url}`);
|
|
7980
7980
|
}
|
|
7981
|
-
function printActivity(item) {
|
|
7982
|
-
const { branches, commits: commits2, prs: prs2, slacks
|
|
7983
|
-
item.gitRefs ?? []
|
|
7981
|
+
function printActivity(item, options2 = {}) {
|
|
7982
|
+
const { branches, commits: commits2, overflowCommits, prs: prs2, slacks } = groupActivityRefs(
|
|
7983
|
+
item.gitRefs ?? [],
|
|
7984
|
+
options2.allCommits ? Number.POSITIVE_INFINITY : void 0
|
|
7984
7985
|
);
|
|
7985
7986
|
if (branches.length + commits2.length + prs2.length + slacks.length === 0)
|
|
7986
7987
|
return;
|
|
@@ -7992,8 +7993,10 @@ function printActivity(item) {
|
|
|
7992
7993
|
const subject = commit2.title ? ` ${commit2.title}` : "";
|
|
7993
7994
|
printRef("commit", `${commit2.ref.slice(0, 8)}${subject}`, commit2);
|
|
7994
7995
|
}
|
|
7995
|
-
if (
|
|
7996
|
-
console.log(
|
|
7996
|
+
if (overflowCommits.length > 0) {
|
|
7997
|
+
console.log(
|
|
7998
|
+
` ${chalk51.dim(`\u2026 and ${overflowCommits.length} more commits (--all-commits to show)`)}`
|
|
7999
|
+
);
|
|
7997
8000
|
}
|
|
7998
8001
|
for (const pr of prs2) {
|
|
7999
8002
|
const title = pr.title ? ` ${pr.title}` : "";
|
|
@@ -8157,7 +8160,7 @@ function printComments(item) {
|
|
|
8157
8160
|
}
|
|
8158
8161
|
console.log();
|
|
8159
8162
|
}
|
|
8160
|
-
async function show(id) {
|
|
8163
|
+
async function show(id, options2 = {}) {
|
|
8161
8164
|
const found = await findOneItem(id);
|
|
8162
8165
|
if (!found) process.exit(1);
|
|
8163
8166
|
const { orm, item } = found;
|
|
@@ -8171,7 +8174,7 @@ async function show(id) {
|
|
|
8171
8174
|
printSubtasks(item);
|
|
8172
8175
|
await printLinks(orm, item);
|
|
8173
8176
|
printPlan(item);
|
|
8174
|
-
printActivity(item);
|
|
8177
|
+
printActivity(item, { allCommits: options2.allCommits });
|
|
8175
8178
|
printComments(item);
|
|
8176
8179
|
}
|
|
8177
8180
|
|
|
@@ -14145,10 +14148,15 @@ function registerUpdateCommands(cmd) {
|
|
|
14145
14148
|
).action(movePhase);
|
|
14146
14149
|
}
|
|
14147
14150
|
|
|
14148
|
-
// src/commands/
|
|
14151
|
+
// src/commands/backlog/registerShowCommands.ts
|
|
14149
14152
|
function registerShowCommands(cmd) {
|
|
14150
|
-
cmd.command("show <id>").alias("view").description("Show full detail for a backlog item").
|
|
14153
|
+
cmd.command("show <id>").alias("view").description("Show full detail for a backlog item").option(
|
|
14154
|
+
"--all-commits",
|
|
14155
|
+
"Show every commit in Activity instead of the newest 10"
|
|
14156
|
+
).action(show);
|
|
14151
14157
|
}
|
|
14158
|
+
|
|
14159
|
+
// src/commands/registerBacklog.ts
|
|
14152
14160
|
function registerWebCommand(cmd) {
|
|
14153
14161
|
cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(web2);
|
|
14154
14162
|
}
|
|
@@ -18711,21 +18719,23 @@ function* durabilityProbes() {
|
|
|
18711
18719
|
const status3 = yield ["status", "--porcelain"];
|
|
18712
18720
|
if (!status3.ok)
|
|
18713
18721
|
return { durable: false, reason: `tree state unreadable: ${status3.error}` };
|
|
18722
|
+
const dirty = status3.out !== "";
|
|
18714
18723
|
const upstream = yield [
|
|
18715
18724
|
"rev-parse",
|
|
18716
18725
|
"--abbrev-ref",
|
|
18717
18726
|
"--symbolic-full-name",
|
|
18718
18727
|
"@{upstream}"
|
|
18719
18728
|
];
|
|
18720
|
-
let localOnlyCommits;
|
|
18721
18729
|
if (upstream.ok && upstream.out) {
|
|
18722
18730
|
const ahead = yield ["rev-list", "--count", "@{upstream}..HEAD"];
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
const remoteBranches = yield ["branch", "-r", "--contains", "HEAD"];
|
|
18726
|
-
localOnlyCommits = !remoteBranches.ok || remoteBranches.out === "";
|
|
18731
|
+
if (ahead.ok && Number(ahead.out) === 0)
|
|
18732
|
+
return treeDurability({ dirty, localOnlyCommits: false });
|
|
18727
18733
|
}
|
|
18728
|
-
|
|
18734
|
+
const remoteBranches = yield ["branch", "-r", "--contains", "HEAD"];
|
|
18735
|
+
return treeDurability({
|
|
18736
|
+
dirty,
|
|
18737
|
+
localOnlyCommits: !remoteBranches.ok || remoteBranches.out === ""
|
|
18738
|
+
});
|
|
18729
18739
|
}
|
|
18730
18740
|
async function checkDurability(cwd) {
|
|
18731
18741
|
if (!existsSync44(cwd)) return { durable: true };
|