@tablation/crew 0.71.0 → 0.71.2
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/cli.js +41 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8635,6 +8635,12 @@ function splitConnectArg(arg) {
|
|
|
8635
8635
|
const i = arg.indexOf("/");
|
|
8636
8636
|
return [arg.slice(0, i), arg.slice(i + 1)];
|
|
8637
8637
|
}
|
|
8638
|
+
function versionRequest(argv2) {
|
|
8639
|
+
if (argv2[0] !== "--version" && argv2[0] !== "version") return null;
|
|
8640
|
+
const rest = argv2.slice(1);
|
|
8641
|
+
if (rest.some((a) => a !== "--json")) return null;
|
|
8642
|
+
return { json: rest.length > 0 };
|
|
8643
|
+
}
|
|
8638
8644
|
|
|
8639
8645
|
// src/roster.ts
|
|
8640
8646
|
function memberByIdentity(roster, identityId) {
|
|
@@ -10643,6 +10649,28 @@ function heldByBlockers(tickets, verifiedStatus, info) {
|
|
|
10643
10649
|
}
|
|
10644
10650
|
var describeHeld = (held) => held.map((h) => `${h.ticket.issue_tag ?? h.ticket.issue_id} held: blocked by ${h.blockers}`);
|
|
10645
10651
|
var CHANGELOG_LINE = /^Changelog:[ \t]*(.*)$/gm;
|
|
10652
|
+
var TICKET_REF_AT_START = /^([A-Z][A-Z0-9]*)-(\d+)\b/;
|
|
10653
|
+
function dedupeChangelogEntries(entries, ticket) {
|
|
10654
|
+
const own = (ticket.issue_tag ?? ticket.issue_id).match(/^([A-Z][A-Z0-9]*)-(\d+)$/);
|
|
10655
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10656
|
+
const out = [];
|
|
10657
|
+
for (const raw of entries) {
|
|
10658
|
+
let line = raw.trim();
|
|
10659
|
+
const ref = line.match(TICKET_REF_AT_START);
|
|
10660
|
+
let key = line;
|
|
10661
|
+
if (ref) {
|
|
10662
|
+
const prefix = ref[1];
|
|
10663
|
+
const num = ref[2];
|
|
10664
|
+
const canonical = own && own[2] === num ? own[1] : prefix;
|
|
10665
|
+
line = `${canonical}-${num}${line.slice(ref[0].length)}`;
|
|
10666
|
+
key = `${canonical}-${num}`;
|
|
10667
|
+
}
|
|
10668
|
+
if (seen.has(key)) continue;
|
|
10669
|
+
seen.add(key);
|
|
10670
|
+
out.push(line);
|
|
10671
|
+
}
|
|
10672
|
+
return out;
|
|
10673
|
+
}
|
|
10646
10674
|
var BUMP_LINE = /^Bump:[ \t]*(major|minor|patch)\b/gim;
|
|
10647
10675
|
function planMerge(cwd, tickets, contract, lastReleased, branchFor = (t) => branchForIssue(cwd, t.issue_id), base = "main", blockerInfo) {
|
|
10648
10676
|
const held = new Set(heldByBlockers(tickets, contract.statuses.verified, blockerInfo).map((h) => h.ticket.id));
|
|
@@ -10701,7 +10729,10 @@ function planMerge(cwd, tickets, contract, lastReleased, branchFor = (t) => bran
|
|
|
10701
10729
|
};
|
|
10702
10730
|
}
|
|
10703
10731
|
const bodies = commitBodies(cwd, `${base}..${branch}`);
|
|
10704
|
-
const entries =
|
|
10732
|
+
const entries = dedupeChangelogEntries(
|
|
10733
|
+
[...bodies.matchAll(CHANGELOG_LINE)].map((m) => m[1].trim()).filter(Boolean),
|
|
10734
|
+
ticket
|
|
10735
|
+
);
|
|
10705
10736
|
const usedFallback = entries.length === 0;
|
|
10706
10737
|
const { size, majorRequested } = requestedBump(bodies);
|
|
10707
10738
|
return {
|
|
@@ -15993,6 +16024,7 @@ function usage() {
|
|
|
15993
16024
|
crew merge [route] merge verified branches and stop
|
|
15994
16025
|
crew deploy [route] release now, even with nothing new to merge
|
|
15995
16026
|
crew watch [route] live view of what the crew is doing
|
|
16027
|
+
crew --version [--json] print the crew version on one line (also: crew version); --json adds home and compiled
|
|
15996
16028
|
crew status [route] [--json] paused/running state; --json for a machine reader
|
|
15997
16029
|
crew projects [--route R] [--json] the Projects rows each route can read (id, name, prefix, work mode)
|
|
15998
16030
|
crew whoami [route] [--json] the signed-in identity, key role, operator Crew row and credential source per route
|
|
@@ -16050,6 +16082,14 @@ In watch: space pauses the stream, q quits.
|
|
|
16050
16082
|
process.exit(2);
|
|
16051
16083
|
}
|
|
16052
16084
|
var argv = process.argv.slice(2);
|
|
16085
|
+
var versionReq = versionRequest(argv);
|
|
16086
|
+
if (versionReq) {
|
|
16087
|
+
const version = crewVersion(CREW_HOME);
|
|
16088
|
+
process.stdout.write(versionReq.json ? `${JSON.stringify({ version, home: CREW_HOME, compiled: isCompiledBinary(import.meta.url) })}
|
|
16089
|
+
` : `${version}
|
|
16090
|
+
`);
|
|
16091
|
+
process.exit(0);
|
|
16092
|
+
}
|
|
16053
16093
|
var flag = (name) => argv.includes(`--${name}`);
|
|
16054
16094
|
var value = (name) => {
|
|
16055
16095
|
const i = argv.indexOf(`--${name}`);
|
package/package.json
CHANGED