@mushi-mushi/cli 0.32.0 → 0.34.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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/chunk-CY2BHCA5.js +8 -0
- package/dist/chunk-FPVAQNHT.js +10 -0
- package/dist/{chunk-7PSMATX3.js → chunk-OS2ZLURO.js} +1 -1
- package/dist/{chunk-3YMPNCJ4.js → chunk-VECP4KOK.js} +44 -16
- package/dist/{connect-MINIBKHX.js → connect-3UDYCZKF.js} +2 -2
- package/dist/{connect-JWNAYQEU.js → connect-T5BBOIWS.js} +2 -2
- package/dist/index.js +3004 -259
- package/dist/init.js +3 -3
- package/dist/{version-AX72RMKE.js → version-UVLMVFNO.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-MARVQVJC.js +0 -8
- package/dist/chunk-XIB5NTHP.js +0 -10
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ For your editor, `mushi setup` writes the hosted MCP entry by default: the edito
|
|
|
29
29
|
| --- | --- |
|
|
30
30
|
| Set up | `init`, `login`, `setup`, `connect`, `doctor`, `upgrade`, `nudge`, `completion` |
|
|
31
31
|
| Bugs | `reports list/show/search/triage`, `lessons list/show` |
|
|
32
|
-
| Fixes | `fix <reportId>`, `fixes tail/merge/refresh-ci` |
|
|
32
|
+
| Fixes | `fix <reportId>`, `fixes tail/merge/refresh-ci/review/verify`, `verify workflow` |
|
|
33
33
|
| Ship | `sourcemaps upload`, `deploy check`, `migrate`, `audit` |
|
|
34
34
|
| Test and UX | `qa stories/runs/run`, `tdd gen/pending/approve/improve`, `stories map`, `ux` |
|
|
35
35
|
| Account | `whoami`, `status`, `usage`, `billing`, `keys`, `integrations`, `slack` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MUSHI_CLI_VERSION,
|
|
4
4
|
MUSHI_MCP_PIN_SPEC
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FPVAQNHT.js";
|
|
6
6
|
import {
|
|
7
7
|
CLOUD_API_ENDPOINT,
|
|
8
8
|
assertEndpoint,
|
|
@@ -388,24 +388,49 @@ function printAndExit(err, asJson = false) {
|
|
|
388
388
|
// src/signals.ts
|
|
389
389
|
var installed = false;
|
|
390
390
|
var activeController = null;
|
|
391
|
+
var interrupted = null;
|
|
392
|
+
var cleanups = /* @__PURE__ */ new Set();
|
|
393
|
+
var INTERRUPT_CLEANUP_MS = 8e3;
|
|
394
|
+
function onInterrupt(fn) {
|
|
395
|
+
cleanups.add(fn);
|
|
396
|
+
return () => {
|
|
397
|
+
cleanups.delete(fn);
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function interruptedBy() {
|
|
401
|
+
return interrupted;
|
|
402
|
+
}
|
|
403
|
+
async function handleInterrupt(signal, exit = (code) => process.exit(code), budgetMs = INTERRUPT_CLEANUP_MS) {
|
|
404
|
+
const code = signal === "SIGINT" ? 130 : signal === "SIGTERM" ? 143 : 1;
|
|
405
|
+
if (interrupted) {
|
|
406
|
+
exit(code);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
interrupted = signal;
|
|
410
|
+
activeController?.abort(
|
|
411
|
+
new MushiCliError(
|
|
412
|
+
"E_INTERRUPTED",
|
|
413
|
+
`aborted by ${signal}`,
|
|
414
|
+
"partial state on the server is safe to retry \u2014 re-run the same command"
|
|
415
|
+
)
|
|
416
|
+
);
|
|
417
|
+
if (cleanups.size) {
|
|
418
|
+
let timer;
|
|
419
|
+
const budget = new Promise((resolve2) => {
|
|
420
|
+
timer = setTimeout(resolve2, budgetMs);
|
|
421
|
+
});
|
|
422
|
+
const all = Promise.allSettled([...cleanups].map(async (fn) => fn(signal)));
|
|
423
|
+
await Promise.race([all, budget]);
|
|
424
|
+
clearTimeout(timer);
|
|
425
|
+
}
|
|
426
|
+
await new Promise((resolve2) => process.nextTick(resolve2));
|
|
427
|
+
exit(code);
|
|
428
|
+
}
|
|
391
429
|
function installSignalHandlers() {
|
|
392
430
|
if (installed) return;
|
|
393
431
|
installed = true;
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
new MushiCliError(
|
|
397
|
-
"E_INTERRUPTED",
|
|
398
|
-
`aborted by ${signal}`,
|
|
399
|
-
"partial state on the server is safe to retry \u2014 re-run the same command"
|
|
400
|
-
)
|
|
401
|
-
);
|
|
402
|
-
const code = signal === "SIGINT" ? 130 : signal === "SIGTERM" ? 143 : 1;
|
|
403
|
-
process.nextTick(() => {
|
|
404
|
-
process.exit(code);
|
|
405
|
-
});
|
|
406
|
-
};
|
|
407
|
-
process.on("SIGINT", () => abortAndExit("SIGINT"));
|
|
408
|
-
process.on("SIGTERM", () => abortAndExit("SIGTERM"));
|
|
432
|
+
process.on("SIGINT", () => void handleInterrupt("SIGINT"));
|
|
433
|
+
process.on("SIGTERM", () => void handleInterrupt("SIGTERM"));
|
|
409
434
|
}
|
|
410
435
|
function getAbortSignal(external) {
|
|
411
436
|
if (external) return external.signal;
|
|
@@ -1113,7 +1138,10 @@ async function runConnect(opts, baseConfig = {}) {
|
|
|
1113
1138
|
export {
|
|
1114
1139
|
MushiCliError,
|
|
1115
1140
|
printAndExit,
|
|
1141
|
+
onInterrupt,
|
|
1142
|
+
interruptedBy,
|
|
1116
1143
|
installSignalHandlers,
|
|
1144
|
+
getAbortSignal,
|
|
1117
1145
|
trySaveKeyToKeychain,
|
|
1118
1146
|
syncKeychainAfterKeyChange,
|
|
1119
1147
|
savedSdkKeyFor,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
saveConfig,
|
|
7
7
|
savedSdkKeyFor,
|
|
8
8
|
waitForIngestReady
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OS2ZLURO.js";
|
|
10
10
|
import {
|
|
11
11
|
MUSHI_MCP_PIN_SPEC
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CY2BHCA5.js";
|
|
13
13
|
import {
|
|
14
14
|
detectFramework,
|
|
15
15
|
envVarsToWrite,
|