@mushi-mushi/cli 0.38.0 → 0.39.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/{chunk-AIZRI665.js → chunk-AWASJDQI.js} +62 -33
- package/dist/{chunk-V3DR4WLG.js → chunk-BG2TVTBN.js} +1 -1
- package/dist/{chunk-KOBEOGNF.js → chunk-CG5KPP4S.js} +62 -33
- package/dist/chunk-HQM2WZVF.js +8 -0
- package/dist/chunk-JQPLY3ZT.js +10 -0
- package/dist/{chunk-BUCMB4NS.js → chunk-OZPDPF6G.js} +4 -4
- package/dist/{chunk-QZMSGTVZ.js → chunk-PPES6C4Y.js} +1 -1
- package/dist/{chunk-JXAH3XKH.js → chunk-UVAADP4O.js} +3 -3
- package/dist/{connect-M2IGP63E.js → connect-BCCGBCYR.js} +4 -4
- package/dist/{connect-OTHJSNHC.js → connect-RZV3PXP3.js} +4 -4
- package/dist/{daemon-VYXTQ5TG.js → daemon-ASMMT73O.js} +3 -3
- package/dist/{detect-WZT5X6LP.js → detect-SOXPECZ3.js} +5 -1
- package/dist/detect.d.ts +17 -1
- package/dist/detect.js +5 -1
- package/dist/index.js +54 -29
- package/dist/init.js +22 -17
- package/dist/{snippet-inject-NDAPEL2T.js → snippet-inject-AVGVHTUJ.js} +3 -2
- package/dist/{snippet-inject-LPRWTQDE.js → snippet-inject-ETGBPDYB.js} +3 -2
- package/dist/{version-ULUVAZ3V.js → version-MGHYYC2T.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wizard-args.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DJNAPA4D.js +0 -10
- package/dist/chunk-M5LN4ZWQ.js +0 -8
|
@@ -28,11 +28,12 @@ var FRAMEWORKS = {
|
|
|
28
28
|
next: {
|
|
29
29
|
id: "next",
|
|
30
30
|
label: "Next.js",
|
|
31
|
-
packageName: "
|
|
31
|
+
packageName: "mushi-mushi",
|
|
32
|
+
importPath: "mushi-mushi/react",
|
|
32
33
|
needsWebPackage: false,
|
|
33
34
|
snippet: () => `// app/providers.tsx (or pages/_app.tsx for /pages router)
|
|
34
35
|
'use client'
|
|
35
|
-
import { MushiProvider } from '
|
|
36
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
36
37
|
|
|
37
38
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
38
39
|
return (
|
|
@@ -48,10 +49,11 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
48
49
|
react: {
|
|
49
50
|
id: "react",
|
|
50
51
|
label: "React",
|
|
51
|
-
packageName: "
|
|
52
|
+
packageName: "mushi-mushi",
|
|
53
|
+
importPath: "mushi-mushi/react",
|
|
52
54
|
needsWebPackage: false,
|
|
53
55
|
snippet: () => `// src/main.tsx
|
|
54
|
-
import { MushiProvider } from '
|
|
56
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
55
57
|
|
|
56
58
|
createRoot(document.getElementById('root')!).render(
|
|
57
59
|
<MushiProvider config={{
|
|
@@ -65,11 +67,12 @@ createRoot(document.getElementById('root')!).render(
|
|
|
65
67
|
cra: {
|
|
66
68
|
id: "cra",
|
|
67
69
|
label: "Create React App",
|
|
68
|
-
packageName: "
|
|
70
|
+
packageName: "mushi-mushi",
|
|
71
|
+
importPath: "mushi-mushi/react",
|
|
69
72
|
needsWebPackage: false,
|
|
70
73
|
// CRA inlines only REACT_APP_*-prefixed vars into process.env at build time.
|
|
71
74
|
snippet: () => `// src/index.tsx
|
|
72
|
-
import { MushiProvider } from '
|
|
75
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
73
76
|
|
|
74
77
|
root.render(
|
|
75
78
|
<MushiProvider config={{
|
|
@@ -83,12 +86,13 @@ root.render(
|
|
|
83
86
|
remix: {
|
|
84
87
|
id: "remix",
|
|
85
88
|
label: "Remix",
|
|
86
|
-
packageName: "
|
|
89
|
+
packageName: "mushi-mushi",
|
|
90
|
+
importPath: "mushi-mushi/react",
|
|
87
91
|
needsWebPackage: false,
|
|
88
92
|
// Remix doesn't inline client env. Expose public values at runtime via the
|
|
89
93
|
// root loader + window.ENV (works on both the classic compiler and Vite).
|
|
90
94
|
snippet: () => `// app/root.tsx
|
|
91
|
-
import { MushiProvider } from '
|
|
95
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
92
96
|
import { useLoaderData } from '@remix-run/react'
|
|
93
97
|
|
|
94
98
|
export async function loader() {
|
|
@@ -115,14 +119,15 @@ export default function App() {
|
|
|
115
119
|
astro: {
|
|
116
120
|
id: "astro",
|
|
117
121
|
label: "Astro",
|
|
118
|
-
packageName: "
|
|
122
|
+
packageName: "mushi-mushi",
|
|
123
|
+
importPath: "mushi-mushi",
|
|
119
124
|
needsWebPackage: false,
|
|
120
125
|
// Astro exposes only PUBLIC_*-prefixed vars to client code (Vite-based).
|
|
121
126
|
snippet: () => `---
|
|
122
127
|
// src/layouts/Layout.astro (add this <script> once, e.g. in your base layout)
|
|
123
128
|
---
|
|
124
129
|
<script>
|
|
125
|
-
import { Mushi } from '
|
|
130
|
+
import { Mushi } from 'mushi-mushi'
|
|
126
131
|
Mushi.init({
|
|
127
132
|
projectId: import.meta.env.PUBLIC_MUSHI_PROJECT_ID,
|
|
128
133
|
apiKey: import.meta.env.PUBLIC_MUSHI_API_KEY,
|
|
@@ -132,12 +137,13 @@ export default function App() {
|
|
|
132
137
|
solid: {
|
|
133
138
|
id: "solid",
|
|
134
139
|
label: "Solid",
|
|
135
|
-
packageName: "
|
|
140
|
+
packageName: "mushi-mushi",
|
|
141
|
+
importPath: "mushi-mushi",
|
|
136
142
|
needsWebPackage: false,
|
|
137
143
|
// Solid / SolidStart are Vite-based → VITE_*-prefixed client env.
|
|
138
144
|
snippet: () => `// src/index.tsx (or src/app.tsx for SolidStart)
|
|
139
145
|
import { onMount } from 'solid-js'
|
|
140
|
-
import { Mushi } from '
|
|
146
|
+
import { Mushi } from 'mushi-mushi'
|
|
141
147
|
|
|
142
148
|
onMount(() => {
|
|
143
149
|
Mushi.init({
|
|
@@ -149,10 +155,11 @@ onMount(() => {
|
|
|
149
155
|
vue: {
|
|
150
156
|
id: "vue",
|
|
151
157
|
label: "Vue 3",
|
|
152
|
-
packageName: "
|
|
158
|
+
packageName: "mushi-mushi",
|
|
159
|
+
importPath: "mushi-mushi/vue",
|
|
153
160
|
needsWebPackage: false,
|
|
154
161
|
snippet: () => `// src/main.ts
|
|
155
|
-
import { MushiPlugin } from '
|
|
162
|
+
import { MushiPlugin } from 'mushi-mushi/vue'
|
|
156
163
|
|
|
157
164
|
app.use(MushiPlugin, {
|
|
158
165
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -162,10 +169,11 @@ app.use(MushiPlugin, {
|
|
|
162
169
|
nuxt: {
|
|
163
170
|
id: "nuxt",
|
|
164
171
|
label: "Nuxt",
|
|
165
|
-
packageName: "
|
|
172
|
+
packageName: "mushi-mushi",
|
|
173
|
+
importPath: "mushi-mushi/vue",
|
|
166
174
|
needsWebPackage: false,
|
|
167
175
|
snippet: () => `// plugins/mushi.client.ts
|
|
168
|
-
import { MushiPlugin } from '
|
|
176
|
+
import { MushiPlugin } from 'mushi-mushi/vue'
|
|
169
177
|
|
|
170
178
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
171
179
|
nuxtApp.vueApp.use(MushiPlugin, {
|
|
@@ -177,10 +185,11 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
177
185
|
svelte: {
|
|
178
186
|
id: "svelte",
|
|
179
187
|
label: "Svelte",
|
|
180
|
-
packageName: "
|
|
188
|
+
packageName: "mushi-mushi",
|
|
189
|
+
importPath: "mushi-mushi/svelte",
|
|
181
190
|
needsWebPackage: false,
|
|
182
191
|
snippet: () => `// src/main.ts
|
|
183
|
-
import { initMushi } from '
|
|
192
|
+
import { initMushi } from 'mushi-mushi/svelte'
|
|
184
193
|
|
|
185
194
|
initMushi({
|
|
186
195
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -190,14 +199,15 @@ initMushi({
|
|
|
190
199
|
sveltekit: {
|
|
191
200
|
id: "sveltekit",
|
|
192
201
|
label: "SvelteKit",
|
|
193
|
-
packageName: "
|
|
202
|
+
packageName: "mushi-mushi",
|
|
203
|
+
importPath: "mushi-mushi/svelte",
|
|
194
204
|
needsWebPackage: false,
|
|
195
205
|
snippet: () => `// src/routes/+layout.svelte
|
|
196
206
|
<script>
|
|
197
207
|
import { onMount } from 'svelte'
|
|
198
208
|
|
|
199
209
|
onMount(async () => {
|
|
200
|
-
const { initMushi } = await import('
|
|
210
|
+
const { initMushi } = await import('mushi-mushi/svelte')
|
|
201
211
|
initMushi({
|
|
202
212
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
203
213
|
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
@@ -208,10 +218,11 @@ initMushi({
|
|
|
208
218
|
angular: {
|
|
209
219
|
id: "angular",
|
|
210
220
|
label: "Angular",
|
|
211
|
-
packageName: "
|
|
221
|
+
packageName: "mushi-mushi",
|
|
222
|
+
importPath: "mushi-mushi/angular",
|
|
212
223
|
needsWebPackage: false,
|
|
213
224
|
snippet: () => `// src/main.ts
|
|
214
|
-
import { provideMushi } from '
|
|
225
|
+
import { provideMushi } from 'mushi-mushi/angular'
|
|
215
226
|
|
|
216
227
|
bootstrapApplication(AppComponent, {
|
|
217
228
|
providers: [
|
|
@@ -226,6 +237,7 @@ bootstrapApplication(AppComponent, {
|
|
|
226
237
|
id: "expo",
|
|
227
238
|
label: "Expo",
|
|
228
239
|
packageName: "@mushi-mushi/react-native",
|
|
240
|
+
importPath: "@mushi-mushi/react-native",
|
|
229
241
|
needsWebPackage: false,
|
|
230
242
|
snippet: () => `// App.tsx
|
|
231
243
|
import { MushiProvider } from '@mushi-mushi/react-native'
|
|
@@ -245,6 +257,7 @@ export default function App() {
|
|
|
245
257
|
id: "react-native",
|
|
246
258
|
label: "React Native",
|
|
247
259
|
packageName: "@mushi-mushi/react-native",
|
|
260
|
+
importPath: "@mushi-mushi/react-native",
|
|
248
261
|
needsWebPackage: false,
|
|
249
262
|
snippet: () => `// App.tsx
|
|
250
263
|
import { MushiProvider } from '@mushi-mushi/react-native'
|
|
@@ -264,6 +277,7 @@ export default function App() {
|
|
|
264
277
|
id: "capacitor",
|
|
265
278
|
label: "Capacitor (Ionic)",
|
|
266
279
|
packageName: "@mushi-mushi/capacitor",
|
|
280
|
+
importPath: "@mushi-mushi/capacitor",
|
|
267
281
|
needsWebPackage: false,
|
|
268
282
|
/* The Capacitor plugin's public API is `Mushi.configure(...)`, not
|
|
269
283
|
* `Mushi.init(...)` — see packages/capacitor/src/definitions.ts. We
|
|
@@ -282,11 +296,12 @@ await Mushi.configure({
|
|
|
282
296
|
express: {
|
|
283
297
|
id: "express",
|
|
284
298
|
label: "Express",
|
|
285
|
-
packageName: "
|
|
299
|
+
packageName: "mushi-mushi",
|
|
300
|
+
importPath: "mushi-mushi/node",
|
|
286
301
|
needsWebPackage: false,
|
|
287
302
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
288
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
289
|
-
import { mushiExpressErrorHandler } from '
|
|
303
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
304
|
+
import { mushiExpressErrorHandler } from 'mushi-mushi/node/express'
|
|
290
305
|
import type { Express } from 'express'
|
|
291
306
|
|
|
292
307
|
export const mushi = new MushiNodeClient({
|
|
@@ -303,11 +318,12 @@ export function attachMushi(app: Express) {
|
|
|
303
318
|
fastify: {
|
|
304
319
|
id: "fastify",
|
|
305
320
|
label: "Fastify",
|
|
306
|
-
packageName: "
|
|
321
|
+
packageName: "mushi-mushi",
|
|
322
|
+
importPath: "mushi-mushi/node",
|
|
307
323
|
needsWebPackage: false,
|
|
308
324
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
309
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
310
|
-
import { mushiFastifyPlugin } from '
|
|
325
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
326
|
+
import { mushiFastifyPlugin } from 'mushi-mushi/node/fastify'
|
|
311
327
|
import Fastify from 'fastify'
|
|
312
328
|
|
|
313
329
|
export const mushi = new MushiNodeClient({
|
|
@@ -323,11 +339,12 @@ mushiFastifyPlugin(app, { client: mushi })`
|
|
|
323
339
|
hono: {
|
|
324
340
|
id: "hono",
|
|
325
341
|
label: "Hono",
|
|
326
|
-
packageName: "
|
|
342
|
+
packageName: "mushi-mushi",
|
|
343
|
+
importPath: "mushi-mushi/node",
|
|
327
344
|
needsWebPackage: false,
|
|
328
345
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
329
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
330
|
-
import { mushiHonoErrorHandler } from '
|
|
346
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
347
|
+
import { mushiHonoErrorHandler } from 'mushi-mushi/node/hono'
|
|
331
348
|
import { Hono } from 'hono'
|
|
332
349
|
|
|
333
350
|
export const mushi = new MushiNodeClient({
|
|
@@ -347,10 +364,11 @@ app.onError(
|
|
|
347
364
|
vanilla: {
|
|
348
365
|
id: "vanilla",
|
|
349
366
|
label: "Vanilla JS / unknown",
|
|
350
|
-
packageName: "
|
|
367
|
+
packageName: "mushi-mushi",
|
|
368
|
+
importPath: "mushi-mushi",
|
|
351
369
|
needsWebPackage: false,
|
|
352
370
|
snippet: () => `// Anywhere in your client bundle
|
|
353
|
-
import { Mushi } from '
|
|
371
|
+
import { Mushi } from 'mushi-mushi'
|
|
354
372
|
|
|
355
373
|
Mushi.init({
|
|
356
374
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -358,6 +376,15 @@ Mushi.init({
|
|
|
358
376
|
})`
|
|
359
377
|
}
|
|
360
378
|
};
|
|
379
|
+
var UMBRELLA_PACKAGE = "mushi-mushi";
|
|
380
|
+
function isMushiSdkPackage(name) {
|
|
381
|
+
return name === UMBRELLA_PACKAGE || name.startsWith("@mushi-mushi/");
|
|
382
|
+
}
|
|
383
|
+
function isLauncherOnly(name, spec) {
|
|
384
|
+
if (name !== UMBRELLA_PACKAGE || !spec) return false;
|
|
385
|
+
const m = /^[\^~>=<\sv]*(\d+)\./.exec(spec);
|
|
386
|
+
return m ? Number(m[1]) === 0 : false;
|
|
387
|
+
}
|
|
361
388
|
function readPackageJson(cwd) {
|
|
362
389
|
const path = join(cwd, "package.json");
|
|
363
390
|
if (!existsSync(path)) return null;
|
|
@@ -465,6 +492,8 @@ export {
|
|
|
465
492
|
FRAMEWORK_IDS,
|
|
466
493
|
isFrameworkId,
|
|
467
494
|
FRAMEWORKS,
|
|
495
|
+
isMushiSdkPackage,
|
|
496
|
+
isLauncherOnly,
|
|
468
497
|
readPackageJson,
|
|
469
498
|
detectFramework,
|
|
470
499
|
detectPackageManager,
|
|
@@ -30,11 +30,12 @@ var FRAMEWORKS = {
|
|
|
30
30
|
next: {
|
|
31
31
|
id: "next",
|
|
32
32
|
label: "Next.js",
|
|
33
|
-
packageName: "
|
|
33
|
+
packageName: "mushi-mushi",
|
|
34
|
+
importPath: "mushi-mushi/react",
|
|
34
35
|
needsWebPackage: false,
|
|
35
36
|
snippet: () => `// app/providers.tsx (or pages/_app.tsx for /pages router)
|
|
36
37
|
'use client'
|
|
37
|
-
import { MushiProvider } from '
|
|
38
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
38
39
|
|
|
39
40
|
export function Providers({ children }: { children: React.ReactNode }) {
|
|
40
41
|
return (
|
|
@@ -50,10 +51,11 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
50
51
|
react: {
|
|
51
52
|
id: "react",
|
|
52
53
|
label: "React",
|
|
53
|
-
packageName: "
|
|
54
|
+
packageName: "mushi-mushi",
|
|
55
|
+
importPath: "mushi-mushi/react",
|
|
54
56
|
needsWebPackage: false,
|
|
55
57
|
snippet: () => `// src/main.tsx
|
|
56
|
-
import { MushiProvider } from '
|
|
58
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
57
59
|
|
|
58
60
|
createRoot(document.getElementById('root')!).render(
|
|
59
61
|
<MushiProvider config={{
|
|
@@ -67,11 +69,12 @@ createRoot(document.getElementById('root')!).render(
|
|
|
67
69
|
cra: {
|
|
68
70
|
id: "cra",
|
|
69
71
|
label: "Create React App",
|
|
70
|
-
packageName: "
|
|
72
|
+
packageName: "mushi-mushi",
|
|
73
|
+
importPath: "mushi-mushi/react",
|
|
71
74
|
needsWebPackage: false,
|
|
72
75
|
// CRA inlines only REACT_APP_*-prefixed vars into process.env at build time.
|
|
73
76
|
snippet: () => `// src/index.tsx
|
|
74
|
-
import { MushiProvider } from '
|
|
77
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
75
78
|
|
|
76
79
|
root.render(
|
|
77
80
|
<MushiProvider config={{
|
|
@@ -85,12 +88,13 @@ root.render(
|
|
|
85
88
|
remix: {
|
|
86
89
|
id: "remix",
|
|
87
90
|
label: "Remix",
|
|
88
|
-
packageName: "
|
|
91
|
+
packageName: "mushi-mushi",
|
|
92
|
+
importPath: "mushi-mushi/react",
|
|
89
93
|
needsWebPackage: false,
|
|
90
94
|
// Remix doesn't inline client env. Expose public values at runtime via the
|
|
91
95
|
// root loader + window.ENV (works on both the classic compiler and Vite).
|
|
92
96
|
snippet: () => `// app/root.tsx
|
|
93
|
-
import { MushiProvider } from '
|
|
97
|
+
import { MushiProvider } from 'mushi-mushi/react'
|
|
94
98
|
import { useLoaderData } from '@remix-run/react'
|
|
95
99
|
|
|
96
100
|
export async function loader() {
|
|
@@ -117,14 +121,15 @@ export default function App() {
|
|
|
117
121
|
astro: {
|
|
118
122
|
id: "astro",
|
|
119
123
|
label: "Astro",
|
|
120
|
-
packageName: "
|
|
124
|
+
packageName: "mushi-mushi",
|
|
125
|
+
importPath: "mushi-mushi",
|
|
121
126
|
needsWebPackage: false,
|
|
122
127
|
// Astro exposes only PUBLIC_*-prefixed vars to client code (Vite-based).
|
|
123
128
|
snippet: () => `---
|
|
124
129
|
// src/layouts/Layout.astro (add this <script> once, e.g. in your base layout)
|
|
125
130
|
---
|
|
126
131
|
<script>
|
|
127
|
-
import { Mushi } from '
|
|
132
|
+
import { Mushi } from 'mushi-mushi'
|
|
128
133
|
Mushi.init({
|
|
129
134
|
projectId: import.meta.env.PUBLIC_MUSHI_PROJECT_ID,
|
|
130
135
|
apiKey: import.meta.env.PUBLIC_MUSHI_API_KEY,
|
|
@@ -134,12 +139,13 @@ export default function App() {
|
|
|
134
139
|
solid: {
|
|
135
140
|
id: "solid",
|
|
136
141
|
label: "Solid",
|
|
137
|
-
packageName: "
|
|
142
|
+
packageName: "mushi-mushi",
|
|
143
|
+
importPath: "mushi-mushi",
|
|
138
144
|
needsWebPackage: false,
|
|
139
145
|
// Solid / SolidStart are Vite-based → VITE_*-prefixed client env.
|
|
140
146
|
snippet: () => `// src/index.tsx (or src/app.tsx for SolidStart)
|
|
141
147
|
import { onMount } from 'solid-js'
|
|
142
|
-
import { Mushi } from '
|
|
148
|
+
import { Mushi } from 'mushi-mushi'
|
|
143
149
|
|
|
144
150
|
onMount(() => {
|
|
145
151
|
Mushi.init({
|
|
@@ -151,10 +157,11 @@ onMount(() => {
|
|
|
151
157
|
vue: {
|
|
152
158
|
id: "vue",
|
|
153
159
|
label: "Vue 3",
|
|
154
|
-
packageName: "
|
|
160
|
+
packageName: "mushi-mushi",
|
|
161
|
+
importPath: "mushi-mushi/vue",
|
|
155
162
|
needsWebPackage: false,
|
|
156
163
|
snippet: () => `// src/main.ts
|
|
157
|
-
import { MushiPlugin } from '
|
|
164
|
+
import { MushiPlugin } from 'mushi-mushi/vue'
|
|
158
165
|
|
|
159
166
|
app.use(MushiPlugin, {
|
|
160
167
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -164,10 +171,11 @@ app.use(MushiPlugin, {
|
|
|
164
171
|
nuxt: {
|
|
165
172
|
id: "nuxt",
|
|
166
173
|
label: "Nuxt",
|
|
167
|
-
packageName: "
|
|
174
|
+
packageName: "mushi-mushi",
|
|
175
|
+
importPath: "mushi-mushi/vue",
|
|
168
176
|
needsWebPackage: false,
|
|
169
177
|
snippet: () => `// plugins/mushi.client.ts
|
|
170
|
-
import { MushiPlugin } from '
|
|
178
|
+
import { MushiPlugin } from 'mushi-mushi/vue'
|
|
171
179
|
|
|
172
180
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
173
181
|
nuxtApp.vueApp.use(MushiPlugin, {
|
|
@@ -179,10 +187,11 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
179
187
|
svelte: {
|
|
180
188
|
id: "svelte",
|
|
181
189
|
label: "Svelte",
|
|
182
|
-
packageName: "
|
|
190
|
+
packageName: "mushi-mushi",
|
|
191
|
+
importPath: "mushi-mushi/svelte",
|
|
183
192
|
needsWebPackage: false,
|
|
184
193
|
snippet: () => `// src/main.ts
|
|
185
|
-
import { initMushi } from '
|
|
194
|
+
import { initMushi } from 'mushi-mushi/svelte'
|
|
186
195
|
|
|
187
196
|
initMushi({
|
|
188
197
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -192,14 +201,15 @@ initMushi({
|
|
|
192
201
|
sveltekit: {
|
|
193
202
|
id: "sveltekit",
|
|
194
203
|
label: "SvelteKit",
|
|
195
|
-
packageName: "
|
|
204
|
+
packageName: "mushi-mushi",
|
|
205
|
+
importPath: "mushi-mushi/svelte",
|
|
196
206
|
needsWebPackage: false,
|
|
197
207
|
snippet: () => `// src/routes/+layout.svelte
|
|
198
208
|
<script>
|
|
199
209
|
import { onMount } from 'svelte'
|
|
200
210
|
|
|
201
211
|
onMount(async () => {
|
|
202
|
-
const { initMushi } = await import('
|
|
212
|
+
const { initMushi } = await import('mushi-mushi/svelte')
|
|
203
213
|
initMushi({
|
|
204
214
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
205
215
|
apiKey: import.meta.env.VITE_MUSHI_API_KEY,
|
|
@@ -210,10 +220,11 @@ initMushi({
|
|
|
210
220
|
angular: {
|
|
211
221
|
id: "angular",
|
|
212
222
|
label: "Angular",
|
|
213
|
-
packageName: "
|
|
223
|
+
packageName: "mushi-mushi",
|
|
224
|
+
importPath: "mushi-mushi/angular",
|
|
214
225
|
needsWebPackage: false,
|
|
215
226
|
snippet: () => `// src/main.ts
|
|
216
|
-
import { provideMushi } from '
|
|
227
|
+
import { provideMushi } from 'mushi-mushi/angular'
|
|
217
228
|
|
|
218
229
|
bootstrapApplication(AppComponent, {
|
|
219
230
|
providers: [
|
|
@@ -228,6 +239,7 @@ bootstrapApplication(AppComponent, {
|
|
|
228
239
|
id: "expo",
|
|
229
240
|
label: "Expo",
|
|
230
241
|
packageName: "@mushi-mushi/react-native",
|
|
242
|
+
importPath: "@mushi-mushi/react-native",
|
|
231
243
|
needsWebPackage: false,
|
|
232
244
|
snippet: () => `// App.tsx
|
|
233
245
|
import { MushiProvider } from '@mushi-mushi/react-native'
|
|
@@ -247,6 +259,7 @@ export default function App() {
|
|
|
247
259
|
id: "react-native",
|
|
248
260
|
label: "React Native",
|
|
249
261
|
packageName: "@mushi-mushi/react-native",
|
|
262
|
+
importPath: "@mushi-mushi/react-native",
|
|
250
263
|
needsWebPackage: false,
|
|
251
264
|
snippet: () => `// App.tsx
|
|
252
265
|
import { MushiProvider } from '@mushi-mushi/react-native'
|
|
@@ -266,6 +279,7 @@ export default function App() {
|
|
|
266
279
|
id: "capacitor",
|
|
267
280
|
label: "Capacitor (Ionic)",
|
|
268
281
|
packageName: "@mushi-mushi/capacitor",
|
|
282
|
+
importPath: "@mushi-mushi/capacitor",
|
|
269
283
|
needsWebPackage: false,
|
|
270
284
|
/* The Capacitor plugin's public API is `Mushi.configure(...)`, not
|
|
271
285
|
* `Mushi.init(...)` — see packages/capacitor/src/definitions.ts. We
|
|
@@ -284,11 +298,12 @@ await Mushi.configure({
|
|
|
284
298
|
express: {
|
|
285
299
|
id: "express",
|
|
286
300
|
label: "Express",
|
|
287
|
-
packageName: "
|
|
301
|
+
packageName: "mushi-mushi",
|
|
302
|
+
importPath: "mushi-mushi/node",
|
|
288
303
|
needsWebPackage: false,
|
|
289
304
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
290
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
291
|
-
import { mushiExpressErrorHandler } from '
|
|
305
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
306
|
+
import { mushiExpressErrorHandler } from 'mushi-mushi/node/express'
|
|
292
307
|
import type { Express } from 'express'
|
|
293
308
|
|
|
294
309
|
export const mushi = new MushiNodeClient({
|
|
@@ -305,11 +320,12 @@ export function attachMushi(app: Express) {
|
|
|
305
320
|
fastify: {
|
|
306
321
|
id: "fastify",
|
|
307
322
|
label: "Fastify",
|
|
308
|
-
packageName: "
|
|
323
|
+
packageName: "mushi-mushi",
|
|
324
|
+
importPath: "mushi-mushi/node",
|
|
309
325
|
needsWebPackage: false,
|
|
310
326
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
311
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
312
|
-
import { mushiFastifyPlugin } from '
|
|
327
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
328
|
+
import { mushiFastifyPlugin } from 'mushi-mushi/node/fastify'
|
|
313
329
|
import Fastify from 'fastify'
|
|
314
330
|
|
|
315
331
|
export const mushi = new MushiNodeClient({
|
|
@@ -325,11 +341,12 @@ mushiFastifyPlugin(app, { client: mushi })`
|
|
|
325
341
|
hono: {
|
|
326
342
|
id: "hono",
|
|
327
343
|
label: "Hono",
|
|
328
|
-
packageName: "
|
|
344
|
+
packageName: "mushi-mushi",
|
|
345
|
+
importPath: "mushi-mushi/node",
|
|
329
346
|
needsWebPackage: false,
|
|
330
347
|
snippet: () => `// src/instrument.ts \u2014 load with: node --import ./dist/instrument.js
|
|
331
|
-
import { MushiNodeClient, attachUnhandledHook } from '
|
|
332
|
-
import { mushiHonoErrorHandler } from '
|
|
348
|
+
import { MushiNodeClient, attachUnhandledHook } from 'mushi-mushi/node'
|
|
349
|
+
import { mushiHonoErrorHandler } from 'mushi-mushi/node/hono'
|
|
333
350
|
import { Hono } from 'hono'
|
|
334
351
|
|
|
335
352
|
export const mushi = new MushiNodeClient({
|
|
@@ -349,10 +366,11 @@ app.onError(
|
|
|
349
366
|
vanilla: {
|
|
350
367
|
id: "vanilla",
|
|
351
368
|
label: "Vanilla JS / unknown",
|
|
352
|
-
packageName: "
|
|
369
|
+
packageName: "mushi-mushi",
|
|
370
|
+
importPath: "mushi-mushi",
|
|
353
371
|
needsWebPackage: false,
|
|
354
372
|
snippet: () => `// Anywhere in your client bundle
|
|
355
|
-
import { Mushi } from '
|
|
373
|
+
import { Mushi } from 'mushi-mushi'
|
|
356
374
|
|
|
357
375
|
Mushi.init({
|
|
358
376
|
projectId: import.meta.env.VITE_MUSHI_PROJECT_ID,
|
|
@@ -360,6 +378,15 @@ Mushi.init({
|
|
|
360
378
|
})`
|
|
361
379
|
}
|
|
362
380
|
};
|
|
381
|
+
var UMBRELLA_PACKAGE = "mushi-mushi";
|
|
382
|
+
function isMushiSdkPackage(name) {
|
|
383
|
+
return name === UMBRELLA_PACKAGE || name.startsWith("@mushi-mushi/");
|
|
384
|
+
}
|
|
385
|
+
function isLauncherOnly(name, spec) {
|
|
386
|
+
if (name !== UMBRELLA_PACKAGE || !spec) return false;
|
|
387
|
+
const m = /^[\^~>=<\sv]*(\d+)\./.exec(spec);
|
|
388
|
+
return m ? Number(m[1]) === 0 : false;
|
|
389
|
+
}
|
|
363
390
|
function readPackageJson(cwd) {
|
|
364
391
|
const path = join(cwd, "package.json");
|
|
365
392
|
if (!existsSync(path)) return null;
|
|
@@ -467,6 +494,8 @@ export {
|
|
|
467
494
|
FRAMEWORK_IDS,
|
|
468
495
|
isFrameworkId,
|
|
469
496
|
FRAMEWORKS,
|
|
497
|
+
isMushiSdkPackage,
|
|
498
|
+
isLauncherOnly,
|
|
470
499
|
readPackageJson,
|
|
471
500
|
detectFramework,
|
|
472
501
|
detectPackageManager,
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
detectFramework,
|
|
4
4
|
envVarsToWrite,
|
|
5
5
|
readPackageJson
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CG5KPP4S.js";
|
|
7
7
|
import {
|
|
8
8
|
CONFIG_PATH,
|
|
9
9
|
requireUuid,
|
|
10
10
|
saveConfig,
|
|
11
11
|
savedSdkKeyFor
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PPES6C4Y.js";
|
|
13
13
|
import {
|
|
14
14
|
MUSHI_MCP_PIN_SPEC
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JQPLY3ZT.js";
|
|
16
16
|
import {
|
|
17
17
|
assertEndpoint,
|
|
18
18
|
normalizeEndpoint
|
|
@@ -348,7 +348,7 @@ async function runConnect(opts, baseConfig = {}) {
|
|
|
348
348
|
const deps = { ...pkg?.dependencies ?? {}, ...pkg?.devDependencies ?? {} };
|
|
349
349
|
if (deps["@capacitor/core"] && deps["react"]) {
|
|
350
350
|
messages.push(
|
|
351
|
-
"\u2139 Capacitor + React detected \u2014 install
|
|
351
|
+
"\u2139 Capacitor + React detected \u2014 install mushi-mushi (import from mushi-mushi/react) and call initMushi() in main.tsx. Optional @mushi-mushi/capacitor for native shell parity."
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
requireConfig,
|
|
9
9
|
requireUuid,
|
|
10
10
|
tryLoadWorkerKey
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PPES6C4Y.js";
|
|
12
12
|
import {
|
|
13
13
|
MUSHI_CLI_VERSION
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JQPLY3ZT.js";
|
|
15
15
|
|
|
16
16
|
// src/worker/daemon.ts
|
|
17
17
|
import { existsSync as existsSync6, readFileSync as readFileSync5 } from "fs";
|
|
@@ -1613,7 +1613,7 @@ function registerWorkCommands(program) {
|
|
|
1613
1613
|
if (opts.repoDir || opts.report || opts.followups || opts.recheck) {
|
|
1614
1614
|
throw new MushiCliError("E_INVALID_INPUT", "--daemon takes its lanes and clones from the worker config, not from --repo-dir, --report or --followups.", "mushi worker install");
|
|
1615
1615
|
}
|
|
1616
|
-
const { runDaemon: runDaemon2 } = await import("./daemon-
|
|
1616
|
+
const { runDaemon: runDaemon2 } = await import("./daemon-ASMMT73O.js");
|
|
1617
1617
|
await runDaemon2({ configPath: opts.workerConfig, ...opts.agent !== void 0 ? { agent } : {}, ...opts.anyRepo ? { anyRepo: true } : {} });
|
|
1618
1618
|
return;
|
|
1619
1619
|
}
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
saveConfig,
|
|
7
7
|
savedSdkKeyFor,
|
|
8
8
|
waitForIngestReady
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BG2TVTBN.js";
|
|
10
10
|
import {
|
|
11
11
|
MUSHI_MCP_PIN_SPEC
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HQM2WZVF.js";
|
|
13
13
|
import {
|
|
14
14
|
detectFramework,
|
|
15
15
|
envVarsToWrite,
|
|
16
16
|
readPackageJson
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AWASJDQI.js";
|
|
18
18
|
import {
|
|
19
19
|
assertEndpoint
|
|
20
20
|
} from "./chunk-2DMHQVRU.js";
|
|
@@ -174,7 +174,7 @@ async function runConnect(opts, baseConfig = {}) {
|
|
|
174
174
|
const deps = { ...pkg?.dependencies ?? {}, ...pkg?.devDependencies ?? {} };
|
|
175
175
|
if (deps["@capacitor/core"] && deps["react"]) {
|
|
176
176
|
messages.push(
|
|
177
|
-
"\u2139 Capacitor + React detected \u2014 install
|
|
177
|
+
"\u2139 Capacitor + React detected \u2014 install mushi-mushi (import from mushi-mushi/react) and call initMushi() in main.tsx. Optional @mushi-mushi/capacitor for native shell parity."
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
180
|
}
|