@tablation/crew 0.71.1 → 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 +15 -0
- 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) {
|
|
@@ -16018,6 +16024,7 @@ function usage() {
|
|
|
16018
16024
|
crew merge [route] merge verified branches and stop
|
|
16019
16025
|
crew deploy [route] release now, even with nothing new to merge
|
|
16020
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
|
|
16021
16028
|
crew status [route] [--json] paused/running state; --json for a machine reader
|
|
16022
16029
|
crew projects [--route R] [--json] the Projects rows each route can read (id, name, prefix, work mode)
|
|
16023
16030
|
crew whoami [route] [--json] the signed-in identity, key role, operator Crew row and credential source per route
|
|
@@ -16075,6 +16082,14 @@ In watch: space pauses the stream, q quits.
|
|
|
16075
16082
|
process.exit(2);
|
|
16076
16083
|
}
|
|
16077
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
|
+
}
|
|
16078
16093
|
var flag = (name) => argv.includes(`--${name}`);
|
|
16079
16094
|
var value = (name) => {
|
|
16080
16095
|
const i = argv.indexOf(`--${name}`);
|
package/package.json
CHANGED