create-mushi-mushi 0.6.15 → 0.6.17
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 +16 -95
- package/dist/index.js +8 -116
- package/package.json +3 -4
- package/templates/node/.env.example +0 -4
- package/templates/node/README.md +0 -12
- package/templates/node/gitignore +0 -6
- package/templates/node/package.json +0 -15
- package/templates/node/src/server.mjs +0 -38
- package/templates/svelte/.env.example +0 -4
- package/templates/svelte/README.md +0 -10
- package/templates/svelte/gitignore +0 -6
- package/templates/svelte/index.html +0 -12
- package/templates/svelte/package.json +0 -20
- package/templates/svelte/src/App.svelte +0 -20
- package/templates/svelte/src/main.ts +0 -12
- package/templates/svelte/vite.config.ts +0 -6
- package/templates/vue/.env.example +0 -4
- package/templates/vue/README.md +0 -10
- package/templates/vue/gitignore +0 -6
- package/templates/vue/index.html +0 -12
- package/templates/vue/package.json +0 -20
- package/templates/vue/src/App.vue +0 -22
- package/templates/vue/src/main.ts +0 -12
- package/templates/vue/vite.config.ts +0 -6
package/README.md
CHANGED
|
@@ -2,101 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
> **Your AI built it. Mushi Mushi makes it better.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
npm create mushi-mushi
|
|
16
|
-
|
|
17
|
-
pnpm create
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Docs: [the setup wizard](https://kensaur.us/mushi-mushi/docs/sdks/launcher) (same wizard as `npx mushi-mushi`)
|
|
23
|
-
|
|
24
|
-
## What it does
|
|
25
|
-
|
|
26
|
-
1. **Finds your framework:** Next.js, React (Vite or Create React App), Remix, Astro, Solid, Vue, Nuxt, Svelte, SvelteKit, Angular, Expo, React Native, Capacitor, Express, Fastify, Hono, or plain JavaScript.
|
|
27
|
-
2. **Picks the right SDK:** `@mushi-mushi/react`, `@mushi-mushi/vue`, `@mushi-mushi/svelte`, `@mushi-mushi/angular`, `@mushi-mushi/react-native`, `@mushi-mushi/capacitor` or `@mushi-mushi/web` for apps, and `@mushi-mushi/node` for Express, Fastify and Hono servers.
|
|
28
|
-
3. **Uses your package manager:** `npm`, `pnpm`, `yarn` or `bun`, based on your lockfile.
|
|
29
|
-
4. **Writes your keys:** into `.env.local` (or your existing `.env`), with the prefix your framework needs, for example `VITE_MUSHI_PROJECT_ID` or `NEXT_PUBLIC_MUSHI_API_KEY`. Servers, Remix and bare React Native get plain `MUSHI_PROJECT_ID` and `MUSHI_API_KEY`.
|
|
30
|
-
5. **Checks `.gitignore`:** warns you if that env file is not ignored, so you don't commit it.
|
|
31
|
-
6. **Prints the setup code** for your framework, ready to paste.
|
|
32
|
-
7. **Offers to send a test report** at the end, so you see your first diagnosed bug right away.
|
|
33
|
-
|
|
34
|
-
By default it wires Mushi Mushi into an **existing** project, so run it from that project's root. To start from nothing, use a starter template instead.
|
|
35
|
-
|
|
36
|
-
## Starter templates
|
|
37
|
-
|
|
38
|
-
`--template` scaffolds a minimal starter app with Mushi Mushi already wired, instead of running the wizard:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm create mushi-mushi -- --template vue # into ./mushi-vue-app
|
|
42
|
-
npm create mushi-mushi -- --template svelte my-app # into ./my-app
|
|
43
|
-
npm create mushi-mushi -- --template node # into ./mushi-node-app
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Valid templates: `vue`, `svelte`, `node`. The target directory must not exist yet. Then:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
cd mushi-vue-app
|
|
50
|
-
npm install
|
|
51
|
-
npx mushi-mushi # browser sign-in, writes your env vars
|
|
52
|
-
npm run dev # npm start for the node starter
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Flags
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm create mushi-mushi -- --framework next
|
|
59
|
-
npm create mushi-mushi -- --project-id <project-uuid> --api-key mushi_xxx
|
|
60
|
-
npm create mushi-mushi -- --skip-install
|
|
61
|
-
npm create mushi-mushi -- --skip-test-report
|
|
62
|
-
npm create mushi-mushi -- --audit # health-check an existing install instead
|
|
63
|
-
npm create mushi-mushi -- --cwd apps/web
|
|
64
|
-
npm create mushi-mushi -- --endpoint https://mushi.your-company.com
|
|
65
|
-
npm create mushi-mushi -- --template vue [dir]
|
|
66
|
-
npm create mushi-mushi -- -y
|
|
67
|
-
npm create mushi-mushi -- --version
|
|
68
|
-
npm create mushi-mushi -- --help
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
> `npm create` and `pnpm create` need the `--` separator before flags. Yarn 1 and Bun do not.
|
|
72
|
-
|
|
73
|
-
## Equivalent commands
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npx mushi-mushi # shorter
|
|
77
|
-
npx @mushi-mushi/cli init # scoped name
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Troubleshooting
|
|
81
|
-
|
|
82
|
-
- **Wrong framework detected?** Pass `--framework <id>` explicitly. Valid IDs: `next, react, cra, remix, astro, solid, vue, nuxt, svelte, sveltekit, angular, expo, react-native, capacitor, express, fastify, hono, vanilla`.
|
|
83
|
-
- **Running in a monorepo?** `cd` into the package you want Mushi Mushi in first, or pass `--cwd apps/web`.
|
|
84
|
-
- **`npx` cache serving an old version?** Run `npm cache clean --force` or `npx mushi-mushi@latest`.
|
|
85
|
-
- **Non-interactive shell (CI, or an AI agent's terminal)?** Pass `--yes`. The wizard then prints the sign-in URL (no browser opens) and picks the project by your app's name. On CI with no one to sign in, also pass `--project-id` and `--api-key`.
|
|
86
|
-
- **Key pasted with quotes/whitespace?** The wizard strips them, then checks the format: the API key starts with `mushi_` or `mush_pk_` followed by 10 or more characters, and the project ID is a UUID (or `proj_` followed by 10 or more characters).
|
|
87
|
-
|
|
88
|
-
## Security
|
|
89
|
-
|
|
90
|
-
- Credentials accepted via `--api-key` flag leak into `ps -ef`. Prefer the interactive prompt on dev machines; on CI, pass them via the environment and an explicit `--api-key "$MUSHI_API_KEY"` at the boundary.
|
|
91
|
-
- The `~/.config/mushi/config.json` credentials cache is written with mode `0o600` (owner read/write only) on Unix. Legacy `~/.mushirc` auto-migrates on first load.
|
|
92
|
-
- All env-file writes strip CR/LF/NUL from secrets to prevent accidental `.env` injection.
|
|
93
|
-
|
|
94
|
-
## Links
|
|
95
|
-
|
|
96
|
-
- [Console](https://kensaur.us/mushi-mushi/)
|
|
97
|
-
- [GitHub](https://github.com/kensaurus/mushi-mushi)
|
|
98
|
-
- [Docs](https://kensaur.us/mushi-mushi/docs/sdks/launcher)
|
|
99
|
-
- [Report a bug](https://github.com/kensaurus/mushi-mushi/issues)
|
|
5
|
+
**Same as `npx mushi-mushi`.** This package is kept so `npm create mushi-mushi`
|
|
6
|
+
keeps working. It forwards every argument to the same code in
|
|
7
|
+
[`@mushi-mushi/cli`](https://www.npmjs.com/package/@mushi-mushi/cli): the setup
|
|
8
|
+
wizard, the `--template` starter apps and the `mushi` commands.
|
|
9
|
+
|
|
10
|
+
| `npm create` form | Same as |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `npm create mushi-mushi` | `npx mushi-mushi` (setup wizard in this project) |
|
|
13
|
+
| `npm create mushi-mushi -- --template vue my-app` | `npx mushi-mushi --template vue my-app` (starter: `vue`, `svelte` or `node`) |
|
|
14
|
+
| `npm create mushi-mushi -- --yes` | `npx mushi-mushi --yes` |
|
|
15
|
+
| `npm create mushi-mushi -- --help` | `npx mushi-mushi --help` (every flag) |
|
|
16
|
+
|
|
17
|
+
`npm create` and `pnpm create` need the `--` separator before flags. Yarn 1
|
|
18
|
+
and Bun do not. You need Node.js 20 or newer.
|
|
19
|
+
|
|
20
|
+
Docs: [the setup wizard](https://kensaur.us/mushi-mushi/docs/sdks/launcher)
|
|
100
21
|
|
|
101
22
|
## License
|
|
102
23
|
|
package/dist/index.js
CHANGED
|
@@ -1,125 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { runInit } from "@mushi-mushi/cli/init";
|
|
8
|
-
import {
|
|
9
|
-
parseArgs,
|
|
10
|
-
assertNodeVersion,
|
|
11
|
-
FLAGS_HELP
|
|
12
|
-
} from "@mushi-mushi/cli/wizard-args";
|
|
13
|
-
var VERSION = true ? "0.6.15" : "0.0.0-dev";
|
|
14
|
-
var BIN = "create-mushi-mushi";
|
|
15
|
-
var ISSUES_URL = "https://github.com/kensaurus/mushi-mushi/issues";
|
|
16
|
-
var TEMPLATE_IDS = ["vue", "svelte", "node"];
|
|
17
|
-
var HELP = `create-mushi-mushi \u2014 add Mushi Mushi to your existing project
|
|
18
|
-
|
|
19
|
-
By default this does NOT scaffold a new app. It runs the setup wizard in your
|
|
20
|
-
current project: detects your framework and installs the right Mushi package.
|
|
21
|
-
With --template it scaffolds a minimal starter app instead.
|
|
4
|
+
import { runWizardBin } from "@mushi-mushi/cli/wizard-bin";
|
|
5
|
+
var VERSION = true ? "0.6.17" : "0.0.0-dev";
|
|
6
|
+
var USAGE = `create-mushi-mushi \u2014 same as npx mushi-mushi
|
|
22
7
|
|
|
23
8
|
Usage:
|
|
24
|
-
npm create mushi-mushi
|
|
25
|
-
npm create mushi-mushi -- --template vue
|
|
26
|
-
npm create mushi-mushi -- --
|
|
27
|
-
npm create mushi-mushi -- --help show all flags
|
|
9
|
+
npm create mushi-mushi run the setup wizard in this project
|
|
10
|
+
npm create mushi-mushi -- --template vue my-app scaffold a starter app (vue | svelte | node)
|
|
11
|
+
npm create mushi-mushi -- --help show all flags
|
|
28
12
|
|
|
29
13
|
Note: \`npm create\` requires the \`--\` separator before flags.
|
|
30
14
|
\`yarn create mushi-mushi --help\` works without it on Yarn 1.
|
|
31
15
|
\`pnpm create mushi-mushi -- --help\` mirrors npm.
|
|
32
|
-
\`bun create mushi-mushi --help\` works without it
|
|
33
|
-
|
|
34
|
-
${FLAGS_HELP}`;
|
|
35
|
-
function scaffoldTemplate(id, targetArg) {
|
|
36
|
-
const targetDir = resolve(process.cwd(), targetArg ?? `mushi-${id}-app`);
|
|
37
|
-
if (existsSync(targetDir)) {
|
|
38
|
-
process.stderr.write(`${BIN}: target directory already exists: ${targetDir}
|
|
39
|
-
`);
|
|
40
|
-
process.exit(1);
|
|
41
|
-
}
|
|
42
|
-
const templateDir = fileURLToPath(new URL(`../templates/${id}`, import.meta.url));
|
|
43
|
-
cpSync(templateDir, targetDir, { recursive: true });
|
|
44
|
-
renameSync(join(targetDir, "gitignore"), join(targetDir, ".gitignore"));
|
|
45
|
-
process.stdout.write(
|
|
46
|
-
`Scaffolded the ${id} starter into ${targetDir}
|
|
47
|
-
|
|
48
|
-
Next steps:
|
|
49
|
-
cd "${targetArg ?? `mushi-${id}-app`}"
|
|
50
|
-
npm install
|
|
51
|
-
npx mushi-mushi # browser sign-in, writes your env vars
|
|
52
|
-
${id === "node" ? "npm start" : "npm run dev"}
|
|
53
|
-
`
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
function extractTemplateArgs(argv) {
|
|
57
|
-
const rest = [];
|
|
58
|
-
let template;
|
|
59
|
-
let targetDir;
|
|
60
|
-
for (let i = 0; i < argv.length; i++) {
|
|
61
|
-
if (argv[i] === "--template") {
|
|
62
|
-
const id = argv[++i];
|
|
63
|
-
if (!TEMPLATE_IDS.includes(id)) {
|
|
64
|
-
process.stderr.write(
|
|
65
|
-
`${BIN}: unknown template: ${id ?? "(missing)"}. Valid: ${TEMPLATE_IDS.join(", ")}
|
|
66
|
-
`
|
|
67
|
-
);
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
template = id;
|
|
71
|
-
if (argv[i + 1] && !argv[i + 1].startsWith("-")) targetDir = argv[++i];
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
rest.push(argv[i]);
|
|
75
|
-
}
|
|
76
|
-
return { template, targetDir, rest };
|
|
77
|
-
}
|
|
78
|
-
async function main() {
|
|
79
|
-
assertNodeVersion(BIN);
|
|
80
|
-
const { template, targetDir, rest } = extractTemplateArgs(process.argv.slice(2));
|
|
81
|
-
if (template) {
|
|
82
|
-
scaffoldTemplate(template, targetDir);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
let parsed;
|
|
86
|
-
try {
|
|
87
|
-
parsed = parseArgs(rest);
|
|
88
|
-
} catch (err) {
|
|
89
|
-
process.stderr.write(`${err instanceof Error ? err.message : String(err)}
|
|
90
|
-
`);
|
|
91
|
-
process.exit(1);
|
|
92
|
-
}
|
|
93
|
-
if (parsed.showHelp) {
|
|
94
|
-
process.stdout.write(HELP + "\n");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (parsed.showVersion) {
|
|
98
|
-
process.stdout.write(VERSION + "\n");
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
await runInit({
|
|
102
|
-
projectId: parsed.projectId,
|
|
103
|
-
apiKey: parsed.apiKey,
|
|
104
|
-
framework: parsed.framework,
|
|
105
|
-
skipInstall: parsed.skipInstall,
|
|
106
|
-
yes: parsed.yes,
|
|
107
|
-
cwd: parsed.cwd,
|
|
108
|
-
endpoint: parsed.endpoint,
|
|
109
|
-
sendTestReport: parsed.skipTestReport ? false : void 0,
|
|
110
|
-
audit: parsed.audit
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
main().catch((err) => {
|
|
114
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
115
|
-
process.stderr.write(`
|
|
116
|
-
${BIN}: ${message}
|
|
117
|
-
`);
|
|
118
|
-
if (process.env.DEBUG?.includes("mushi") && err instanceof Error && err.stack) {
|
|
119
|
-
process.stderr.write(err.stack + "\n");
|
|
120
|
-
}
|
|
121
|
-
process.stderr.write(`
|
|
122
|
-
If this is a bug, please report it at ${ISSUES_URL}
|
|
123
|
-
`);
|
|
124
|
-
process.exit(1);
|
|
125
|
-
});
|
|
16
|
+
\`bun create mushi-mushi --help\` works without it.`;
|
|
17
|
+
void runWizardBin(process.argv.slice(2), { bin: "create-mushi-mushi", version: VERSION, usage: USAGE });
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-mushi-mushi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Same as npx mushi-mushi. Kept so `npm create mushi-mushi` keeps working: it forwards every argument to the same setup wizard, starters (`--template`) and commands.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-mushi-mushi": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@mushi-mushi/cli": "^0.
|
|
10
|
+
"@mushi-mushi/cli": "^0.40.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/node": "^22.20.0",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
|
-
"templates",
|
|
37
36
|
"README.md",
|
|
38
37
|
"LICENSE"
|
|
39
38
|
],
|
package/templates/node/README.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Mushi Mushi — Node server starter
|
|
2
|
-
|
|
3
|
-
```bash
|
|
4
|
-
npm install
|
|
5
|
-
cp .env.example .env # then fill in the two vars, or run: npx mushi-mushi
|
|
6
|
-
npm start # node --env-file=.env — loads .env automatically
|
|
7
|
-
# then: curl localhost:3000/boom
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
`/boom` throws asynchronously; the unhandled hook forwards the crash to Mushi.
|
|
11
|
-
Express / Fastify / Hono error-handler middlewares are documented at
|
|
12
|
-
https://kensaur.us/mushi-mushi/docs/sdks/node
|
package/templates/node/gitignore
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mushi-node-app",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"engines": {
|
|
7
|
-
"node": ">=20.6"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "node --env-file=.env src/server.mjs"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@mushi-mushi/node": "^1.1.0"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createServer } from 'node:http'
|
|
2
|
-
import { MushiNodeClient, attachUnhandledHook } from '@mushi-mushi/node'
|
|
3
|
-
|
|
4
|
-
if (!process.env.MUSHI_PROJECT_ID || !process.env.MUSHI_API_KEY) {
|
|
5
|
-
console.error(
|
|
6
|
-
'Missing MUSHI_PROJECT_ID / MUSHI_API_KEY.\n' +
|
|
7
|
-
'Fill in .env (see .env.example) and start with:\n' +
|
|
8
|
-
' npm start # runs: node --env-file=.env src/server.mjs\n' +
|
|
9
|
-
'Or run `npx mushi-mushi` to sign in and write the env file for you.',
|
|
10
|
-
)
|
|
11
|
-
process.exit(1)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const mushi = new MushiNodeClient({
|
|
15
|
-
projectId: process.env.MUSHI_PROJECT_ID,
|
|
16
|
-
apiKey: process.env.MUSHI_API_KEY,
|
|
17
|
-
environment: process.env.NODE_ENV ?? 'development',
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
// Forward every uncaught exception / unhandled rejection to Mushi before exit.
|
|
21
|
-
attachUnhandledHook({ client: mushi })
|
|
22
|
-
|
|
23
|
-
const server = createServer((req, res) => {
|
|
24
|
-
if (req.url === '/boom') {
|
|
25
|
-
// Demo: an async crash — Mushi captures it via the unhandled hook.
|
|
26
|
-
setImmediate(() => {
|
|
27
|
-
throw new Error('Demo error — check your Mushi dashboard for the report')
|
|
28
|
-
})
|
|
29
|
-
res.writeHead(500).end('crashing…\n')
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
res.writeHead(200, { 'Content-Type': 'text/plain' })
|
|
33
|
-
res.end('Mushi Mushi Node demo. GET /boom to send a demo error.\n')
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
server.listen(3000, () => {
|
|
37
|
-
console.log('Listening on http://localhost:3000 — GET /boom to test capture')
|
|
38
|
-
})
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Mushi Mushi — Svelte starter
|
|
2
|
-
|
|
3
|
-
```bash
|
|
4
|
-
npm install
|
|
5
|
-
cp .env.example .env.local # then fill in the two vars, or run: npx mushi-mushi
|
|
6
|
-
npm run dev
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
`npx mushi-mushi` signs you in via the browser and writes `.env.local` for you.
|
|
10
|
-
Docs: https://kensaur.us/mushi-mushi/docs/quickstart/svelte
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Mushi Mushi Svelte Demo</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="app"></div>
|
|
10
|
-
<script type="module" src="/src/main.ts"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mushi-svelte-app",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@mushi-mushi/svelte": "^1.0.0",
|
|
13
|
-
"svelte": "^5.0.0"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
17
|
-
"typescript": "^5.9.0",
|
|
18
|
-
"vite": "^7.0.0"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
function throwDemoError(): void {
|
|
3
|
-
throw new Error('Demo error — check your Mushi dashboard for the report')
|
|
4
|
-
}
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<main style="font-family: system-ui; padding: 2rem; max-width: 40rem; margin: 0 auto">
|
|
8
|
-
<h1>Mushi Mushi + Svelte</h1>
|
|
9
|
-
<p>
|
|
10
|
-
The Mushi widget is mounted. Shake your phone (mobile) or use the floating
|
|
11
|
-
button to file a bug report — or trigger a demo error:
|
|
12
|
-
</p>
|
|
13
|
-
<button on:click={throwDemoError}>Throw a demo error</button>
|
|
14
|
-
<p>
|
|
15
|
-
Reports land in your
|
|
16
|
-
<a href="https://kensaur.us/mushi-mushi/admin" target="_blank" rel="noreferrer">
|
|
17
|
-
Mushi console</a
|
|
18
|
-
>, diagnosed in plain English.
|
|
19
|
-
</p>
|
|
20
|
-
</main>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { mount } from 'svelte'
|
|
2
|
-
import { initMushi } from '@mushi-mushi/svelte'
|
|
3
|
-
import App from './App.svelte'
|
|
4
|
-
|
|
5
|
-
initMushi({
|
|
6
|
-
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
7
|
-
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
const app = mount(App, { target: document.getElementById('app')! })
|
|
11
|
-
|
|
12
|
-
export default app
|
package/templates/vue/README.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Mushi Mushi — Vue 3 starter
|
|
2
|
-
|
|
3
|
-
```bash
|
|
4
|
-
npm install
|
|
5
|
-
cp .env.example .env.local # then fill in the two vars, or run: npx mushi-mushi
|
|
6
|
-
npm run dev
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
`npx mushi-mushi` signs you in via the browser and writes `.env.local` for you.
|
|
10
|
-
Docs: https://kensaur.us/mushi-mushi/docs/quickstart/vue
|
package/templates/vue/gitignore
DELETED
package/templates/vue/index.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Mushi Mushi Vue Demo</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="app"></div>
|
|
10
|
-
<script type="module" src="/src/main.ts"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mushi-vue-app",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@mushi-mushi/vue": "^1.0.0",
|
|
13
|
-
"vue": "^3.5.0"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
17
|
-
"typescript": "^5.9.0",
|
|
18
|
-
"vite": "^7.0.0"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
function throwDemoError(): void {
|
|
3
|
-
throw new Error('Demo error — check your Mushi dashboard for the report')
|
|
4
|
-
}
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<main style="font-family: system-ui; padding: 2rem; max-width: 40rem; margin: 0 auto">
|
|
9
|
-
<h1>Mushi Mushi + Vue 3</h1>
|
|
10
|
-
<p>
|
|
11
|
-
The Mushi widget is mounted. Shake your phone (mobile) or use the floating
|
|
12
|
-
button to file a bug report — or trigger a demo error:
|
|
13
|
-
</p>
|
|
14
|
-
<button @click="throwDemoError">Throw a demo error</button>
|
|
15
|
-
<p>
|
|
16
|
-
Reports land in your
|
|
17
|
-
<a href="https://kensaur.us/mushi-mushi/admin" target="_blank" rel="noreferrer">
|
|
18
|
-
Mushi console</a
|
|
19
|
-
>, diagnosed in plain English.
|
|
20
|
-
</p>
|
|
21
|
-
</main>
|
|
22
|
-
</template>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createApp } from 'vue'
|
|
2
|
-
import { MushiPlugin } from '@mushi-mushi/vue'
|
|
3
|
-
import App from './App.vue'
|
|
4
|
-
|
|
5
|
-
const app = createApp(App)
|
|
6
|
-
|
|
7
|
-
app.use(MushiPlugin, {
|
|
8
|
-
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
9
|
-
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
app.mount('#app')
|