tauri-plugin-debug-tools 0.1.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/AGENTS.md +346 -0
- package/LICENSE +21 -0
- package/README.md +303 -0
- package/dist-js/consoleLogger.d.ts +92 -0
- package/dist-js/consoleLogger.d.ts.map +1 -0
- package/dist-js/consoleLogger.js +317 -0
- package/dist-js/debugBridge.d.ts +50 -0
- package/dist-js/debugBridge.d.ts.map +1 -0
- package/dist-js/debugBridge.js +66 -0
- package/dist-js/index.d.ts +3 -0
- package/dist-js/index.d.ts.map +1 -0
- package/dist-js/index.js +2 -0
- package/dist-js/logAdapter.d.ts +36 -0
- package/dist-js/logAdapter.d.ts.map +1 -0
- package/dist-js/logAdapter.js +42 -0
- package/dist-js/screenshotHelper.d.ts +60 -0
- package/dist-js/screenshotHelper.d.ts.map +1 -0
- package/dist-js/screenshotHelper.js +100 -0
- package/examples/.vscode/extensions.json +3 -0
- package/examples/README.md +51 -0
- package/examples/bun.lock +265 -0
- package/examples/package.json +19 -0
- package/examples/src/assets/javascript.svg +1 -0
- package/examples/src/assets/tauri.svg +6 -0
- package/examples/src/index.html +56 -0
- package/examples/src/main.js +91 -0
- package/examples/src/styles.css +112 -0
- package/examples/src-tauri/Cargo.lock +5674 -0
- package/examples/src-tauri/Cargo.toml +25 -0
- package/examples/src-tauri/build.rs +3 -0
- package/examples/src-tauri/capabilities/default.json +7 -0
- package/examples/src-tauri/icons/128x128.png +0 -0
- package/examples/src-tauri/icons/128x128@2x.png +0 -0
- package/examples/src-tauri/icons/32x32.png +0 -0
- package/examples/src-tauri/icons/Square107x107Logo.png +0 -0
- package/examples/src-tauri/icons/Square142x142Logo.png +0 -0
- package/examples/src-tauri/icons/Square150x150Logo.png +0 -0
- package/examples/src-tauri/icons/Square284x284Logo.png +0 -0
- package/examples/src-tauri/icons/Square30x30Logo.png +0 -0
- package/examples/src-tauri/icons/Square310x310Logo.png +0 -0
- package/examples/src-tauri/icons/Square44x44Logo.png +0 -0
- package/examples/src-tauri/icons/Square71x71Logo.png +0 -0
- package/examples/src-tauri/icons/Square89x89Logo.png +0 -0
- package/examples/src-tauri/icons/StoreLogo.png +0 -0
- package/examples/src-tauri/icons/icon.icns +0 -0
- package/examples/src-tauri/icons/icon.ico +0 -0
- package/examples/src-tauri/icons/icon.png +0 -0
- package/examples/src-tauri/src/lib.rs +15 -0
- package/examples/src-tauri/src/main.rs +6 -0
- package/examples/src-tauri/tauri.conf.json +33 -0
- package/examples/tests/e2e.mac.test.ts +203 -0
- package/examples/tests/e2e.test.ts +131 -0
- package/examples/vitest.config.ts +10 -0
- package/guest-js/consoleLogger.ts +369 -0
- package/guest-js/debugBridge.ts +93 -0
- package/guest-js/index.ts +2 -0
- package/guest-js/logAdapter.ts +62 -0
- package/guest-js/screenshotHelper.ts +122 -0
- package/package.json +84 -0
- package/permissions/autogenerated/commands/append_debug_logs.toml +13 -0
- package/permissions/autogenerated/commands/capture_webview_state.toml +13 -0
- package/permissions/autogenerated/commands/get_console_logs.toml +13 -0
- package/permissions/autogenerated/commands/reset_debug_logs.toml +13 -0
- package/permissions/autogenerated/commands/send_debug_command.toml +13 -0
- package/permissions/autogenerated/commands/write_debug_snapshot.toml +13 -0
- package/permissions/autogenerated/reference.md +201 -0
- package/permissions/debug-with-logging.toml +26 -0
- package/permissions/default.toml +26 -0
- package/permissions/schemas/schema.json +384 -0
- package/skills/debug-tauri/SKILL.md +114 -0
- package/skills/debug-tauri/references/IPC_COMMANDS.md +196 -0
- package/skills/debug-tauri/references/LOGGING.md +195 -0
- package/skills/debug-tauri/references/MIGRATION.md +487 -0
- package/skills/debug-tauri/references/REFERENCE.md +206 -0
- package/skills/debug-tauri/references/REPORT_TEMPLATE.md +166 -0
- package/skills/debug-tauri/references/SCREENSHOTS.md +193 -0
- package/skills/debug-tauri/references/TROUBLESHOOTING.md +144 -0
- package/skills/debug-tauri/scripts/analyze_logs.sh +127 -0
- package/skills/debug-tauri/scripts/capture.sh +89 -0
- package/skills/debug-tauri/scripts/validate_setup.sh +181 -0
- package/src/commands.rs +147 -0
- package/src/lib.rs +41 -0
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tauri-plugin-debug-tools",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Comprehensive debug utilities for Tauri WebView applications with AI-powered automated debugging workflows",
|
|
5
|
+
"license": "MIT OR Apache-2.0",
|
|
6
|
+
"author": "8beeeaaat <8beeeaaat@gmail.com>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/8beeeaaat/tauri-plugin-debug-tools.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/8beeeaaat/tauri-plugin-debug-tools/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/8beeeaaat/tauri-plugin-debug-tools#readme",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"tauri",
|
|
17
|
+
"plugin",
|
|
18
|
+
"debug",
|
|
19
|
+
"webview",
|
|
20
|
+
"logging",
|
|
21
|
+
"debugging",
|
|
22
|
+
"console",
|
|
23
|
+
"ai-agent",
|
|
24
|
+
"codex"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"types": "./dist-js/index.d.ts",
|
|
28
|
+
"main": "./dist-js/index.js",
|
|
29
|
+
"module": "./dist-js/index.js",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist-js/index.d.ts",
|
|
33
|
+
"import": "./dist-js/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./consoleLogger": {
|
|
36
|
+
"types": "./dist-js/consoleLogger.d.ts",
|
|
37
|
+
"import": "./dist-js/consoleLogger.js"
|
|
38
|
+
},
|
|
39
|
+
"./debugBridge": {
|
|
40
|
+
"types": "./dist-js/debugBridge.d.ts",
|
|
41
|
+
"import": "./dist-js/debugBridge.js"
|
|
42
|
+
},
|
|
43
|
+
"./logAdapter": {
|
|
44
|
+
"types": "./dist-js/logAdapter.d.ts",
|
|
45
|
+
"import": "./dist-js/logAdapter.js"
|
|
46
|
+
},
|
|
47
|
+
"./screenshotHelper": {
|
|
48
|
+
"types": "./dist-js/screenshotHelper.d.ts",
|
|
49
|
+
"import": "./dist-js/screenshotHelper.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsc -p tsconfig.json",
|
|
54
|
+
"format": "biome check --fix",
|
|
55
|
+
"lint": "run-p lint:*",
|
|
56
|
+
"lint:biome": "biome check",
|
|
57
|
+
"lint:tsc": "tsc --noEmit",
|
|
58
|
+
"test": "vitest run --config vitest.config.ts"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"dist-js",
|
|
62
|
+
"guest-js",
|
|
63
|
+
"permissions",
|
|
64
|
+
"skills",
|
|
65
|
+
"examples",
|
|
66
|
+
"src",
|
|
67
|
+
"LICENSE",
|
|
68
|
+
"README.md",
|
|
69
|
+
"AGENTS.md"
|
|
70
|
+
],
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@tauri-apps/api": "^2.9.1",
|
|
73
|
+
"@tauri-apps/plugin-log": "^2.7.1",
|
|
74
|
+
"tauri-plugin-screenshots-api": "^2.2.0"
|
|
75
|
+
},
|
|
76
|
+
"devDependencies": {
|
|
77
|
+
"@biomejs/biome": "^2.3.10",
|
|
78
|
+
"@types/node": "^25.0.3",
|
|
79
|
+
"bun-types": "^1.3.5",
|
|
80
|
+
"npm-run-all": "^4.1.5",
|
|
81
|
+
"typescript": "^5.9.3",
|
|
82
|
+
"vitest": "^4.0.16"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-append-debug-logs"
|
|
7
|
+
description = "Enables the append_debug_logs command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["append_debug_logs"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-append-debug-logs"
|
|
12
|
+
description = "Denies the append_debug_logs command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["append_debug_logs"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-capture-webview-state"
|
|
7
|
+
description = "Enables the capture_webview_state command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["capture_webview_state"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-capture-webview-state"
|
|
12
|
+
description = "Denies the capture_webview_state command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["capture_webview_state"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-get-console-logs"
|
|
7
|
+
description = "Enables the get_console_logs command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["get_console_logs"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-get-console-logs"
|
|
12
|
+
description = "Denies the get_console_logs command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["get_console_logs"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-reset-debug-logs"
|
|
7
|
+
description = "Enables the reset_debug_logs command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["reset_debug_logs"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-reset-debug-logs"
|
|
12
|
+
description = "Denies the reset_debug_logs command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["reset_debug_logs"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-send-debug-command"
|
|
7
|
+
description = "Enables the send_debug_command command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["send_debug_command"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-send-debug-command"
|
|
12
|
+
description = "Denies the send_debug_command command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["send_debug_command"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Automatically generated - DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
"$schema" = "../../schemas/schema.json"
|
|
4
|
+
|
|
5
|
+
[[permission]]
|
|
6
|
+
identifier = "allow-write-debug-snapshot"
|
|
7
|
+
description = "Enables the write_debug_snapshot command without any pre-configured scope."
|
|
8
|
+
commands.allow = ["write_debug_snapshot"]
|
|
9
|
+
|
|
10
|
+
[[permission]]
|
|
11
|
+
identifier = "deny-write-debug-snapshot"
|
|
12
|
+
description = "Denies the write_debug_snapshot command without any pre-configured scope."
|
|
13
|
+
commands.deny = ["write_debug_snapshot"]
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
## Default Permission
|
|
2
|
+
|
|
3
|
+
Allows debug-tools commands for WebView inspection and log capture.
|
|
4
|
+
|
|
5
|
+
#### Granted Permissions
|
|
6
|
+
|
|
7
|
+
All debug-tools commands are enabled by default.
|
|
8
|
+
|
|
9
|
+
#### Note
|
|
10
|
+
|
|
11
|
+
For full functionality, also enable official plugins:
|
|
12
|
+
- `log:default` for automatic console log collection
|
|
13
|
+
- `screenshots:default` for cross-platform screenshot capture
|
|
14
|
+
|
|
15
|
+
#### This default permission set includes the following:
|
|
16
|
+
|
|
17
|
+
- `allow-capture-webview-state`
|
|
18
|
+
- `allow-get-console-logs`
|
|
19
|
+
- `allow-send-debug-command`
|
|
20
|
+
- `allow-append-debug-logs`
|
|
21
|
+
- `allow-reset-debug-logs`
|
|
22
|
+
- `allow-write-debug-snapshot`
|
|
23
|
+
|
|
24
|
+
## Permission Table
|
|
25
|
+
|
|
26
|
+
<table>
|
|
27
|
+
<tr>
|
|
28
|
+
<th>Identifier</th>
|
|
29
|
+
<th>Description</th>
|
|
30
|
+
</tr>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
<tr>
|
|
34
|
+
<td>
|
|
35
|
+
|
|
36
|
+
`debug-tools:allow-append-debug-logs`
|
|
37
|
+
|
|
38
|
+
</td>
|
|
39
|
+
<td>
|
|
40
|
+
|
|
41
|
+
Enables the append_debug_logs command without any pre-configured scope.
|
|
42
|
+
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
|
|
46
|
+
<tr>
|
|
47
|
+
<td>
|
|
48
|
+
|
|
49
|
+
`debug-tools:deny-append-debug-logs`
|
|
50
|
+
|
|
51
|
+
</td>
|
|
52
|
+
<td>
|
|
53
|
+
|
|
54
|
+
Denies the append_debug_logs command without any pre-configured scope.
|
|
55
|
+
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
|
|
59
|
+
<tr>
|
|
60
|
+
<td>
|
|
61
|
+
|
|
62
|
+
`debug-tools:allow-capture-webview-state`
|
|
63
|
+
|
|
64
|
+
</td>
|
|
65
|
+
<td>
|
|
66
|
+
|
|
67
|
+
Enables the capture_webview_state command without any pre-configured scope.
|
|
68
|
+
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
71
|
+
|
|
72
|
+
<tr>
|
|
73
|
+
<td>
|
|
74
|
+
|
|
75
|
+
`debug-tools:deny-capture-webview-state`
|
|
76
|
+
|
|
77
|
+
</td>
|
|
78
|
+
<td>
|
|
79
|
+
|
|
80
|
+
Denies the capture_webview_state command without any pre-configured scope.
|
|
81
|
+
|
|
82
|
+
</td>
|
|
83
|
+
</tr>
|
|
84
|
+
|
|
85
|
+
<tr>
|
|
86
|
+
<td>
|
|
87
|
+
|
|
88
|
+
`debug-tools:allow-get-console-logs`
|
|
89
|
+
|
|
90
|
+
</td>
|
|
91
|
+
<td>
|
|
92
|
+
|
|
93
|
+
Enables the get_console_logs command without any pre-configured scope.
|
|
94
|
+
|
|
95
|
+
</td>
|
|
96
|
+
</tr>
|
|
97
|
+
|
|
98
|
+
<tr>
|
|
99
|
+
<td>
|
|
100
|
+
|
|
101
|
+
`debug-tools:deny-get-console-logs`
|
|
102
|
+
|
|
103
|
+
</td>
|
|
104
|
+
<td>
|
|
105
|
+
|
|
106
|
+
Denies the get_console_logs command without any pre-configured scope.
|
|
107
|
+
|
|
108
|
+
</td>
|
|
109
|
+
</tr>
|
|
110
|
+
|
|
111
|
+
<tr>
|
|
112
|
+
<td>
|
|
113
|
+
|
|
114
|
+
`debug-tools:allow-reset-debug-logs`
|
|
115
|
+
|
|
116
|
+
</td>
|
|
117
|
+
<td>
|
|
118
|
+
|
|
119
|
+
Enables the reset_debug_logs command without any pre-configured scope.
|
|
120
|
+
|
|
121
|
+
</td>
|
|
122
|
+
</tr>
|
|
123
|
+
|
|
124
|
+
<tr>
|
|
125
|
+
<td>
|
|
126
|
+
|
|
127
|
+
`debug-tools:deny-reset-debug-logs`
|
|
128
|
+
|
|
129
|
+
</td>
|
|
130
|
+
<td>
|
|
131
|
+
|
|
132
|
+
Denies the reset_debug_logs command without any pre-configured scope.
|
|
133
|
+
|
|
134
|
+
</td>
|
|
135
|
+
</tr>
|
|
136
|
+
|
|
137
|
+
<tr>
|
|
138
|
+
<td>
|
|
139
|
+
|
|
140
|
+
`debug-tools:allow-send-debug-command`
|
|
141
|
+
|
|
142
|
+
</td>
|
|
143
|
+
<td>
|
|
144
|
+
|
|
145
|
+
Enables the send_debug_command command without any pre-configured scope.
|
|
146
|
+
|
|
147
|
+
</td>
|
|
148
|
+
</tr>
|
|
149
|
+
|
|
150
|
+
<tr>
|
|
151
|
+
<td>
|
|
152
|
+
|
|
153
|
+
`debug-tools:deny-send-debug-command`
|
|
154
|
+
|
|
155
|
+
</td>
|
|
156
|
+
<td>
|
|
157
|
+
|
|
158
|
+
Denies the send_debug_command command without any pre-configured scope.
|
|
159
|
+
|
|
160
|
+
</td>
|
|
161
|
+
</tr>
|
|
162
|
+
|
|
163
|
+
<tr>
|
|
164
|
+
<td>
|
|
165
|
+
|
|
166
|
+
`debug-tools:allow-write-debug-snapshot`
|
|
167
|
+
|
|
168
|
+
</td>
|
|
169
|
+
<td>
|
|
170
|
+
|
|
171
|
+
Enables the write_debug_snapshot command without any pre-configured scope.
|
|
172
|
+
|
|
173
|
+
</td>
|
|
174
|
+
</tr>
|
|
175
|
+
|
|
176
|
+
<tr>
|
|
177
|
+
<td>
|
|
178
|
+
|
|
179
|
+
`debug-tools:deny-write-debug-snapshot`
|
|
180
|
+
|
|
181
|
+
</td>
|
|
182
|
+
<td>
|
|
183
|
+
|
|
184
|
+
Denies the write_debug_snapshot command without any pre-configured scope.
|
|
185
|
+
|
|
186
|
+
</td>
|
|
187
|
+
</tr>
|
|
188
|
+
|
|
189
|
+
<tr>
|
|
190
|
+
<td>
|
|
191
|
+
|
|
192
|
+
`debug-tools:debug-with-logging`
|
|
193
|
+
|
|
194
|
+
</td>
|
|
195
|
+
<td>
|
|
196
|
+
|
|
197
|
+
Debug tools with official logging and screenshots
|
|
198
|
+
|
|
199
|
+
</td>
|
|
200
|
+
</tr>
|
|
201
|
+
</table>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Debug tools with official logging and screenshots plugins
|
|
2
|
+
#
|
|
3
|
+
# This permission set includes:
|
|
4
|
+
# - Core debug-tools permissions
|
|
5
|
+
# - Official tauri-plugin-log permissions
|
|
6
|
+
# - Official tauri-plugin-screenshots permissions
|
|
7
|
+
|
|
8
|
+
[[permission]]
|
|
9
|
+
identifier = "debug-with-logging"
|
|
10
|
+
description = "Debug tools with official logging and screenshots"
|
|
11
|
+
commands.allow = [
|
|
12
|
+
# Debug tools commands
|
|
13
|
+
"capture_webview_state",
|
|
14
|
+
"get_console_logs",
|
|
15
|
+
"send_debug_command",
|
|
16
|
+
"append_debug_logs",
|
|
17
|
+
"reset_debug_logs",
|
|
18
|
+
"write_debug_snapshot"
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
# Include official plugin permissions
|
|
22
|
+
permissions = [
|
|
23
|
+
"core:default",
|
|
24
|
+
"log:default",
|
|
25
|
+
"screenshots:default"
|
|
26
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"$schema" = "schemas/schema.json"
|
|
2
|
+
|
|
3
|
+
[default]
|
|
4
|
+
description = """
|
|
5
|
+
Allows debug-tools commands for WebView inspection and log capture.
|
|
6
|
+
|
|
7
|
+
#### Granted Permissions
|
|
8
|
+
|
|
9
|
+
All debug-tools commands are enabled by default.
|
|
10
|
+
|
|
11
|
+
#### Note
|
|
12
|
+
|
|
13
|
+
For full functionality, also enable official plugins:
|
|
14
|
+
- `log:default` for automatic console log collection
|
|
15
|
+
- `screenshots:default` for cross-platform screenshot capture
|
|
16
|
+
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
permissions = [
|
|
20
|
+
"allow-capture-webview-state",
|
|
21
|
+
"allow-get-console-logs",
|
|
22
|
+
"allow-send-debug-command",
|
|
23
|
+
"allow-append-debug-logs",
|
|
24
|
+
"allow-reset-debug-logs",
|
|
25
|
+
"allow-write-debug-snapshot",
|
|
26
|
+
]
|