@pubinfo-pr/devtools 0.220.2 → 0.220.4

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.
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * - UnoCSS:直接复用 Uno 的内置面板(iframe 方式)。
6
6
  * - Server Router:本项目提供的服务路由调试面板。
7
+ * - Issue:快速提交 Bug Report 到 GitHub。
7
8
  */
8
9
  declare function setupDevtoolsPanel(): void;
9
10
  //#endregion
@@ -1,5 +1,95 @@
1
1
  import { addCustomTab } from "@vue/devtools-api";
2
2
 
3
+ //#region src/panel/component.ts
4
+ function setupComponentPanel() {
5
+ addCustomTab({
6
+ name: "pubinfo-component",
7
+ title: "Components 使用",
8
+ icon: "/__pubinfo_devtools/component.svg",
9
+ view: {
10
+ type: "iframe",
11
+ src: "/__pubinfo_devtools/#/component"
12
+ },
13
+ category: "modules"
14
+ });
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/panel/icones.ts
19
+ /**
20
+ * 在 Vue Devtools 中挂载 Icones 面板。
21
+ * 以 iframe 的方式嵌入 Icones 提供的 UI(依赖于宿主 app 的 devserver)。
22
+ */
23
+ function setupIconesPanel() {
24
+ addCustomTab({
25
+ name: "icones",
26
+ title: "Icones",
27
+ icon: `https://icon.elonehoo.cn/favicon.svg`,
28
+ view: {
29
+ type: "iframe",
30
+ src: "https://icon.elonehoo.cn"
31
+ },
32
+ category: "advanced"
33
+ });
34
+ }
35
+
36
+ //#endregion
37
+ //#region src/panel/import.ts
38
+ function setupImportPanel() {
39
+ addCustomTab({
40
+ name: "pubinfo-import",
41
+ title: "Composables 使用",
42
+ icon: "/__pubinfo_devtools/import.svg",
43
+ view: {
44
+ type: "iframe",
45
+ src: "/__pubinfo_devtools/#/import"
46
+ },
47
+ category: "modules"
48
+ });
49
+ }
50
+
51
+ //#endregion
52
+ //#region src/panel/issue.ts
53
+ /**
54
+ * 注册 Issue 提交面板。
55
+ *
56
+ * 在 DevTools 中提供一个快速提交 Bug Report 的入口,
57
+ * 用户可以填写信息后跳转到 GitHub 创建 Issue。
58
+ */
59
+ function setupIssuePanel() {
60
+ addCustomTab({
61
+ name: "pubinfo-issue",
62
+ title: "提交 Bug",
63
+ icon: "/__pubinfo_devtools/issue.svg",
64
+ view: {
65
+ type: "iframe",
66
+ src: "/__pubinfo_devtools/#/issue"
67
+ },
68
+ category: "advanced"
69
+ });
70
+ }
71
+
72
+ //#endregion
73
+ //#region src/panel/overview.ts
74
+ /**
75
+ * 注册 API 路由调试面板(Server Router)。
76
+ *
77
+ * 面板将展示通过 devtools 扫描到的 API 列表,并提供请求调试能力。
78
+ */
79
+ function setupOverviewPanel() {
80
+ addCustomTab({
81
+ name: "pubinfo-overview",
82
+ title: "腾龙总览",
83
+ icon: "/__pubinfo_devtools/logo.svg",
84
+ view: {
85
+ type: "iframe",
86
+ src: "/__pubinfo_devtools/"
87
+ },
88
+ category: "modules"
89
+ });
90
+ }
91
+
92
+ //#endregion
3
93
  //#region src/panel/server-router.ts
4
94
  /**
5
95
  * 注册 API 路由调试面板(Server Router)。
@@ -9,7 +99,7 @@ import { addCustomTab } from "@vue/devtools-api";
9
99
  function setupServerRouterPanel() {
10
100
  addCustomTab({
11
101
  name: "server-router",
12
- title: "Server Router",
102
+ title: "API 调试",
13
103
  icon: "/__pubinfo_devtools/cloud.svg",
14
104
  view: {
15
105
  type: "iframe",
@@ -45,10 +135,16 @@ function setupUnoCSSPanel() {
45
135
  *
46
136
  * - UnoCSS:直接复用 Uno 的内置面板(iframe 方式)。
47
137
  * - Server Router:本项目提供的服务路由调试面板。
138
+ * - Issue:快速提交 Bug Report 到 GitHub。
48
139
  */
49
140
  function setupDevtoolsPanel() {
141
+ setupOverviewPanel();
50
142
  setupUnoCSSPanel();
51
143
  setupServerRouterPanel();
144
+ setupComponentPanel();
145
+ setupImportPanel();
146
+ setupIconesPanel();
147
+ setupIssuePanel();
52
148
  }
53
149
 
54
150
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo-pr/devtools",
3
3
  "type": "module",
4
- "version": "0.220.2",
4
+ "version": "0.220.4",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -27,6 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@vue/devtools-api": "^8.0.6",
30
+ "@ast-grep/napi": "^0.39.7",
30
31
  "ansis": "^4.2.0",
31
32
  "sirv": "^3.0.2",
32
33
  "unconfig": "^7.4.2"
@@ -35,8 +36,11 @@
35
36
  "@unocss/reset": "^66.6.0",
36
37
  "@vitejs/plugin-vue": "^6.0.4",
37
38
  "@vueuse/core": "^14.2.1",
39
+ "find-up-simple": "^1.0.1",
38
40
  "floating-vue": "5.2.2",
41
+ "pathe": "^2.0.3",
39
42
  "rimraf": "^6.1.2",
43
+ "scule": "^1.3.0",
40
44
  "shiki": "^3.22.0",
41
45
  "splitpanes": "^4.0.4",
42
46
  "tsdown": "^0.20.3",
@@ -54,6 +58,7 @@
54
58
  "dev:client": "vite build src/client --watch",
55
59
  "build": "rimraf dist && pnpm run --sequential /^build:/",
56
60
  "build:client": "vite build src/client",
57
- "build:server": "tsdown"
61
+ "build:server": "tsdown",
62
+ "export": "tsx ./scripts/api.ts"
58
63
  }
59
64
  }