mushi-mushi 0.7.17 → 0.8.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 +11 -83
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
import { spawnSync } from "child_process";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
6
|
import { runInit } from "@mushi-mushi/cli/init";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import {
|
|
8
|
+
parseArgs,
|
|
9
|
+
assertNodeVersion,
|
|
10
|
+
FLAGS_HELP
|
|
11
|
+
} from "@mushi-mushi/cli/wizard-args";
|
|
12
|
+
var VERSION = true ? "0.8.0" : "0.0.0-dev";
|
|
13
|
+
var BIN = "mushi-mushi";
|
|
10
14
|
var ISSUES_URL = "https://github.com/kensaurus/mushi-mushi/issues";
|
|
11
15
|
var HELP = `mushi-mushi \u2014 bug-reporting SDK launcher
|
|
12
16
|
|
|
@@ -14,21 +18,11 @@ Usage:
|
|
|
14
18
|
npx mushi-mushi run the setup wizard (interactive)
|
|
15
19
|
npx mushi-mushi init same, with optional flags
|
|
16
20
|
|
|
17
|
-
Flags (forwarded to \`mushi init\`):
|
|
18
|
-
--project-id <uuid> skip the project ID prompt (UUID from the Projects page)
|
|
19
|
-
--api-key <key> skip the API key prompt (CI only \u2014 leaks into \`ps\`)
|
|
20
|
-
--framework <id> force a framework (${FRAMEWORK_IDS.join(", ")})
|
|
21
|
-
--skip-install print the install command instead of running it
|
|
22
|
-
--skip-test-report don't offer to send a test report at the end
|
|
23
|
-
--cwd <path> run in a different directory
|
|
24
|
-
--endpoint <url> override the Mushi API endpoint (self-hosted)
|
|
25
|
-
-y, --yes accept the detected framework without prompting
|
|
26
|
-
-v, --version print the launcher version and exit
|
|
27
|
-
-h, --help show this help
|
|
28
|
-
|
|
29
21
|
Other commands (setup, status, reports, deploy, test, login, config, ...)
|
|
30
22
|
are forwarded to @mushi-mushi/cli, e.g. \`npx mushi-mushi setup --ide cursor\`.
|
|
31
23
|
|
|
24
|
+
${FLAGS_HELP}
|
|
25
|
+
|
|
32
26
|
Docs: https://github.com/kensaurus/mushi-mushi
|
|
33
27
|
Console: https://kensaur.us/mushi-mushi/`;
|
|
34
28
|
function forwardToCli(argv) {
|
|
@@ -36,74 +30,8 @@ function forwardToCli(argv) {
|
|
|
36
30
|
const result = spawnSync(process.execPath, [cliBin, ...argv], { stdio: "inherit" });
|
|
37
31
|
process.exit(result.status ?? 1);
|
|
38
32
|
}
|
|
39
|
-
function parseArgs(argv) {
|
|
40
|
-
const args = argv[0] === "init" ? argv.slice(1) : argv;
|
|
41
|
-
const out = { showHelp: false, showVersion: false };
|
|
42
|
-
for (let i = 0; i < args.length; i++) {
|
|
43
|
-
const a = args[i];
|
|
44
|
-
if (a === "-h" || a === "--help") {
|
|
45
|
-
out.showHelp = true;
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
if (a === "-v" || a === "--version") {
|
|
49
|
-
out.showVersion = true;
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
if (a === "-y" || a === "--yes") {
|
|
53
|
-
out.yes = true;
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if (a === "--skip-install") {
|
|
57
|
-
out.skipInstall = true;
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
if (a === "--skip-test-report") {
|
|
61
|
-
out.skipTestReport = true;
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if (a === "--project-id") {
|
|
65
|
-
out.projectId = args[++i];
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
if (a === "--api-key") {
|
|
69
|
-
out.apiKey = args[++i];
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
if (a === "--cwd") {
|
|
73
|
-
out.cwd = args[++i];
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (a === "--endpoint") {
|
|
77
|
-
out.endpoint = args[++i];
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (a === "--framework") {
|
|
81
|
-
const fw = args[++i];
|
|
82
|
-
if (!isFrameworkId(fw)) {
|
|
83
|
-
throw new Error(`Unknown framework: ${fw}. Valid: ${FRAMEWORK_IDS.join(", ")}`);
|
|
84
|
-
}
|
|
85
|
-
out.framework = fw;
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
if (a.startsWith("-")) {
|
|
89
|
-
throw new Error(`Unknown flag: ${a}. Try --help.`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return out;
|
|
93
|
-
}
|
|
94
|
-
function assertNodeVersion() {
|
|
95
|
-
const major = Number(process.versions.node.split(".")[0]);
|
|
96
|
-
if (!Number.isFinite(major) || major < MIN_NODE_MAJOR) {
|
|
97
|
-
process.stderr.write(
|
|
98
|
-
`mushi-mushi requires Node.js ${MIN_NODE_MAJOR} or newer. You are on ${process.versions.node}.
|
|
99
|
-
Upgrade Node (https://nodejs.org/) and try again.
|
|
100
|
-
`
|
|
101
|
-
);
|
|
102
|
-
process.exit(1);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
33
|
async function main() {
|
|
106
|
-
assertNodeVersion();
|
|
34
|
+
assertNodeVersion(BIN);
|
|
107
35
|
const rawArgs = process.argv.slice(2);
|
|
108
36
|
const first = rawArgs[0];
|
|
109
37
|
if (first !== void 0 && first !== "init" && !first.startsWith("-")) {
|
|
@@ -139,7 +67,7 @@ async function main() {
|
|
|
139
67
|
main().catch((err) => {
|
|
140
68
|
const message = err instanceof Error ? err.message : String(err);
|
|
141
69
|
process.stderr.write(`
|
|
142
|
-
|
|
70
|
+
${BIN}: ${message}
|
|
143
71
|
`);
|
|
144
72
|
if (process.env.DEBUG?.includes("mushi") && err instanceof Error && err.stack) {
|
|
145
73
|
process.stderr.write(err.stack + "\n");
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mushi-mushi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ship a shake-to-report button and get AI-classified, deduped, ready-to-fix bug reports — one `npx mushi-mushi` command for React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Angular, React Native, Expo, Capacitor, and vanilla JS. Companion to Sentry: catches the user-felt bugs crash trackers can't see. Wires into GitHub, Slack, Jira, Linear, PagerDuty, Langfuse, and any MCP-compatible AI agent (Cursor, Claude Code, Copilot).",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mushi-mushi": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@mushi-mushi/cli": "^0.
|
|
10
|
+
"@mushi-mushi/cli": "^0.26.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/node": "^22.20.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
],
|
|
81
81
|
"type": "module",
|
|
82
82
|
"engines": {
|
|
83
|
-
"node": ">=
|
|
83
|
+
"node": ">=20"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsup",
|