@mushi-mushi/svelte 0.1.0 → 0.2.1
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 +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +75 -65
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# @mushi-mushi/svelte
|
|
2
2
|
|
|
3
|
-
Svelte SDK for Mushi Mushi bug reporting.
|
|
3
|
+
Svelte SDK for Mushi Mushi bug reporting. **API-only** — captures errors and submits reports but does not include the widget UI. Add `@mushi-mushi/web` alongside this package for the full Shadow DOM widget experience.
|
|
4
|
+
|
|
5
|
+
> **One-command setup:** `npx mushi-mushi` auto-detects Svelte / SvelteKit and installs this package + `@mushi-mushi/web`.
|
|
6
|
+
>
|
|
7
|
+
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/react-native`](https://npmjs.com/package/@mushi-mushi/react-native) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) · [`@mushi-mushi/web`](https://npmjs.com/package/@mushi-mushi/web) (vanilla JS)
|
|
4
8
|
|
|
5
9
|
## Usage
|
|
6
10
|
|
|
@@ -14,6 +18,16 @@ const mushi = getMushi()
|
|
|
14
18
|
mushi.submitReport({ title: 'broken', description: '...' })
|
|
15
19
|
```
|
|
16
20
|
|
|
21
|
+
### With Widget UI
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { initMushi } from '@mushi-mushi/svelte'
|
|
25
|
+
import { Mushi } from '@mushi-mushi/web'
|
|
26
|
+
|
|
27
|
+
initMushi({ projectId: 'proj_xxx', apiKey: 'mushi_xxx' })
|
|
28
|
+
Mushi.init({ projectId: 'proj_xxx', apiKey: 'mushi_xxx' })
|
|
29
|
+
```
|
|
30
|
+
|
|
17
31
|
### SvelteKit error handler
|
|
18
32
|
|
|
19
33
|
```ts
|
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ function initMushi(config) {
|
|
|
48
48
|
_client = (0, import_core.createApiClient)({
|
|
49
49
|
projectId: config.projectId,
|
|
50
50
|
apiKey: config.apiKey,
|
|
51
|
-
apiEndpoint: config.endpoint
|
|
51
|
+
...config.endpoint ? { apiEndpoint: config.endpoint } : {}
|
|
52
52
|
});
|
|
53
53
|
_instance = {
|
|
54
54
|
async submitReport(data) {
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ function initMushi(config) {
|
|
|
22
22
|
_client = createApiClient({
|
|
23
23
|
projectId: config.projectId,
|
|
24
24
|
apiKey: config.apiKey,
|
|
25
|
-
apiEndpoint: config.endpoint
|
|
25
|
+
...config.endpoint ? { apiEndpoint: config.endpoint } : {}
|
|
26
26
|
});
|
|
27
27
|
_instance = {
|
|
28
28
|
async submitReport(data) {
|
package/package.json
CHANGED
|
@@ -1,65 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@mushi-mushi/svelte",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"description": "Svelte SDK for Mushi Mushi — context-based init, SvelteKit error hook integration",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"url": "https://github.com/kensaurus/mushi-mushi
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
"types": "./dist/index.d.
|
|
60
|
-
"default": "./dist/index.
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@mushi-mushi/svelte",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Svelte SDK for Mushi Mushi — context-based init, SvelteKit error hook integration",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"svelte": ">=4"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@mushi-mushi/core": "^0.2.1"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"eslint": "^10.2.0",
|
|
17
|
+
"svelte": "^5.0.0",
|
|
18
|
+
"tsup": "^8.5.1",
|
|
19
|
+
"typescript": "^6.0.2",
|
|
20
|
+
"vitest": "^4.1.4",
|
|
21
|
+
"@mushi-mushi/eslint-config": "0.0.0"
|
|
22
|
+
},
|
|
23
|
+
"author": "Kenji Sakuramoto",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/kensaurus/mushi-mushi.git",
|
|
27
|
+
"directory": "packages/svelte"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/kensaurus/mushi-mushi/tree/main/packages/svelte#readme",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/kensaurus/mushi-mushi/issues"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"sideEffects": false,
|
|
42
|
+
"keywords": [
|
|
43
|
+
"mushi-mushi",
|
|
44
|
+
"bug-reporting",
|
|
45
|
+
"user-feedback",
|
|
46
|
+
"svelte",
|
|
47
|
+
"sveltekit",
|
|
48
|
+
"session-replay",
|
|
49
|
+
"screenshot",
|
|
50
|
+
"shake-to-report",
|
|
51
|
+
"sentry-companion",
|
|
52
|
+
"error-tracking",
|
|
53
|
+
"ai-triage",
|
|
54
|
+
"sdk"
|
|
55
|
+
],
|
|
56
|
+
"exports": {
|
|
57
|
+
".": {
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"default": "./dist/index.js"
|
|
61
|
+
},
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./dist/index.d.cts",
|
|
64
|
+
"default": "./dist/index.cjs"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"type": "module",
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsup",
|
|
71
|
+
"lint": "eslint src/",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"typecheck": "tsc --noEmit"
|
|
74
|
+
}
|
|
75
|
+
}
|