@dimina-kit/devtools 0.3.2-dev.20260601115343 → 0.3.2-dev.20260610114009
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 +49 -59
- package/dist/main/api.d.ts +1 -2
- package/dist/main/api.js +5 -1
- package/dist/main/app/app.d.ts +15 -5
- package/dist/main/app/app.js +249 -122
- package/dist/main/app/bootstrap.d.ts +16 -0
- package/dist/main/app/bootstrap.js +20 -0
- package/dist/main/app/launch.d.ts +8 -4
- package/dist/main/app/launch.js +9 -4
- package/dist/main/index.bundle.js +6071 -1863
- package/dist/main/index.js +9 -1
- package/dist/main/ipc/app.d.ts +1 -1
- package/dist/main/ipc/bridge-router.d.ts +61 -0
- package/dist/main/ipc/bridge-router.js +1333 -0
- package/dist/main/ipc/panels.d.ts +1 -1
- package/dist/main/ipc/panels.js +6 -2
- package/dist/main/ipc/popover.d.ts +1 -1
- package/dist/main/ipc/project-fs.d.ts +1 -1
- package/dist/main/ipc/projects.d.ts +1 -1
- package/dist/main/ipc/session.d.ts +1 -1
- package/dist/main/ipc/settings.d.ts +1 -1
- package/dist/main/ipc/simulator-module.d.ts +6 -0
- package/dist/main/ipc/simulator-module.js +9 -1
- package/dist/main/ipc/simulator.d.ts +2 -2
- package/dist/main/ipc/simulator.js +29 -5
- package/dist/main/ipc/toolbar.d.ts +1 -1
- package/dist/main/ipc/views.d.ts +1 -1
- package/dist/main/ipc/views.js +40 -2
- package/dist/main/runtime/devtools-backend.d.ts +17 -0
- package/dist/main/runtime/devtools-backend.js +49 -0
- package/dist/main/runtime/miniapp-runtime.d.ts +39 -0
- package/dist/main/runtime/miniapp-runtime.js +17 -0
- package/dist/main/services/automation/exec.d.ts +27 -2
- package/dist/main/services/automation/exec.js +37 -3
- package/dist/main/services/automation/handlers/app.js +127 -11
- package/dist/main/services/automation/handlers/page.js +36 -19
- package/dist/main/services/automation/index.js +40 -13
- package/dist/main/services/automation/wait-active-page.d.ts +56 -0
- package/dist/main/services/automation/wait-active-page.js +71 -0
- package/dist/main/services/console-forward/index.d.ts +36 -0
- package/dist/main/services/console-forward/index.js +81 -0
- package/dist/main/services/dimina-resource-server.d.ts +7 -0
- package/dist/main/services/dimina-resource-server.js +99 -0
- package/dist/main/services/elements-forward/index.d.ts +66 -0
- package/dist/main/services/elements-forward/index.js +583 -0
- package/dist/main/services/layout/index.d.ts +22 -0
- package/dist/main/services/layout/index.js +25 -0
- package/dist/main/services/mcp/index.d.ts +1 -0
- package/dist/main/services/mcp/index.js +3 -0
- package/dist/main/services/mcp/server.d.ts +1 -1
- package/dist/main/services/mcp/server.js +1 -1
- package/dist/main/services/mcp/target-manager.d.ts +35 -0
- package/dist/main/services/mcp/target-manager.js +63 -1
- package/dist/main/services/mcp/tools/context-tools.js +15 -1
- package/dist/main/services/module.d.ts +1 -1
- package/dist/main/services/network-forward/index.d.ts +190 -0
- package/dist/main/services/network-forward/index.js +765 -0
- package/dist/main/services/notifications/renderer-notifier.d.ts +11 -0
- package/dist/main/services/notifications/renderer-notifier.js +7 -1
- package/dist/main/services/render-inspect/index.d.ts +41 -0
- package/dist/main/services/render-inspect/index.js +88 -0
- package/dist/main/services/safe-area/index.d.ts +17 -0
- package/dist/main/services/safe-area/index.js +59 -0
- package/dist/main/services/service-host-pool/pool.d.ts +197 -0
- package/dist/main/services/service-host-pool/pool.js +364 -0
- package/dist/main/services/simulator/custom-apis.d.ts +34 -0
- package/dist/main/services/simulator/custom-apis.js +22 -0
- package/dist/main/services/simulator-appdata/index.d.ts +35 -0
- package/dist/main/services/simulator-appdata/index.js +71 -0
- package/dist/main/services/simulator-current-page/index.d.ts +24 -0
- package/dist/main/services/simulator-current-page/index.js +19 -0
- package/dist/main/services/simulator-storage/index.d.ts +37 -2
- package/dist/main/services/simulator-storage/index.js +209 -32
- package/dist/main/services/simulator-storage/service-storage-ops.d.ts +40 -0
- package/dist/main/services/simulator-storage/service-storage-ops.js +67 -0
- package/dist/main/services/simulator-temp-files/index.d.ts +1 -1
- package/dist/main/services/simulator-temp-files/index.js +39 -17
- package/dist/main/services/simulator-wxml/index.d.ts +29 -0
- package/dist/main/services/simulator-wxml/index.js +28 -0
- package/dist/main/services/toolbar/toolbar-store.d.ts +3 -3
- package/dist/main/services/toolbar/toolbar-store.js +1 -18
- package/dist/main/services/views/devtools-tabs.d.ts +47 -0
- package/dist/main/services/views/devtools-tabs.js +95 -0
- package/dist/main/services/views/miniapp-partition.d.ts +80 -0
- package/dist/main/services/views/miniapp-partition.js +138 -0
- package/dist/main/services/views/simulator-session-policy.d.ts +28 -0
- package/dist/main/services/views/simulator-session-policy.js +82 -0
- package/dist/main/services/views/view-manager.d.ts +125 -0
- package/dist/main/services/views/view-manager.js +852 -4
- package/dist/main/services/workbench-context.d.ts +67 -7
- package/dist/main/services/workbench-context.js +6 -1
- package/dist/main/services/workspace/workspace-service.js +7 -13
- package/dist/main/utils/ipc-registry.d.ts +1 -1
- package/dist/main/utils/ipc-registry.js +21 -4
- package/dist/main/utils/paths.d.ts +15 -0
- package/dist/main/utils/paths.js +19 -0
- package/dist/main/utils/sender-policy.d.ts +9 -3
- package/dist/main/utils/sender-policy.js +18 -4
- package/dist/main/utils/theme.d.ts +1 -1
- package/dist/main/utils/theme.js +1 -1
- package/dist/main/windows/main-window/create.d.ts +0 -6
- package/dist/main/windows/main-window/create.js +6 -80
- package/dist/main/windows/main-window/events.d.ts +1 -1
- package/dist/main/windows/main-window/events.js +1 -1
- package/dist/main/windows/service-host-window/create.d.ts +67 -0
- package/dist/main/windows/service-host-window/create.js +138 -0
- package/dist/native-host/common/common.js +368 -0
- package/dist/native-host/container/pageFrame.css +1 -0
- package/dist/native-host/render/render.js +9334 -0
- package/dist/native-host/service/service.js +6 -0
- package/dist/preload/index.d.ts +2 -0
- package/dist/preload/index.js +6 -0
- package/dist/preload/instrumentation/app-data.d.ts +18 -20
- package/dist/preload/instrumentation/app-data.js +23 -160
- package/dist/preload/instrumentation/wxml-extract.d.ts +1 -1
- package/dist/preload/instrumentation/wxml-extract.js +1 -1
- package/dist/preload/runtime/bridge.d.ts +3 -8
- package/dist/preload/runtime/bridge.js +2 -32
- package/dist/preload/runtime/custom-apis.js +20 -17
- package/dist/preload/runtime/host-toolbar-advertiser.d.ts +27 -0
- package/dist/preload/runtime/host-toolbar-advertiser.js +55 -0
- package/dist/preload/runtime/main-api-runner.d.ts +9 -0
- package/dist/preload/runtime/main-api-runner.js +85 -0
- package/dist/preload/runtime/native-host.d.ts +43 -0
- package/dist/preload/runtime/native-host.js +83 -0
- package/dist/preload/shared/expose.d.ts +10 -5
- package/dist/preload/shared/expose.js +30 -12
- package/dist/preload/shared/sid-registry.d.ts +11 -0
- package/dist/preload/shared/sid-registry.js +38 -0
- package/dist/preload/windows/host-toolbar.cjs +161 -0
- package/dist/preload/windows/host-toolbar.cjs.map +7 -0
- package/dist/preload/windows/host-toolbar.d.ts +2 -0
- package/dist/preload/windows/host-toolbar.js +12 -0
- package/dist/preload/windows/main.cjs +1935 -0
- package/dist/preload/windows/main.cjs.map +4 -4
- package/dist/preload/windows/simulator.cjs +925 -0
- package/dist/preload/windows/simulator.cjs.map +7 -0
- package/dist/preload/windows/simulator.js +244 -574
- package/dist/render-host/pageFrame.html +29 -0
- package/dist/render-host/preload.cjs +154 -0
- package/dist/render-host/render-inspect.js +295 -0
- package/dist/renderer/assets/index-CcJKzatF.js +50 -0
- package/dist/renderer/assets/{input-CCYS8Ave.js → input-QGx6FFX1.js} +2 -2
- package/dist/renderer/assets/ipc-transport-BT4QYQqu.css +1 -0
- package/dist/renderer/assets/{ipc-transport-Bn4KXvhu.js → ipc-transport-DvZvwK-Z.js} +2 -2
- package/dist/renderer/assets/{popover-CH4rwpdt.js → popover-BOH1If1J.js} +2 -2
- package/dist/renderer/assets/select-C7JQ8G5N.js +2 -0
- package/dist/renderer/assets/{settings-CMTB-t0x.js → settings-DpAbTJyF.js} +2 -2
- package/dist/renderer/assets/{settings-api-Csdngf9Z.js → settings-api-RD2IZF53.js} +2 -2
- package/dist/renderer/assets/{workbenchSettings-CODFCzOg.js → workbenchSettings-CNJX4Qna.js} +2 -2
- package/dist/renderer/entries/main/index.html +5 -5
- package/dist/renderer/entries/popover/index.html +5 -5
- package/dist/renderer/entries/settings/index.html +5 -5
- package/dist/renderer/entries/workbench-settings/index.html +4 -4
- package/dist/service-host/preload.cjs +254 -0
- package/dist/service-host/service.html +10 -0
- package/dist/service-host/sourcemap-rewrite.cjs +58 -0
- package/dist/service-host/sync-api-patch.js +20 -0
- package/dist/service-host/sync-impls/menu-button-geometry.js +8 -0
- package/dist/service-host/sync-impls/menu-button.js +16 -0
- package/dist/service-host/sync-impls/storage.js +50 -0
- package/dist/service-host/sync-impls/system-info.js +54 -0
- package/dist/shared/appdata-accumulator.d.ts +95 -0
- package/dist/shared/appdata-accumulator.js +213 -0
- package/dist/shared/bridge-channels.d.ts +378 -0
- package/dist/shared/bridge-channels.js +81 -0
- package/dist/shared/ipc-channels.d.ts +84 -1
- package/dist/shared/ipc-channels.js +90 -10
- package/dist/shared/ipc-schemas.d.ts +59 -2
- package/dist/shared/ipc-schemas.js +64 -3
- package/dist/shared/open-in-editor.d.ts +71 -0
- package/dist/shared/open-in-editor.js +138 -0
- package/dist/shared/simulator-api-metadata.d.ts +21 -0
- package/dist/shared/simulator-api-metadata.js +23 -0
- package/dist/shared/types.d.ts +2 -39
- package/dist/simulator/assets/device-shell-DsdcNEkt.css +1 -0
- package/dist/simulator/assets/device-shell-fH2cI-3q.js +2 -0
- package/dist/simulator/assets/jsx-runtime-P6ZegaOf.js +2 -0
- package/dist/simulator/assets/simulator-DHylZf9Z.js +10 -0
- package/dist/simulator/assets/simulator-mini-app-BDNu5n26.js +2 -0
- package/dist/simulator/device-shell/menu-button-geometry.js +8 -0
- package/dist/simulator/simulator.html +2 -112
- package/package.json +12 -12
- package/dist/main/utils/disposable.d.ts +0 -18
- package/dist/main/utils/disposable.js +0 -67
- package/dist/renderer/assets/index-BDMxXUfn.js +0 -50
- package/dist/renderer/assets/ipc-transport-Cu7tubyg.css +0 -1
- package/dist/renderer/assets/select-Ct4-sijm.js +0 -2
- package/dist/simulator/assets/simulator-B4e3c6_O.js +0 -9
package/dist/main/index.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { app } from 'electron';
|
|
1
2
|
import { launch } from './app/launch.js';
|
|
2
|
-
launch()
|
|
3
|
+
// Fire-and-forget boot: launch() returns the electron-deck whenReady gate
|
|
4
|
+
// promise. A bare call would let a boot failure escape as an unhandledRejection
|
|
5
|
+
// (no diagnostics, can be swallowed). Surface it via a structured failure exit:
|
|
6
|
+
// log the cause and exit non-zero (per workbench-model.md fire-and-forget rule).
|
|
7
|
+
launch().catch((err) => {
|
|
8
|
+
console.error('[devtools] fatal: launch() failed during boot', err);
|
|
9
|
+
app.exit(1);
|
|
10
|
+
});
|
|
3
11
|
//# sourceMappingURL=index.js.map
|
package/dist/main/ipc/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { WorkbenchContext } from '../services/workbench-context.js';
|
|
2
|
-
import type { Disposable } from '
|
|
2
|
+
import type { Disposable } from '@dimina-kit/electron-deck/main';
|
|
3
3
|
export declare function registerAppIpc(ctx: Pick<WorkbenchContext, 'preloadPath' | 'brandingProvider' | 'appName' | 'headerHeight' | 'senderPolicy'>): Disposable;
|
|
4
4
|
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { WebContents } from 'electron';
|
|
2
|
+
import type { NativeDeviceInfo } from '../../shared/ipc-channels.js';
|
|
3
|
+
import type { PageStackEntry } from '../../shared/bridge-channels.js';
|
|
4
|
+
import type { WorkbenchContext } from '../services/workbench-context.js';
|
|
5
|
+
import type { DebugTap } from '@dimina-kit/electron-deck/main';
|
|
6
|
+
/**
|
|
7
|
+
* Accessor over the bridge-router's private `RouterState`, stashed on
|
|
8
|
+
* `ctx.bridge` so other main-process services (simulator-storage, automation,
|
|
9
|
+
* appdata) can resolve live WebContents handles without owning router state.
|
|
10
|
+
* All getters resolve fresh each call (the pre-warm pool can swap windows on
|
|
11
|
+
* respawn, so cached handles go stale).
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Render-side activity worth re-reading panel data on: a page's DOM mounted
|
|
15
|
+
* (`domReady`) or the visible page changed (`activePage`). Panels that pull
|
|
16
|
+
* from the active render guest (WXML/element-inspect) subscribe via
|
|
17
|
+
* `BridgeRouterHandle.onRenderEvent` so they can refresh without polling.
|
|
18
|
+
*/
|
|
19
|
+
export interface RenderEvent {
|
|
20
|
+
kind: 'domReady' | 'activePage';
|
|
21
|
+
appId: string;
|
|
22
|
+
bridgeId: string;
|
|
23
|
+
/** activePage only: the now-visible page's route (bare pagePath), if known.
|
|
24
|
+
* Lets the current-page panel push the route without a separate lookup. */
|
|
25
|
+
pagePath?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface BridgeRouterHandle {
|
|
28
|
+
/** Whether native-host mode is on (main is the source of truth). */
|
|
29
|
+
isNativeHost(): boolean;
|
|
30
|
+
/** The render-host `<webview>` WebContents for a page bridgeId, or null. */
|
|
31
|
+
resolveRenderWc(bridgeId: string): WebContents | null;
|
|
32
|
+
/** The hidden service-host window WebContents for the active (or named) app. */
|
|
33
|
+
getServiceWc(appId?: string): WebContents | null;
|
|
34
|
+
/** The service-host window WebContents for the app that owns a page bridgeId,
|
|
35
|
+
* or null. Lets render-side consumers (console forwarder) target the matching
|
|
36
|
+
* app's service host even with multiple sessions open. */
|
|
37
|
+
getServiceWcForBridge(bridgeId: string): WebContents | null;
|
|
38
|
+
/** The visible page's render WebContents for the active (or named) app. */
|
|
39
|
+
getActiveRenderWc(appId?: string): WebContents | null;
|
|
40
|
+
/** The visible top-of-stack page bridgeId for the active (or named) app. */
|
|
41
|
+
getActiveBridgeId(appId?: string): string | null;
|
|
42
|
+
/** The full ordered page stack (bottom→top) reported by DeviceShell, or null
|
|
43
|
+
* before the first PAGE_STACK signal. Optional: only the native-host bridge
|
|
44
|
+
* provides it (the default path derives the stack from the simulator URL). */
|
|
45
|
+
getPageStack?(appId?: string): PageStackEntry[] | null;
|
|
46
|
+
/** Subscribe to render-side activity (domReady / active-page change). */
|
|
47
|
+
onRenderEvent(listener: (event: RenderEvent) => void): () => void;
|
|
48
|
+
/** The currently-selected device (renderer toolbar), or null pre-selection. */
|
|
49
|
+
getDevice(): NativeDeviceInfo | null;
|
|
50
|
+
/** Cache the selected device + push DEVICE_CHANGE to the live simulator WC(s). */
|
|
51
|
+
setDevice(device: NativeDeviceInfo): void;
|
|
52
|
+
/**
|
|
53
|
+
* The flag-gated debugTap (§7) over the bridge message stream. Exposed so a
|
|
54
|
+
* hidden devtools panel / automation can read `.entries()` when
|
|
55
|
+
* `DIMINA_DEBUG_TAP=1`; a no-op snapshot otherwise. Optional so the many
|
|
56
|
+
* partial `BridgeRouterHandle` test mocks don't each have to stub it.
|
|
57
|
+
*/
|
|
58
|
+
debugTap?: DebugTap;
|
|
59
|
+
}
|
|
60
|
+
export declare function installBridgeRouter(ctx: WorkbenchContext): void;
|
|
61
|
+
//# sourceMappingURL=bridge-router.d.ts.map
|