@dimina-kit/devtools 0.4.0-dev.20260618090552 → 0.4.0-dev.20260624040247
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 +5 -1
- package/dist/main/app/app.js +14 -2
- package/dist/main/index.bundle.js +347 -99
- package/dist/main/ipc/bridge-router.js +13 -8
- package/dist/main/ipc/projects.js +1 -1
- package/dist/main/ipc/simulator.js +1 -1
- package/dist/main/runtime/miniapp-runtime.d.ts +3 -3
- package/dist/main/services/elements-forward/index.js +5 -5
- package/dist/main/services/network-forward/index.d.ts +5 -6
- package/dist/main/services/network-forward/index.js +9 -10
- package/dist/main/services/notifications/renderer-notifier.d.ts +3 -4
- package/dist/main/services/projects/index.js +1 -1
- package/dist/main/services/service-console/console-api.d.ts +5 -6
- package/dist/main/services/service-console/console-api.js +5 -6
- package/dist/main/services/service-host-pool/pool.d.ts +2 -3
- package/dist/main/services/simulator-storage/index.d.ts +2 -4
- package/dist/main/services/simulator-storage/index.js +2 -4
- package/dist/main/services/simulator-temp-files/index.js +2 -2
- package/dist/main/services/views/host-toolbar-session-runtime.d.ts +4 -4
- package/dist/main/services/views/host-toolbar-session-runtime.js +4 -4
- package/dist/main/services/views/view-manager.d.ts +17 -1
- package/dist/main/services/views/view-manager.js +67 -41
- package/dist/main/services/workspace/workspace-service.js +11 -0
- package/dist/main/windows/service-host-window/create.d.ts +1 -0
- package/dist/main/windows/service-host-window/create.js +1 -0
- package/dist/preload/runtime/host-toolbar-port.d.ts +1 -1
- package/dist/preload/runtime/host-toolbar-port.js +1 -1
- package/dist/preload/runtime/host-toolbar-runtime.d.ts +8 -7
- package/dist/preload/runtime/host-toolbar-runtime.js +8 -7
- package/dist/preload/windows/host-toolbar-runtime.cjs.map +2 -2
- package/dist/preload/windows/main.cjs.map +2 -2
- package/dist/preload/windows/simulator.cjs +1 -1
- package/dist/preload/windows/simulator.cjs.map +1 -1
- package/dist/preload/windows/simulator.js +1 -1
- package/dist/renderer/assets/index-PtsdWlGu.js +50 -0
- package/dist/renderer/entries/main/index.html +1 -1
- package/dist/shared/appdata-accumulator.d.ts +2 -2
- package/dist/shared/appdata-accumulator.js +3 -3
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/ipc-channels.d.ts +3 -3
- package/dist/shared/ipc-channels.js +3 -3
- package/dist/shared/open-in-editor.d.ts +20 -1
- package/dist/shared/open-in-editor.js +246 -3
- package/dist/shared/vpath.d.ts +2 -2
- package/dist/shared/vpath.js +2 -2
- package/dist/simulator/assets/{device-shell-BWX7Yopg.js → device-shell-TtcSXwhb.js} +2 -2
- package/dist/simulator/assets/{simulator-sf-D0mhw.js → simulator-CtyXt_4V.js} +3 -3
- package/dist/simulator/simulator.html +1 -1
- package/package.json +8 -6
- package/dist/renderer/assets/index-DmgWoK8N.js +0 -50
package/README.md
CHANGED
|
@@ -670,9 +670,13 @@ pnpm build:preload # 仅构建 preload TypeScript
|
|
|
670
670
|
pnpm build:renderer # Vite 构建渲染层
|
|
671
671
|
pnpm dev # Watch 模式 + Electron
|
|
672
672
|
pnpm check-types # 类型检查
|
|
673
|
-
pnpm test #
|
|
673
|
+
pnpm test # 运行单元测试(vitest)
|
|
674
|
+
pnpm test:coverage # 单元测试 + 覆盖率报告(终端表格 + coverage/index.html)
|
|
675
|
+
pnpm test:e2e # 运行 Playwright e2e 测试
|
|
674
676
|
```
|
|
675
677
|
|
|
678
|
+
> 覆盖率:`pnpm test:coverage`(单包)或仓库根 `pnpm test:coverage`(全部包),报告输出到各包 `coverage/`,浏览器打开 `coverage/index.html` 看逐行高亮。
|
|
679
|
+
|
|
676
680
|
---
|
|
677
681
|
|
|
678
682
|
## 安全说明
|
package/dist/main/app/app.js
CHANGED
|
@@ -240,6 +240,20 @@ function wireAppWindowEvents(config, instance) {
|
|
|
240
240
|
// project is open.
|
|
241
241
|
if (isAppQuitting())
|
|
242
242
|
return;
|
|
243
|
+
// A close arriving while a project teardown is already in flight (the
|
|
244
|
+
// user rapid-double-clicked the close button) MUST keep the window open.
|
|
245
|
+
// This guard runs BEFORE hasActiveSession() on purpose: `closeProject()`
|
|
246
|
+
// → `disposeSession()` synchronously nulls the active session before it
|
|
247
|
+
// finishes awaiting `session.close()`, so by the time the second close
|
|
248
|
+
// arrives `hasActiveSession()` is already false. With the old guard order
|
|
249
|
+
// that second close fell straight through the hasActiveSession() check
|
|
250
|
+
// WITHOUT `preventDefault()`, so Electron destroyed the last window →
|
|
251
|
+
// `window-all-closed` → `app.quit()`, quitting the whole app on a
|
|
252
|
+
// double-click. Swallow the re-entrant close and keep the window.
|
|
253
|
+
if (closing) {
|
|
254
|
+
e.preventDefault();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
243
257
|
if (!context.workspace.hasActiveSession())
|
|
244
258
|
return;
|
|
245
259
|
// Close button while a project session is open: stay in the workbench
|
|
@@ -249,8 +263,6 @@ function wireAppWindowEvents(config, instance) {
|
|
|
249
263
|
// unable to invoke anything, so subsequent clicks on Import/etc. would
|
|
250
264
|
// raise `No handler registered for ...`.
|
|
251
265
|
e.preventDefault();
|
|
252
|
-
if (closing)
|
|
253
|
-
return;
|
|
254
266
|
closing = true;
|
|
255
267
|
try {
|
|
256
268
|
if (config.onBeforeClose) {
|